Skip to content

Avoid manual installation of FFmpeg & FFprobe #14

@mcottret

Description

@mcottret

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:

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 !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions