Video Stream Start Codes for Different Codecs
Start Code Prefix (SCP) H.264 and MPEG-4 Stream contain various codes that are identified by a common 3 byte string = 0x 00 00 01 H.264 SCP Identifies beginning of NAL Unit. Stream Structure: 1. NAL Unit Code - 1 byte 2. NAL Unit Data Anatomy of 1 byte = 8 bits of NAL Unit Code: 1 Bit - Always zero 2 Bits - 0 for non ref frames. Non zero for SPS, PPS and Ref frame. 5 bits - NAL Unit Type. 1 - Non IDR, 5 - IDR, 7 - SPS, 8 - PPS. Typical NAL Unit Codes: x7- SPS x8 - PPS x5 - IDR x1- Reference P 01 - Non ref P Note: x is non zero Typical Stream: 00 00 00 01 67 (SPS) 42 00 1E AA 40 28 02 DC 80 00 00 00 01 68 (PPS) CE 38 80 00 00 00 01 65 (IDR) 88 ..... 00 00 01 41 (Non IDR Ref) 9A 44 .... MPEG-4 Stream Struct: 1. Video object start code - 00 through 1F 2. Video object layer start code - 20 through 2F 3. Video Object Layer Info - Length and value depends upon content 3. vop start code - B6 4. VOP Info Typical MP-4 Bitstream: 00 00 01 00 (vo Start) 00 00 01 20 (vol start) 00 C8 89 80 0C C9 1...