kribblo / node-ffmpeg-installer

Platform independent binary installer of FFmpeg for node projects
https://www.npmjs.com/package/@ffmpeg-installer/ffmpeg
417 stars 70 forks source link

Does not work in Node Docker container #76

Open Gmanicus opened 11 months ago

Gmanicus commented 11 months ago

Installing fluent-ffmpeg, ffmpeg-installer, and ffprobe-installer in an Docker container running a Node 18 image does not work. It immediately throws an error, ffmpeg was killed with signal SIGSEGV, when running any ffmpeg command.

The ffmpeg script I used:

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);

Works great locally.

mithiridi commented 3 months ago

@Gmanicus were you able to fix this issue ? Please do let me know i am also facing the same issue

Gmanicus commented 3 months ago

Hey @mithiridi! Yes, indeed I was. Turns out, ffmpeg is available via package managers. I was able to add a command to the dockerfile as such to install it on the system: RUN apt-get install ffmpeg -y

If you are also using fluent-ffmpeg, it should pick up the installation automatically.