Polyfill for WebCodecs, powered by ffmpeg.wasm
Go to file
2019-10-20 22:37:37 +08:00
examples Init commit 2019-10-20 22:37:37 +08:00
src Init commit 2019-10-20 22:37:37 +08:00
tests/assets Init commit 2019-10-20 22:37:37 +08:00
.gitattributes Init commit 2019-10-20 22:37:37 +08:00
.gitignore Init commit 2019-10-20 22:37:37 +08:00
package-lock.json Init commit 2019-10-20 22:37:37 +08:00
package.json Init commit 2019-10-20 22:37:37 +08:00
README.md Init commit 2019-10-20 22:37:37 +08:00

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