1.0.1 • Published 4 years ago

node-video-resize v1.0.1

Weekly downloads
6
License
MIT
Repository
github
Last release
4 years ago

node-video-resize

video resize.

example

  • load video info
const { loadVideoInfo } = require('./')
const path = require('path')

const videoPath = path.resolve(__dirname, './__tests__/test.mp4')

const bootstrap = async () => {
  const ret = await loadVideoInfo(videoPath)
  console.log(ret)
}

bootstrap()
  • resize video
const { videoResize } = require('./')
const path = require('path')

const videoPath = path.resolve(__dirname, './__tests__/test.mp4')
const outputPath = path.resolve(__dirname, './video/output.mp4')

const bootstrap = async () => {
  const ret = await videoResize({
    inputPath: videoPath,
    outputPath,
    format: 'mp4',
    size: '640x480'
  })
  console.log(ret)
}

bootstrap()