Polyfill for WebCodecs, powered by ffmpeg.wasm
| .github | ||
| docs/images | ||
| examples | ||
| scripts | ||
| src | ||
| tests/assets | ||
| _config.yml | ||
| .eslintrc | ||
| .gitattributes | ||
| .gitignore | ||
| .npmignore | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
FFmpeg.js
A FFmpeg WebAssembly version built from scratch, you can learn how to do it from this series of stories: Build FFmpeg WebAssembly version (=ffmpeg.js).
Installation
$ npm install @ffmpeg/ffmpeg
Example
const fs = require('fs');
const ffmpeg = require('@ffmpeg/ffmpeg');
(async () => {
await ffmpeg.load();
const data = ffmpeg.transcode('./test.avi', 'mp4');
fs.wrieFileSync('./test.mp4', data);
})();