lsiobase/ffmpeg
The LinuxServer.io team brings you another container release featuring :-
Find us at:
FFmpeg - A complete, cross-platform solution to record, convert and stream audio and video.
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-<version tag> |
arm64 | ✅ | arm64v8-<version tag> |
armhf | ✅ | arm32v7-<version tag> |
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 it's permissions. The image supports Hardware acceleration on x86 pay close attention to the variables for the examples below.
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.mkv
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.mkv
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.mkv
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 linuxserver/ffmpeg:latest .
The ARM variants can be built on x86_64 hardware using multiarch/qemu-user-static
docker run --rm --privileged multiarch/qemu-user-static:register --reset
Once registered you can define the dockerfile to use with -f Dockerfile.aarch64
.
docker pull lsiobase/ffmpeg