All posts
AVIF to JPEG via CLI
Decode an AVIF still with ffmpeg and write a JPEG.
Open online converterPackages to install
Only ffmpeg is required. AV1 stills in AVIF decode to a single JPEG frame.
ffmpeg
sudo apt-get update
sudo apt-get install -y ffmpegHow to run the command
ffmpeg -i photo.avif -frames:v 1 -update 1 -q:v 2 photo.jpeg. -q:v 2 keeps JPEG quality high; raise it to shrink the file.
ffmpeg -y -i photo.avif -frames:v 1 -update 1 -q:v 2 photo.jpegDockerfile example
Build a minimal Ubuntu image with the required packages and run the conversion inside the container.
FROM ubuntu:24.04
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ffmpeg && \
rm -rf /var/lib/apt/lists/*
WORKDIR /work
docker build -t avif-to-jpeg .
docker run --rm -v "$PWD:/work" -w /work avif-to-jpeg \
ffmpeg -y -i photo.avif -frames:v 1 -update 1 -q:v 2 photo.jpegExample commands
Run these locally after installing the packages, or inside the container from the Dockerfile.
ffmpeg -y -i photo.avif -frames:v 1 -update 1 -q:v 2 photo.jpegffmpeg -y -i screenshot.avif -frames:v 1 -update 1 -q:v 2 screenshot.jpg