Skip to content

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

License

Notifications You must be signed in to change notification settings

LuckyWinty/ffmpegVideoCapture

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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})
    })
  })
}

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published