konowebcodecs/README.md
2019-10-30 20:48:58 +08:00

2.2 KiB
Raw Blame History

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

[Source Code](https://github.com/ffmpegjs/ffmpeg.js/blob/master/examples/browser/transcode.html)

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();
  const { data } = await worker.transcode('./test.avi', 'mp4');
  fs.wrieFileSync('./test.mp4', data);
})();

Installation

$ npm install @ffmpeg/ffmpeg

Documentation

WIP

Tutorials

Learn how to build ffmpeg.js from stories: