Platform independent binary installer of FFmpeg for node projects
Installations
npm install @ffmpeg-installer/ffmpeg
Releases
Unable to fetch releases
Developer
Developer Guide
Module System
CommonJS
Min. Node Version
Typescript Support
Yes
Node Version
15.13.0
NPM Version
7.7.6
Statistics
423 Stars
94 Commits
70 Forks
6 Watching
6 Branches
8 Contributors
Updated on 23 Nov 2024
Bundle Size
2.42 kB
Minified
1.10 kB
Minified + Gzipped
Languages
JavaScript (92.98%)
TypeScript (7.02%)
Total Downloads
Cumulative downloads
Total Downloads
50,398,712
Last day
5.3%
73,197
Compared to previous day
Last week
6.9%
424,128
Compared to previous week
Last month
7%
1,631,714
Compared to previous month
Last year
27.1%
16,814,206
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
8
Dev Dependencies
3
node-ffmpeg-installer
Platform independent binary installer of FFmpeg for node projects. Useful for tools that should "just work" on multiple environments.
Installs a binary of ffmpeg
for the current platform and provides a path and version. Supports Linux, Windows and Mac OS/X.
A combination of package.json fields optionalDependencies
, cpu
, and os
let's the installer only download the binary for the current platform. See also "Warnings during install", below.
Install
npm install --save @ffmpeg-installer/ffmpeg
Usage examples
1const ffmpeg = require('@ffmpeg-installer/ffmpeg'); 2console.log(ffmpeg.path, ffmpeg.version);
process.spawn()
1const ffmpegPath = require('@ffmpeg-installer/ffmpeg').path; 2const spawn = require('child_process').spawn; 3const ffmpeg = spawn(ffmpegPath, args); 4ffmpeg.on('exit', onExit);
fluent-ffmpeg
1const ffmpegPath = require('@ffmpeg-installer/ffmpeg').path; 2const ffmpeg = require('fluent-ffmpeg'); 3ffmpeg.setFfmpegPath(ffmpegPath);
Known issues
Warnings during install
To automatically choose the binary to install, optionalDependencies are used. This currently outputs warnings in the console, an issue that is tracked by the npm team here.
AWS and/or Elastic Beanstalk
If you get permissions issues, try adding a .npmrc file with the following:
unsafe-perm=true
See issue #21
Wrong path under Electron with Asar enabled
It's a known issue that Asar breaks native paths. As a workaround, if you use Asar, you can do something like this:
1const ffmpegPath = require('@ffmpeg-installer/ffmpeg').path.replace('app.asar', 'app.asar.unpacked');
Compiling ffmpeg for platforms other than your own
If you need to install a version of ffmpeg
that differs than your current platform (e.g. compiling a Linux version to upload to AWS Lambda from MacOS), you can use npm install @ffmpeg-installer/linux-x64 --force
(substituting linux-x64
with whatever platform you need). Note that if you are compressing your project into a .zip
for Lambda, you will need to exclude the other platforms' builds from your archive.
The binaries
Downloaded from the sources listed at ffmpeg.org:
- Linux 32-bit: (20181210-g0e8eb07980): https://www.johnvansickle.com/ffmpeg/
- Linux 64-bit: (20181210-g0e8eb07980): https://www.johnvansickle.com/ffmpeg/
- Mac OS/X (92718-g092cb17983): https://www.osxexperts.net/
- Mac OS/X (92718-g092cb17983): https://evermeet.cx/ffmpeg/
- Windows 32-bit (20181217-f22fcd4): https://ffmpeg.zeranoe.com/builds/win32/static/
- Windows 64-bit (20181217-f22fcd4): https://ffmpeg.zeranoe.com/builds/win64/static/
For version updates, submit issue or pull request.
Upload new versions
In every updated platforms/*
directory:
npm run upload
See also
- node-ffprobe-installer - fork of this project that does the same thing for FFprobe
No vulnerabilities found.
Reason
Found 6/17 approved changesets -- score normalized to 3
Reason
binaries present in source code
Details
- Warn: binary detected: platforms/darwin-arm64/ffmpeg:1
- Warn: binary detected: platforms/darwin-x64/ffmpeg:1
- Warn: binary detected: platforms/linux-arm/ffmpeg:1
- Warn: binary detected: platforms/linux-arm64/ffmpeg:1
- Warn: binary detected: platforms/linux-ia32/ffmpeg:1
- Warn: binary detected: platforms/linux-x64/ffmpeg:1
- Warn: binary detected: platforms/win32-ia32/ffmpeg.exe:1
- Warn: binary detected: platforms/win32-x64/ffmpeg.exe:1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
license file not detected
Details
- Warn: project does not have a license file
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 20 are checked with a SAST tool
Reason
11 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97
- Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6
- Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj
Score
0.7
/10
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to @ffmpeg-installer/ffmpeg
@types/ffmpeg-installer__ffmpeg
TypeScript definitions for @ffmpeg-installer/ffmpeg
@ffmpeg-installer/linux-x64
Linux FFmpeg binary used by ffmpeg-installer
@ffmpeg-installer/win32-x64
Windows FFmpeg binary used by ffmpeg-installer
@ffmpeg-installer/linux-arm64
Linux FFmpeg binary used by ffmpeg-installer