Ffmpeg
Container
This container needs special attention. Please check https://hub.docker.com/r/linuxserver/ffmpeg for details.
Image details
Configuration
TypeContainerlinuxlinuxserver/ffmpeg:latest80:80/tcp/config : /srv/lsio/ffmpeg/configPUID=1000PGID=1000TZ=Etc/UTCunless-stoppedTemplate by technorabilia
Notes
Ensure to create the following volume directories on the host file system, or modify the paths in the volume mapping section under the advanced options below, as needed.
mkdir -p /srv/lsio/ffmpeg/config
Standalone Install
Select an install method, to see config/commands for deploying Ffmpeg
Install on Portainer
Import all app templates into your Portainer instance, for easy 1-click deploys
- Ensure both Docker and Portainer are installed, and up-to-date
- Log into your Portainer web UI
- Under Settings → App Templates, paste the below URL
- Head to Home → App Templates, and the list of apps will show up
- Select Ffmpeg, fill in any config options, and hit Deploy
Template Import URL
https://raw.githubusercontent.com/Lissy93/portainer-templates/main/templates.json
Show Me
More install options in our documentation.

The LinuxServer.io team brings you another container release featuring:
- regular and timely application updates
- easy user mappings (PGID, PUID)
- custom base image with s6 overlay
- weekly base OS updates with common layers across the entire LinuxServer.io ecosystem to minimise space usage, down time and bandwidth
- regular security updates
Find us at:
- Blog - all the things you can do with our containers including How-To guides, opinions and much more!
- Discord - realtime support / chat with the community and the team.
- Discourse - post on our community forum.
- Fleet - an online web interface which displays all of our maintained images.
- GitHub - view the source for all of our repositories.
- Open Collective - please consider helping us by either donating or contributing to our budget
linuxserver/ffmpeg
FFmpeg - A complete, cross-platform solution to record, convert and stream audio and video.

Supported Architectures
We utilise the docker manifest for multi-platform awareness. More information is available from docker here and our announcement here.Simply pulling
lscr.io/linuxserver/ffmpeg:latest should retrieve the correct image for your arch, but you can also pull specific arch images via tags.The architectures supported by this image are:
| Architecture | Available | Tag |
|---|---|---|
| x86-64 | ✅ | amd64-\ |
| arm64 | ✅ | arm64v8-\ |
| armhf | ❌ |
Usage
Unlike most of our container library this image is meant to be run ephemerally from the command line parsing user input for a custom FFmpeg command. You will need to understand some Docker basics to use this image and be familiar with how to construct an FFmpeg command. In the commands below we will be bind mounting our current working directory from the CLI to /config, the assumption is that input.mkv is in your current working directory.If an input file is detected we will run FFmpeg as that user/group so the output file will match its permissions. The image supports Hardware acceleration on x86 pay close attention to the variables for the examples below.
Included Intel Drivers (latest versions compiled):
- iHD Driver: Supports gen8+ (default for Intel)
- i965 Driver: Supports gen5+ (for gen5-gen9.5 it can be enabled by setting env var
LIBVA_DRIVER_NAME=i965in docker arguments) - Libva (VAAPI): Supports gen5+ with i965 driver and gen8+ with iHD driver
- Qsv Dispatcher: OneVPL (supports both OneVPL and MSDK runtimes and should automatically switch)
- Qsv Runtime:
* OneVPL: Supports gen12+
* MSDK (libmfx): Supports gen8 - gen12Basic Transcode
docker run --rm -it \
-v $(pwd):/config \
linuxserver/ffmpeg \
-i /config/input.mkv \
-c:v libx264 \
-b:v 4M \
-vf scale=1280:720 \
-c:a copy \
/config/output.mkvHardware accelerated (VAAPI) (click for more info)
docker run --rm -it \
--device=/dev/dri:/dev/dri \
-v $(pwd):/config \
linuxserver/ffmpeg \
-vaapi_device /dev/dri/renderD128 \
-i /config/input.mkv \
-c:v h264_vaapi \
-b:v 4M \
-vf 'format=nv12|vaapi,hwupload,scale_vaapi=w=1280:h=720' \
-c:a copy \
/config/output.mkvHardware accelerated (QSV) (click for more info)
docker run --rm -it \
--device=/dev/dri:/dev/dri \
-v $(pwd):/config \
linuxserver/ffmpeg \
-hwaccel qsv \
-c:v h264_qsv \
-i /config/input.mkv \
-c:v h264_qsv \
-global_quality 25 \
/config/output.mkvNvidia Hardware accelerated (click for more info)
Nvidia support requires Nvidia container toolkit and the Nvidia drivers installed on the host.docker run --rm -it \
--runtime=nvidia \
-v $(pwd):/config \
linuxserver/ffmpeg \
-hwaccel nvdec \
-i /config/input.mkv \
-c:v h264_nvenc \
-b:v 4M \
-vf scale=1280:720 \
-c:a copy \
/config/output.mkvVulkan support
Vulkan support has been added to x8664 (tested with Intel and AMD iGPU) (click for more info).docker run --rm -it \
--device=/dev/dri:/dev/dri \
-v $(pwd):/config \
-e ANV_VIDEO_DECODE=1 \
linuxserver/ffmpeg \
-init_hw_device "vulkan=vk:0" \
-hwaccel vulkan \
-hwaccel_output_format vulkan \
-i /config/input.mkv \
-f null - -benchmarkVulkan supports three drivers
- ANV: To enable for Intel, set the env var
ANV_VIDEO_DECODE=1 - RADV: To enable on AMD, set the env var
RADV_PERFTEST=video_decode - NVIDIA: To enable on Nvidia, install Nvidia Vulkan Beta drivers on the host per this article
Building locally
If you want to make local modifications to these images for development purposes or just to customize the logic:git clone https://github.com/linuxserver/docker-ffmpeg.git
cd docker-ffmpeg
docker build \
--no-cache \
--pull \
-t lscr.io/linuxserver/docker-ffmpeg:latest .The ARM variants can be built on x8664 hardware using
multiarch/qemu-user-staticdocker run --rm --privileged multiarch/qemu-user-static:register --resetOnce registered you can define the dockerfile to use with
-f Dockerfile.aarch64.Versions
- 05.08.26: - Rebase to Ubuntu Resolute. Bump ffmpeg to 9.0. Also bump harfbuzz, Intel drivers and libs, lame, libdav1d, libdovi, libvidstab, mesa, nvcodec, opus, rist, shaderc, srt, svtav1 and vulkan sdk.
- 25.06.26: - Bump ffmpeg to 8.1.2. Also bump aom, harfbuzz, libass, libdrm, libvmaf, mesa, rist and vulkan sdk.
- 02.05.26: - Bump ffmpeg to 8.1. Also bump aom, freetype, harfbuzz, Intel drivers and libs, libdovi, libdrm, libplacebo, libpng, mesa, rist, shaderc, srt, svtav1 and x265.
- 06.03.26: - Add support for SoX Resampler. Bump freetype, harfbuzz, Intel drivers and libs, libplacebo, libpng, mesa, shaderc, svtav1, vpx, vulkan-sdk and vvenc.
- 06.01.26: - Remove mpp from aarch64 build due to upstream DMCA removal. Bump harfbuzz, libdav1d, libdrm, libpng, libva, libvpl, mesa, opus, shaderc and vulkan-sdk.
- 01.12.25: - Bump ffmpeg to 8.0.1.
- 19.11.25: - Bump aom, freetype, harfbuzz, Intel drivers and libs, kvazaar, libdav1d, libdrm, mesa, mpp, openjpeg, shaderc, svt-av1 and vulkan-sdk.
- 23.08.25: - Bump ffmpeg to 8.0. Bump harfbuzz, Intel drivers and libs, libdovi, libdrm, libpng, mesa, ogg, rav1e, shaderc, svt-av1, vulkan-sdk, webp and zimg.
- 06.08.25: - Bump svt-av1.
- 07.06.25: - Bump harfbuzz, libass, libdovi, libplacebo, libpng, mesa, rav1e, shaderc, libvpx and vulkan-sdk.
- 04.06.25: - Add libdrm and rkmpp to arm64 image.
- 21.04.25: - Bump aom, Intel drivers and libs, harfbuzz, mesa, svt-av1, libvpx, libtheora, vulkan-sdk and vvenc.
- 07.03.25: - Bump ffmpeg to 7.1.1, Bump aom, fontconfig, Intel drivers and libs, harfbuzz, libdav1d, libdovi, libdrm, liblc3, libpng, mesa, openjpeg, shaderc, svt-av1, vulkan-sdk, vvenc and webp.
- 26.11.24: - Bump libaom, mesa, rist, srt and libx265.
- 07.11.24: - Bump harfbuzz, Intel drivers and libs, libdav1d, mesa, svtav1, vpx, vulkan sdk and vvenc.
- 05.10.24: - Add support for libvvenc on aarch64. Bump mesa.
- 30.09.24: - Bump ffmpeg for 7.1. Add support for libvvenc (amd64 only) and liblc3. Bump libfribidi and libharfbuzz.
- 24.09.24: - Let ffmpeg terminate gracefully on docker stop/restart. Bump libharfbuzz, libpng, mesa, shaderc and libx265.
- 09.09.24: - Add libzmq.
- 31.08.24: - Bump libaom, libdrm, libvpl, mesa and svtav1. Enable nvdec/nvenc on arm64 (untested).
- 17.08.24: - Bump ffmpeg, freetype, libdovi and mesa.
- 14.08.24: - Add SRT and libRIST.
- 01.08.24: - Add libdav1d. Bump libharfbuzz, various Intel drivers and libs, libass, libdrm, libplacebo, libva, mesa, svtav1, and vulkan sdk.
- 21.06.24: - Bump mesa and libaom. Update lib path for rav1e.
- 08.06.24: - Bump ffmpeg, fribidi, libdrm, mesa and vpx.
- 26.05.24: - Rebase to Ubuntu Noble. Bump libass, libharfbuzz and vulkan-sdk.
- 22.05.24: - Bump Mesa to 24.1.0.
- 20.05.24: - Bump libsvtav1.
- 09.05.24: - Bump libaom, fribidi, kvazaar, various Intel drivers and libs, Mesa, opus, shaderc, webp and x265.
- 11.04.24: - Explicitly disable libdrm on aarch64, add new lib
libxcb-shm0. Add quick test at the end of build. - 10.04.24: - Compile ffmpeg with
libfribidi,libharfbuzzandlibfontconfig, compile libharfbuzz. - 05.04.24: - Bump ffmpeg to 7.0, bump libdovi, libva, mesa and vulkan-sdk.
- 16.03.24: - Bump libaom, mesa, openjpeg, opus, shaderc and svtav1.
- 11.02.24: - Add Zimg support.
- 09.02.24: - Bump ffmpeg to 6.1.1, bump other deps.
- 08.02.24: - Enable cuda-llvm, clean up rustc.
- 01.02.24: - Bump Mesa to v24.
- 21.01.24: - Add alsa support.
- 18.01.24: - Let the wrapper pass the ffmpeg exit code to docker run. Bump various libs.
- 01.01.24: - Add rav1e support. Bump libaom, fdkaac, libdrm, libvmaf, libvpl, mesa and svt-av1.
- 06.12.23: - Add libplacebo and libdobi to x8664.
- 05.12.23: - Bump Mesa. Fix vdpau. Fix AMD VAAPI.
- 25.11.23: - Compile Mesa from source. Add proper Vulkan support (env var
ENABLE_VULKAN=trueno longer needed)(tested with Intel). - 22.11.23: - Add shaderc and (preliminary) Vulkan support (via env var
ENABLE_VULKAN=true) to x86
--enable-small from ffmpeg build options to add back some features.Serve Ffmpeg on your own domain behind Caddy, Nginx or Traefik. Fill in your domain and copy the result. It's a starting point, some apps need their own base URL or extra headers set too.
Proxying ffmpeg.example.com to http://Ffmpeg:80
Add this to your Caddyfile
ffmpeg.example.com {
reverse_proxy http://Ffmpeg:80
}Check the logs first
Nine times out of ten the logs tell you exactly what went wrong.
- In Portainer, go to Containers, click the container, then Logs. Or run
docker logs Ffmpeg - Exit codes help too:
137means killed, usually out of memory.126or127means the command inside the image is broken.
Port already in use
If deployment fails with "Bind for 0.0.0.0:80 failed: port is already allocated", something else on your server is using that port.
- Find what's using it:
sudo ss -tlnp | grep :80 - Stop the other service, or pick a different host port. In
80:80only the left number is yours to change, the right one belongs to the app.
Running but the page won't load
The container is up but nothing appears in your browser.
- Use your server's real IP:
http://your-server-ip:80. The 0.0.0.0 link Portainer shows isn't a real address. - Give it a minute after first deploy, Ffmpeg can take a while to initialise.
- Make sure your firewall allows the port, e.g.
sudo ufw allow 80
Permission denied on volumes
If the logs show "permission denied", the app can't write to its data folder on the host.
- Fix the ownership:
sudo chown -R 1000:1000 /srv/lsio/ffmpeg/config - Or set the
PUIDandPGIDvariables (defaults 1000:1000) to match your own user, found withid $USER
Image won't pull
Test the pull directly on the host: docker pull linuxserver/ffmpeg:latest
- "manifest unknown" means the tag no longer exists. This template uses
latest, so try pinning a specific version instead. - "toomanyrequests" is the Docker Hub rate limit. Log in with
docker loginto raise it. - "no space left on device" means a full disk. Reclaim space with
docker system prune
"exec format error"
This means the image was built for a different CPU architecture than your server.
- This image supports:
amd64, arm64 - Check yours with
uname -m: x86_64 is amd64, aarch64 is arm64. Raspberry Pi and other ARM boards are the usual culprits.
Container keeps restarting
The unless-stopped restart policy relaunches the app after every crash, so the real error can scroll past.
- Check the logs right after a restart, the last few lines before it died are the useful ones.
- Get the exit code with
docker inspect Ffmpeg --format '{{.State.ExitCode}}' - Still stuck? Redeploy once with the restart policy set to
noso the failure stays visible.
Raise an issue
Found something which isn't working as it should? Here's how to report it.
- Bug within the app: Open an issue within Ffmpeg's repo
- Template not working: Open an issue on technorabilia/portainer-templates
- This website not working: Open an issue on lissy93/portainer-templates
A single container
Ffmpeg runs as one container, the simplest kind of app here. Just the one image to pull and nothing else wired up alongside it.
The app image
An image is the app packed up ready to go, everything Ffmpeg needs bundled into one download. This template pulls linuxserver/ffmpeg:latest, which Docker fetches once (about 239 MB) and then starts your own copy from.
Where the image comes from
Docker pulls its images from registries, public libraries of ready-built apps. Ffmpeg's comes from Docker Hub, published by linuxserver.
Version tags
The bit after the colon in the image name is the version tag. Here it's latest, which always points at the newest build, so a redeploy can bump you to a newer release without you asking. Newest right now is 8.1.2. Pin a specific tag if you would rather stay on one version.
Which machines it runs on
Every image is built for particular CPU types. This one ships for amd64, arm64, so it runs on both regular x86 servers and ARM boards like a Raspberry Pi.
Ports
A port is the door the app answers on. A mapping like 80:80 means it's reachable on port 80 of your server, where the left number is yours to change and the right one belongs to the app. Once it's running, open http://your-server-ip:80 in a browser. It opens:
80:80, likely the web interface
Volumes
A volume is where Ffmpeg keeps its files so they survive an update or a restart. Without one, anything it saves would sit inside the container and vanish the moment it's recreated. This template mounts:
/configfrom/srv/lsio/ffmpeg/configon the host
Environment variables
Environment variables are the settings you hand over when you deploy, things like a password or a timezone. Ffmpeg takes 3 of them, all with defaults you can leave alone or tweak:
PUID, defaults to1000. Run 'id [USER]' for the owner of the host volume directories to get the UID to use here.PGID, defaults to1000. Run 'id [USER]' for the owner of the host volume directories to get the GID to use here.TZ, defaults toEtc/UTC. Specify a timezone to use, see this list.
Restart policy
The restart policy here is unless-stopped, so Docker restarts Ffmpeg after a crash or reboot, but leaves it off when you stop it on purpose. You can change this on the deploy screen. The choices are no (never restart), on-failure (only after a crash), unless-stopped (restart unless you stop it), and always (bring it back no matter what).
Users and permissions
The PUID and PGID settings tell it which user and group to act as on your host. Point them at your own account (find yours with id $USER) so the files it writes into your mounted folders come out owned by you rather than root.
Networking
Nothing custom is set, so Ffmpeg sits on Docker's default bridge network: its own private space that reaches the outside world only through the ports it publishes.
Container name
Once it's deployed, Portainer names the container Ffmpeg. That's what you'll spot in the containers list and use in commands like docker logs Ffmpeg.
Platform
The platform is linux, the kind of system the container is built to run on. Docker and Portainer handle this on a normal Linux server.
Portainer app templates
Zooming out, this whole page comes from a Portainer app template: a short recipe telling Portainer how to set Ffmpeg up. Add the template list to Portainer once, then deploying Ffmpeg is a click rather than a wall of config.