Polyfill for WebCodecs, powered by ffmpeg.wasm
Go to file
2019-11-06 13:11:49 +00:00
.github Test node 10 only 2019-10-23 21:34:56 +08:00
docs Add api.md 2019-11-06 12:13:50 +00:00
examples Revise API and add worker.run 2019-11-06 11:57:41 +00:00
scripts Add test 2019-11-06 13:07:12 +00:00
src Add test 2019-11-06 13:07:12 +00:00
tests Add test 2019-11-06 13:07:12 +00:00
_config.yml Set theme jekyll-theme-cayman 2019-10-25 19:22:25 +08:00
.eslintrc Fix eslintrc 2019-10-30 20:01:04 +08:00
.gitattributes Init commit 2019-10-20 22:37:37 +08:00
.gitignore Delete .nyc_output 2019-11-06 13:11:49 +00:00
.gitpod.Dockerfile Add test 2019-11-06 13:07:12 +00:00
.gitpod.yml Add test 2019-11-06 13:07:12 +00:00
.npmignore Update .npmignore 2019-11-06 13:10:00 +00:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2019-10-23 14:21:41 +08:00
CONTRIBUTING.md Create CONTRIBUTING.md 2019-10-23 14:22:11 +08:00
LICENSE Create LICENSE 2019-10-23 14:20:17 +08:00
package-lock.json Add test 2019-11-06 13:07:12 +00:00
package.json Add test 2019-11-06 13:07:12 +00:00
README.md Add api.md 2019-11-06 12:13:50 +00:00

ffmpeg.js

ffmpeg.js

Actions Status Maintenance License: MIT Code Style Downloads Total Downloads Month

Use FFmpeg directly in your browser without any backend services!!

Transcode

transcode-demo

codepen

Source Code


ffmpeg.js provides simple to use APIs, to transcode a video you only need few lines of code:

const fs = require('fs');
const { createWorker } = require('@ffmpeg/ffmpeg');

const worker = createWorker();

(async () => {
  await worker.load();
  await worker.write('test.avi', './test.avi');
  await worker.transcode('test.avi', 'test.mp4');
  const { data } = await worker.read('test.mp4');
  fs.writeFileSync('./test.mp4', data);
})();

Installation

$ npm install @ffmpeg/ffmpeg

Documentation

Tutorials

Learn how to build ffmpeg.js from stories: