Giter Site home page Giter Site logo

ffmpeg.js's Introduction

ffmpeg.js

ffmpeg.js

Node Version Actions Status npm (tag) 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);
  await worker.terminate();
})();

Installation

$ npm install @ffmpeg/ffmpeg

As we use worker_threads which was introduced in Node.js v10.5.0, please remember to add --experimental-worker if you are using Node.js v10, and you don't have to add anything if you are using Node.js v12

Or, using a script tag in the browser:

<script src="https://unpkg.com/@ffmpeg/[email protected]/dist/ffmpeg.min.js"></script>
<script>
  const { createWorker } = FFmpeg;
  ...
</script>

Examples

Documentation

Tutorials

Learn how to build ffmpeg.js from stories:

ffmpeg.js's People

Contributors

jeromewu avatar santosh898 avatar iliashad avatar josephrocca avatar caugner avatar dependabot[bot] avatar kabel2 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.