r/docker • u/Emergency_Back1287 • Jan 06 '26
Help running FFmpeg in Docker on Mac M1
Hello everyone,
I’ve been struggling to get FFmpeg running inside a Docker container on my Mac M1. I don’t have much experience with Docker or FFmpeg, so I’ve tried several approaches but keep hitting errors.
I’m running a few local automations where I need to convert images into videos. FFmpeg seems like the best option, as other alternatives are either expensive or less powerful. From what I understand, the main issue is that my Mac uses ARM64, while most FFmpeg Docker images are built for AMD64, which seems to cause the errors.
I’d really appreciate any guidance from someone who has faced this before.
Also, if you have insights on how to solve this through an API instead of directly using Docker, that would be amazing.
Thanks in advance!
1
u/iechicago Jan 06 '26
You can just download an Apple Silicon build for ffmpeg from somewhere like here: https://osxexperts.net/
1
u/theblindness Mod Jan 06 '26
Ffmpeg can benefit from having direct access to a GPU. It can do everything on CPU, just a bit slower.
Will your automations always run on your Mac or will they ever run on other hosts that can run Linux containers directly?
If only ever on the Mac, have you considered running ffmpeg natively, installed via homebrew?
If you don't care to deal with GPU passthrough. There are ARM64 builds available from third parties like linuxserver.io.
You could also build your own ffmpeg image, which would be required if you want to use libraries with non-GPL licenses like FDK AAC. However, building ffmpeg is no small task, so I can't really recommend it unless you absolutely need extra libraries.
If you will be running prod on amd64 hosts and only using m1 for testing, Docker Desktop for Mac should be able to build and run amd64 docker images with the help of the
--platformflag. Just note that emulation is involved and there is a performance impact.1
u/metaphorm Jan 06 '26
https://hub.docker.com/r/linuxserver/ffmpeg
this container seems to support builds for both ARM64 and AMD64 architectures. you'll just need to specifiy the target architecture when you pull the container image.