Skip to content

FFmpeg for browser and node, powered by WebAssembly

License

Notifications You must be signed in to change notification settings

maple3142/ffmpeg.js

 
 

Repository files navigation

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

Examples:

Name Demo Source Code
Webcam codepen Link

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:

About

FFmpeg for browser and node, powered by WebAssembly

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 96.9%
  • HTML 2.5%
  • Dockerfile 0.6%