FFMPEG实践
ffmpeg实践
基础命令
1 |
|
fluent-ffmpeg
https://www.npmjs.com/package/fluent-ffmpeg
需要提前安装ffmpeg,可以配合二进制ffmpeg包使用
This library abstracts the complex command-line usage of ffmpeg into a fluent, easy to use node.js module. In order to be able to use this module, make sure you have ffmpeg installed on your system (including all necessary encoding libraries like libmp3lame or libx264).
@ffmpeg-installer/ffmpeg
https://www.npmjs.com/package/@ffmpeg-installer/ffmpeg
Platform independent binary installer of FFmpeg for node projects. Useful for tools that should “just work” on multiple environments.
1 |
|
注意Electron平台打包-安装后路径
1 |
|
ffmpeg-static
https://www.npmjs.com/package/ffmpeg-static
ffmpeg static binaries for Mac OSX, Linux, Windows.
1 |
|
注意Electron平台打包-安装后路径
Electron & other cross-platform packaging tools. Because ffmpeg-static will download a binary specific to the OS/platform, you need to purge node_modules before (re-)packaging your app for a different OS/platform (read more in #35).
ffmpeg.wasm
https://www.npmjs.com/package/@ffmpeg/ffmpeg
不建议生产使用。多线程兼容性不好,报内存相关错误。单线程性能较差
ffmpeg.wasm is a pure Webassembly / Javascript port of FFmpeg.(Webassembly)
ffmpeg.js
https://www.npmjs.com/package/ffmpeg.js
不建议生产使用,同样存在性能问题
This library provides FFmpeg builds ported to JavaScript using Emscripten project.(Webassembly)