Polyfill for WebCodecs, powered by ffmpeg.wasm
examples | ||
src | ||
tests/assets | ||
.gitattributes | ||
.gitignore | ||
.npmignore | ||
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);
})();