# ffmpeg.js
[](https://github.com/ffmpegjs/ffmpeg.js/actions)
[](https://github.com/ffmpegjs/ffmpeg.js/graphs/commit-activity)
[](https://opensource.org/licenses/MIT)
[](https://github.com/airbnb/javascript)
[](https://www.npmjs.com/package/@ffmpeg/ffmpeg)
[](https://www.npmjs.com/package/@ffmpeg/ffmpeg)
Use FFmpeg directly in your browser without any backend services!!
**Transcode**
ffmpeg.js provides simple to use APIs, to transcode a video you only need few lines of code:
```javascript
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:
- [Part.1 Preparation](https://itnext.io/build-ffmpeg-webassembly-version-ffmpeg-js-part-1-preparation-ed12bf4c8fac)
- [Part.2 Compile with Emscripten](https://itnext.io/build-ffmpeg-webassembly-version-ffmpeg-js-part-2-compile-with-emscripten-4c581e8c9a16)
- [Part.3 ffmpeg.js v0.1.0 — Transcoding avi to mp4](https://itnext.io/build-ffmpeg-webassembly-version-ffmpeg-js-part-3-ffmpeg-js-v0-1-0-transcoding-avi-to-mp4-f729e503a397)