
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
ffmpeg-lib
Advanced tools
A comprehensive, fluent, and type-safe Node.js library for programmatic interaction with FFmpeg and FFprobe
A comprehensive, fluent, and type-safe Node.js library for programmatic interaction with FFmpeg and FFprobe.
FFmpegLib provides a powerful and intuitive interface to handle complex multimedia operations in Node.js. It abstracts the complexity of the FFmpeg command-line interface while offering full access to its capabilities, from simple conversions to advanced HLS packaging and media analysis.
FFmpegCommand): A chainable, type-safe API for building complex FFmpeg commands.FFmpegManager): High-level control with job queuing, progress monitoring, and resource management.MediaMetadataExtractor): Easily extract detailed metadata from media files using FFprobe.TestMediaGenerator): Create synthetic video, audio, and image files for testing purposes.npm install ffmpeg-lib
# or
yarn add ffmpeg-lib
# or
bun add ffmpeg-lib
Here's how easy it is to perform a video conversion while monitoring its progress:
import { FFmpegManager } from 'ffmpeg-lib';
// Initialize the manager with the path to your FFmpeg executable
const manager = new FFmpegManager('/usr/bin/ffmpeg');
// Listen for progress events
manager.on('progress', (event) => {
console.log(`Progress: ${event.progress}% | Speed: ${event.speed}`);
});
// Listen for completion
manager.on('completed', (event) => {
console.log(`Conversion finished in ${event.duration}ms!`);
});
// Execute a conversion command
async function convertVideo() {
try {
console.log('Starting conversion...');
const result = await manager.convert('input.mov', 'output.mp4', {
videoCodec: 'libx264',
videoBitrate: '2000k',
resolution: '1280x720',
audioCodec: 'aac',
audioBitrate: '128k'
});
console.log('Success!', result);
} catch (error) {
console.error('An error occurred:', error.message);
}
}
convertVideo();
FFmpegLib is organized into several powerful components. Choose the one that best fits your needs.
For a deep dive into the API and advanced examples, please check our full documentation.
This project is licensed under the MIT License.
FAQs
A comprehensive, fluent, and type-safe Node.js library for programmatic interaction with FFmpeg and FFprobe
We found that ffmpeg-lib demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.