Encodes an .ogv for the
The command
ffmpeg -i input.mp4 \
-c:v libtheora -q:v 5 \
-vf scale=600:600 \
-af loudnorm \
-c:a libvorbis -q:a 4 -ar 44100 \
output.ogv What each part does
-c:v libtheora -q:v 5 Theora at quality 5 (scale 0–10, higher = better)
-vf scale=600:600 resize to 600×600 (stretches non-square sources)
-af loudnorm EBU R128 loudness normalization
-c:a libvorbis -q:a 4 Vorbis VBR quality 4 (about 128 kb/s)
-ar 44100 44.1 kHz audio When to use it
This is useful when a page needs an .ogv source, typically an older site whose <video> markup was built around Theora, or to sit alongside an MP4 from web-mp4-square-600.sh as the open-format fallback. For new work, WebM (VP9 or AV1) is the usual open-format choice. The header explains each flag.
The scale is fixed at 600×600, so it suits square sources. Anything else gets stretched rather than cropped or padded.
Useful variations:
- Change
600:600to match the dimensions your page expects. - Raise or lower
-q:v 5(0–10, higher is better) to trade size for quality. - Adjust
-q:a 4for Vorbis, where 4 is about 128 kb/s.
If the picture looks squashed or stretched, the source wasn't square. If the audio level differs noticeably from the original, that's loudnorm working as intended. If ffmpeg reports an unknown encoder, your build lacks libtheora or libvorbis.
Notes
- Source
- ffmpeg-utilities/ogg-mp4-jpg-600.sh (also vector copy.sh, vector copy 2.sh)
- Changed
- -codec:v/-codec:a → -c:v/-c:a; -qscale:v/-qscale:a → -q:v/-q:a; -filter:a → -af