A lightweight Docker container for running FFmpeg commands.
This container provides a ready-to-use FFmpeg environment for video and audio processing. It's built on Alpine Linux to maintain a small footprint while including common FFmpeg codecs and tools.
Pull and run the container:
docker pull onerahmet/ffmpeg
docker run --rm -v "$(pwd):/workspace" onerahmet/ffmpeg -i input.mp4 output.mp4
The -v "$(pwd):/workspace" flag mounts your current directory to /workspace inside the container, allowing FFmpeg to access your local files.
docker run --rm -v "$(pwd):/workspace" onerahmet/ffmpeg -i input.mp4 output.mkv
docker run --rm -v "$(pwd):/workspace" onerahmet/ffmpeg -i input.mp4 -vn -acodec libmp3lame output.mp3
docker run --rm -v "$(pwd):/workspace" onerahmet/ffmpeg -i input.mp4 -c:v libx264 -crf 23 -preset medium -c:a aac output.mp4
docker run --rm -v "$(pwd):/workspace" onerahmet/ffmpeg -i input.mp4 -ss 00:00:01 -vframes 1 -q:v 2 thumbnail.jpg
The container requires specifying an FFmpeg version during build:
docker build --build-arg FFMPEG_VERSION=n7.1 -t onerahmet/ffmpeg:7.1 .
Available versions can be found in FFmpeg's release tags. For example:
Note: The FFMPEG_VERSION build argument is required. The build will fail if not provided.
/workspace directory inside the containerThis project is licensed under the MIT License - see the LICENSE file for details.
This container packages FFmpeg, a complete, cross-platform solution to record, convert and stream audio and video. FFmpeg is licensed under the LGPL v2.1+ License.
FFmpeg is a trademark of Fabrice Bellard, originator of the FFmpeg project.
Content type
Image
Digest
sha256:4a07025b6…
Size
418.4 MB
Last updated
over 1 year ago
docker pull onerahmet/ffmpeg