![Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility](https://cdn.sanity.io/images/cgdhsj6q/production/97774ea8c88cc8f4bed2766c31994ebc38116948-1664x1366.png?w=400&fit=max&auto=format)
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@ffmpeg/ffmpeg
Advanced tools
Use FFmpeg directly in your browser without any backend services!!
Transcode
![]() Chrome |
---|
last 2 versions |
Name | Demo | Source Code |
---|---|---|
Webcam | ![]() | Link |
ffmpeg.wasm provides simple to use APIs, to transcode a video you only need few lines of code:
const fs = require('fs');
const { createFFmpeg } = require('@ffmpeg/ffmpeg');
const ffmpeg = createFFmpeg({ log: true });
(async () => {
await ffmpeg.load();
await ffmpeg.write('test.avi', './test.avi');
await ffmpeg.transcode('test.avi', 'test.mp4');
fs.writeFileSync('./test.mp4', ffmpeg.read('test.mp4'));
process.exit(0);
})();
$ npm install @ffmpeg/ffmpeg
As we are using the latest experimental features, you need to add few flags to run in Node.js
$ node --experimental-wasm-threads --experimental-wasm-bulk-memory transcode.js
Or, using a script tag in the browser (only works in Chrome):
<script src="https://unpkg.com/@ffmpeg/ffmpeg@0.8.2/dist/ffmpeg.min.js"></script>
<script>
const { createFFmpeg } = FFmpeg;
...
</script>
Starting from v0.8.0, multithreading is enabled and you can use this feature by passing -threads <NUM>
(NUM
< 8 ). For built-in functions like transcode()
, you can pass it as 3rd argument.
// in transcode()
await ffmpeg.transcode('flame.avi', 'flame.mp4', '-threads 2');
// in run()
await ffmpeg.run('-i flame.avi -threads 2 flame.mp4');
Learn how to build ffmpeg.wasm from stories:
FAQs
FFmpeg WebAssembly version for browser
The npm package @ffmpeg/ffmpeg receives a total of 98,304 weekly downloads. As such, @ffmpeg/ffmpeg popularity was classified as popular.
We found that @ffmpeg/ffmpeg demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.