Process audio and video with FFmpeg, ffprobe, Python, and uv.
100
Process audio and video with FFmpeg, ffprobe, Python, and uv.
This image combines Python with a current stable FFmpeg build. It includes
ffmpeg, ffprobe, and support for x264, LAME MP3, Opus, and VP8/VP9 through
libvpx. Use it for media conversion and Python scripts that inspect media.
The working directory is /workspace. The default command starts Bash.
The image does not include ffplay.
| Tag | Meaning | Platform |
|---|---|---|
latest | Latest successful build from main. | linux/amd64 |
View all tags on Docker Hub.
The latest tag changes when a new build passes its tests.
docker pull stden/python-media:latest
Run from a directory that contains input.wav:
docker run --rm -v "$PWD":/workspace stden/python-media:latest \
ffmpeg -i input.wav -c:a libmp3lame output.mp3
docker run --rm -v "$PWD":/workspace stden/python-media:latest \
ffmpeg -i input.wav -c:a libopus output.ogg
Convert a video to H.264 with AAC audio:
docker run --rm -v "$PWD":/workspace stden/python-media:latest \
ffmpeg -i input.mov -c:v libx264 -c:a aac output.mp4
Output files remain in the mounted host directory. Use a new output file name
for each command, or add -y when you want to replace an existing output file.
docker run --rm -v "$PWD":/workspace stden/python-media:latest \
ffprobe -v error -show_streams -show_format -of json output.mp4
Run a Python script in the same environment:
docker run --rm -v "$PWD":/workspace stden/python-media:latest \
python inspect_media.py
Install extra Python libraries in a child image that starts with
FROM stden/python-media:latest. The image provides command-line media tools;
project-specific Python media libraries must be installed separately.
The smoke test generates audio, encodes it as Opus, and decodes it to PCM. Python checks the codec, duration, channel count, sample rate, and audio data.
Content type
Image
Digest
sha256:1ad787b32…
Size
453.7 MB
Last updated
1 day ago
docker pull stden/python-media