Home / Understanding video codecs and containers

Understanding video codecs and containers

MP4 and WebM are containers. H.264, VP9 and AAC are codecs inside them. A matching extension does not prove the file will decode.

A container holds tracks, timestamps and metadata. The codec is the compression of each track. An MP4 can contain a video codec this WASM build cannot read. The tool then fails instead of pretending the extension was enough.

The single-thread core used here is the GPL build of ffmpeg.wasm 0.12.10. Output to MP4 uses libx264 when that encoder is present. WebM uses VP9. GIF is a separate, limited path because GIF frames get large quickly.

Multi-thread WASM needs cross-origin isolation. This site does not set those headers globally, so ad and consent scripts are not broken by SharedArrayBuffer requirements.