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.
1 curtida
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.
2 curtidas
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.
love it. i started using ffmpeg recently. though self-hosted. Im going to start rolling out videos and posts here of my work. Social media stuff. but ffmpeg a must have. I learned early on to download all media files that ffmpeg will pick up and edit - never input a url. And I run right in code node if needed, no problem. Has enough resources with a couple env settings allowed for it. like N8N_RUNNERS_MAX_OLD_SPACE_SIZE
I was able to update to the latest version recently. Here is the Dockerfile I’m using:
# STAGE 1: We bring in the static FFmpeg binaries from a specialized image
FROM mwader/static-ffmpeg:6.0 AS ffmpeg-source
# STAGE 2: We used the latest official (distro-less) version of n8n
FROM n8nio/n8n:2.28.6
# We temporarily switched to root to be able to copy files to system folders
USER root
# We copy the FFmpeg and FFprobe binaries from the first stage to the n8n path
COPY --from=ffmpeg-source /ffmpeg /usr/local/bin/ffmpeg
COPY --from=ffmpeg-source /ffprobe /usr/local/bin/ffprobe
# We are restoring permissions to the default n8n user for security reasons
USER node
Then, build your new custom image:
$ docker build -t n8n-custom:2.28.6 .
Finally, use this custom image on your docker-compose file:
services:
n8n:
image: n8n-custom:2.28.6
. . .
It’s working in production without any problems. Furthermore, this same procedure can be used to add any other tool not pre-installed in the official n8n Docker image. Also tested on version 1.123.63
1 curtida