-
Notifications
You must be signed in to change notification settings - Fork 16
Description
Hi !
I see a lot of people struggling with missing FFmpeg / FFprobe installations (#5, #6, #11, #13), with the solution to install those on the related environment manually. This works but can get tedious when working with CI/CD & multiple environments / OSs, & also requires an extra manual installation step.
Having faced the problem myself, I thought I might share the following packages, which are platform independent installers for FFmpeg & FFprobe:
- https://www.npmjs.com/package/@ffmpeg-installer/ffmpeg
- https://www.npmjs.com/package/@ffprobe-installer/ffprobe
All you need to do is add those as dependencies:
npm i @ffmpeg-installer/ffmpeg @ffprobe-installer/ffprobe
And following fluent-ffmpeg's documentation, you can then set FFmpeg & FFprobe paths as follows:
const ffmpeg = require('fluent-ffmpeg');
const ffmpegPath = require('@ffmpeg-installer/ffmpeg').path;
const ffprobePath = require('@ffprobe-installer/ffprobe').path;
ffmpeg.setFfmpegPath(ffmpegPath);
ffmpeg.setFfprobePath(ffprobePath);
@irvingswiftj I think those could be directly used in this project & added as dependencies (like in get-video-duration
for example), in order for its installation to be easier, what do you think ? At least, this might be worth mentioning in the project's documentation.
Anyway, thanks a lot for your work ! Cheers !