
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@ffmpeg-installer/linux-x64
Advanced tools
@ffmpeg-installer/linux-x64 is an npm package that provides a precompiled FFmpeg binary for Linux x64 systems. It allows developers to easily include FFmpeg in their Node.js projects without needing to compile it from source. FFmpeg is a powerful multimedia framework that can decode, encode, transcode, mux, demux, stream, filter, and play almost anything that humans and machines have created.
Video Conversion
This feature allows you to convert video files from one format to another. The code sample demonstrates converting an MP4 file to an AVI file using the FFmpeg binary provided by the package.
const ffmpegPath = require('@ffmpeg-installer/linux-x64').path;
const { exec } = require('child_process');
exec(`${ffmpegPath} -i input.mp4 output.avi`, (error, stdout, stderr) => {
if (error) {
console.error(`Error: ${error.message}`);
return;
}
if (stderr) {
console.error(`Stderr: ${stderr}`);
return;
}
console.log(`Stdout: ${stdout}`);
});
Audio Extraction
This feature allows you to extract audio from a video file. The code sample demonstrates extracting the audio from an MP4 file and saving it as an MP3 file.
const ffmpegPath = require('@ffmpeg-installer/linux-x64').path;
const { exec } = require('child_process');
exec(`${ffmpegPath} -i input.mp4 -q:a 0 -map a output.mp3`, (error, stdout, stderr) => {
if (error) {
console.error(`Error: ${error.message}`);
return;
}
if (stderr) {
console.error(`Stderr: ${stderr}`);
return;
}
console.log(`Stdout: ${stdout}`);
});
Video Compression
This feature allows you to compress video files to reduce their size. The code sample demonstrates compressing an MP4 file using the H.265 codec with a constant rate factor (CRF) of 28.
const ffmpegPath = require('@ffmpeg-installer/linux-x64').path;
const { exec } = require('child_process');
exec(`${ffmpegPath} -i input.mp4 -vcodec libx265 -crf 28 output.mp4`, (error, stdout, stderr) => {
if (error) {
console.error(`Error: ${error.message}`);
return;
}
if (stderr) {
console.error(`Stderr: ${stderr}`);
return;
}
console.log(`Stdout: ${stdout}`);
});
fluent-ffmpeg is a Node.js library that provides a fluent API for working with FFmpeg. It allows you to perform various FFmpeg operations such as video conversion, audio extraction, and video compression with a more user-friendly syntax. Unlike @ffmpeg-installer/linux-x64, fluent-ffmpeg does not include the FFmpeg binary itself, so you need to have FFmpeg installed on your system.
ffmpeg-static is an npm package that provides static binaries for FFmpeg across different platforms, including Linux, Windows, and macOS. It is similar to @ffmpeg-installer/linux-x64 in that it includes the FFmpeg binary, but it supports multiple operating systems, making it more versatile for cross-platform development.
node-ffmpeg is a Node.js module that provides a simple interface for using FFmpeg. It allows you to perform various multimedia processing tasks such as video conversion, audio extraction, and video compression. Unlike @ffmpeg-installer/linux-x64, node-ffmpeg requires you to have FFmpeg installed on your system.
Do not use directly, use ffmpeg-installer:
npm install --save @ffmpeg-installer/ffmpeg
FAQs
Linux FFmpeg binary used by ffmpeg-installer
The npm package @ffmpeg-installer/linux-x64 receives a total of 330,786 weekly downloads. As such, @ffmpeg-installer/linux-x64 popularity was classified as popular.
We found that @ffmpeg-installer/linux-x64 demonstrated a not healthy version release cadence and project activity because the last version was released 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.