0.0.2 • Published 2 years ago

ffmpegvideocapture v0.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

ffmpegVideoCapture

ffmpeg 的 wasm 版本,一个为 umd 格式的 npm 包,用于快速测试前端截帧

按照

npm i ffmpegvideocapture

使用

import ffmpegVideoCapture from 'ffmpegvideocapture'

const getVideoFrameByFfmpeg = async (file) => {
  return await new Promise((resolve) => {
    ffmpegVideoCapture.capture(file, 1000, async (dataURL, imageInfo) => {
      //dataURL 封面,格式为 base64
      //imageInfo 图片信息
      console.log('----imageInfo', dataURL, imageInfo)
      resolve({dataURL, imageInfo})
    })
  })
}
0.0.2

2 years ago

0.0.1

2 years ago

1.0.0

2 years ago