ffmpeg commands
Conversion
The scripts in this folder change how a file is packaged or encoded rather than what it shows: rewrapping a container without touching the streams, or re-encoding to a different codec for a specific destination. Most of them prepare video for web pages: a lossless faststart remux, maximum-compatibility H.264 MP4s at the source size or a fixed 600×600, and an Ogg Theora fallback. The Xvid round trip is the exception: it degrades a clip on purpose for a lo-fi compression look.
Remux to MP4 with the moov atom at the front (faststart)
remux-faststart.sh
Rewraps a QuickTime/MP4 file without re-encoding and moves the index (the moov atom) to the start of the file, so browsers can begin playback before the whole file has downloaded. Fast and lossless: only the container changes, every audio and video packet is copied as-is.
Maximum-compatibility web MP4 at the source's own size
web-mp4-baseline-keep-size.sh
Re-encodes for playback almost anywhere (H.264 Baseline, 4:2:0, AAC, faststart) without resizing: for when the frame size is already right and only the encoding needs fixing, e.g. iPhone HEVC or ProRes exports headed for a web page.
Square 600×600 web MP4: H.264 Baseline with loudness-normalized mono audio
web-mp4-square-600.sh
A maximum-compatibility MP4 for embedding on web pages: Baseline profile at level 3.1 decodes on almost any device, mono AAC at 44.1 kHz keeps the audio small, and loudnorm evens out the volume between clips.
Ogg Theora/Vorbis video (open-format HTML5 fallback)
web-ogv-theora-vorbis.sh
Encodes an .ogv for the <video> element in browsers that historically didn't ship H.264. Today WebM (VP9 or AV1) is the usual open-format choice, but Theora still plays in every major browser and is handy for matching older sites built around it. Pairs with web-mp4-square-600.sh.
Crush a clip through Xvid, then back to H.264
xvid-roundtrip-crush.sh
A generation-loss look: encoding to MPEG-4 Part 2 at ffmpeg's low default bitrate (200 kb/s) bakes in blocky early-2000s compression artifacts. The second pass re-encodes that damaged video to H.264 so it can be shared, keeping the artifacts intact.
Source: lucidbeaming/ffmpeg-utilities/conversion at v1.0.1