Overview of Video Container Formats and H.264 Encoding
The article outlines how video container formats such as AVI, MOV, MP4, WMV, RM, FLV and MKV package encoded streams, then explains H.264 encoding fundamentals—including I‑, P‑, B‑frames, macroblocks, GOP structure, and NAL units like SPS and PPS that define parameters for efficient compression and transport.
This article explains the role of video container formats, which package encoded video and audio streams into a single file, acting as a wrapper for multimedia data.
It surveys common containers: AVI (Audio Video Interleaved) known for good quality but large size; QuickTime (.MOV) with high compression and alpha channel support; MPEG family (.MPG, .MPEG, .MP4, etc.) as an international standard; WMV (.WMV, .ASF) suited for network streaming but requiring Windows Media Player; Real Video (.RM, .RMVB) offering low‑bitrate streaming; Flash Video (.FLV) widely used on web sites; and Matroska (.MKV), an open‑source container that can hold multiple video, audio and subtitle tracks.
Video encoding compresses raw pixel data to reduce file size. H.264 is the most widely used codec, employing intra‑frame prediction, inter‑frame prediction (motion estimation/compensation), integer DCT, and CABAC entropy coding.
Compressed frames are classified as I‑frames (key frames using intra prediction), P‑frames (forward‑referenced frames), and B‑frames (bidirectionally referenced frames). Groups of pictures (GOP) consist of the frames between two I‑frames, containing only one I‑frame per GOP.
Encoding works on macroblocks (typically 16×16 pixels, down to 4×4). Prediction uses neighboring pixels; motion vectors are found by searching reference frames within a search window.
The H.264 stream is divided into the NAL (Network Abstraction Layer) and VCL (Video Coding Layer). NAL handles packetization for transport (e.g., using start codes 00 00 00 01 or 00 00 00 00 01 to delimit NAL units). Important NAL unit types include SEI ( 00 00 00 01 06 ), SPS ( 00 00 00 01 67 ) which holds global parameters such as profile_idc and level_idc, and PPS ( 00 00 00 01 68 ) storing picture‑specific info like width and height.
DeWu Technology
A platform for sharing and discussing tech knowledge, guiding you toward the cloud of technology.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.