Container Format
Container Format (Multimedia Wrapper)
A file format that acts as a wrapper to hold one or more video, audio, subtitle, and metadata streams together in a single file, independent of the codecs used to encode those streams.
技術的詳細
Common containers include MP4 (MPEG-4 Part 14, based on Apple's QuickTime .mov, most universal), WebM (Matroska subset for web, VP8/VP9/AV1 video, Vorbis/Opus audio), MKV (Matroska, supports virtually any codec), AVI (legacy Microsoft, limited metadata), and TS (MPEG Transport Stream, used in broadcasting and HLS streaming). Containers define how streams are multiplexed (interleaved), synchronized, and indexed for seeking. The container's index (moov atom in MP4, Cues in MKV) enables fast seeking without scanning the entire file. Browser container support varies: MP4 and WebM are universally supported; MKV and AVI are not.
例
```html <!-- Container Format: HTML5 video with format fallback --> <video controls preload="metadata"> <source src="video.webm" type="video/webm; codecs=vp9,opus"> <source src="video.mp4" type="video/mp4"> Your browser does not support HTML5 video. </video> ```