Add ffmpeg to n8n docker image

The idea is:

To include the ffmpeg package pre-installed in the official n8n Docker image. Currently, users who need to process audio or video files must create a custom Dockerfile (extending the official image) or install it manually every time the container restarts, which is inefficient and adds unnecessary complexity to the deployment.

My use case:

I use n8n to automate media workflows. Specifically, when a file is received via a webhook or downloaded from a cloud storage service, I need to:

  • Convert audio formats (e.g., .ogg to .mp3) for better compatibility.
  • Extract audio from video files.
  • Compress or resize videos before uploading them to social media or sending them via messaging apps (like Telegram or WhatsApp).
  • Generate thumbnails from video files.

Currently, I have to maintain a custom Docker image just to have access to the ffmpeg binary within the Execute Command node.

I think it would be beneficial to add this because:

  • Media Processing is Common: As AI and multimedia automation grow (transcriptions, auto-editing, etc.), ffmpeg has become an essential tool for many n8n users.
  • Lower Entry Barrier: It eliminates the need for users to learn how to build custom Docker images or manage persistent binary installations.
  • Small Footprint vs. High Value: While it adds a bit to the image size, the utility it provides for “Execute Command” nodes is massive compared to the overhead.
  • Consistency: It ensures that workflows involving media processing are portable and work out-of-the-box across different environments (local, VPS, Cloud).

Any resources to support this?

  • FFmpeg Official Site: https://ffmpeg.org/
  • Alpine Linux Package (for the Alpine image): apk add ffmpeg
  • Debian/Ubuntu Package: apt-get install ffmpeg

Are you willing to work on this?

I can make the neccesary changes and create a MR on Github.

Just to add some context: I’ve been running a custom n8n Docker image with ffmpeg pre-installed in a production environment for about a year now. It has been working flawlessly, handling multiple media conversion tasks daily without any stability issues or performance overhead on the core n8n process. It’s a battle-tested setup that would bring a lot of value to the community if made official.

1 Like

Can you please help me with the latest update. I tried everything every video on youtube but no luck

Hello @Abhijeet_Singh , nice to meet you.

We’re currently working with version 1.123.18, so I don’t have much experience with version 2 yet, as we haven’t migrated. I suggest you post your question in a separate thread so other members of this community can help you. Best regards.