- values use big endian (network) byte/bit order
- general terms: integer = signed value
- general values: byte = 8-bit value; short/word = 16-bit value; long = 32-bit value
- fixed point values: value made up of an integer for whole numbers and an unsigned value for the decimal
- octal values: base-8 long unsigned values (values containing 8 and 9 are invalid)
System Multiplex or Elementary Video v1 MIME="video/mpeg"
System Multiplex or Elementary Video v2 MIME="video/mpeg2"
Elementary Audio MIME="audio/mpeg"
System Multiplex or Elementary Video/Audio Mac OS Type = "MPEG"
Elementary Audio layer/level III Mac OS Type = "MPG3"; QuickTime Mac OS Creator = "TVOD"
Developed for the compressing of moving pictures and associated audio and then the
combining of one or more elementary streams of video and audio, as well as, other
data into single or multiple streams which are suitable for storage or
transmission. This is specified in two forms: the Program Stream and the
Transport Stream. Each is optimised for a different set of applications such as
ATM networks, Video CDs, DBS, C-Band, SD-TV, HD-TV, DVD, etc.
ISO/IEC 11172-2 supports a maximum bit rate of 1.5 Mbits/sec (187.5 kB/sec).
ISO/IEC 13818-2 levels support bit rates from 3 Mbits/sec (375 kB/sec)
to 15 Mbits/sec (1.875 MB/sec).
ISO/IEC 14496-2 (MPEG-4 video) supports scalable bit rates from 10 kbits/sec (1.25 kB/sec)
to 6 Mbits/sec (750 kB/sec).
ISO/IEC 11172-1/13818-1 SYSTEM MULTIPLEX PROGRAM/TRANSPORT PACKETS/BLOCKS AND HEADER
- NOTE: a transport system multiplex retransmits header info more frequently for recovery
from data loss. Program streams are stored streams so this isn't necessary.
-> 4 bytes pack header start code = long hex value of 0x000001BA
-> 8 bits v1 pack header = byte clock and multiplex pack rate bit info
OR
-> 12 bits v2 pack header = 1 1/2 bytes clock and multiplex pack rate with extension bit info
- NOTE: pack header appears more than once
-> 4 bytes system header start code = long hex value of 0x000001BB
-> 16 bits packetized elementary stream length = short unsigned size of start code packet/block
-> variable bits system header = multiplex system bit info
- NOTE: only one system header per file bit stream
-> 4 bytes optional stream gap identifier = long hex value of 0x00000000
-> 10 bits stream gap = 1 1/4 bytes padding set to zero
- NOTE: can appear more than once or not at all
-> 4 bytes optional padding packet/block start code = long hex value of 0x000001BE
-> 16 bits packetized elementary stream length = short unsigned size of start code packet/block
-> variable bits padding = multiplex padding bits set to 1
- NOTE: can appear more than once or not at all
-> 4 bytes optional private 1 packet/block start code = long hex value of 0x000001BD
-> 16 bits packetized elementary stream length = short unsigned size of start code packet/block
-> 96 bits MPEG-1 PES header = 12 bytes PES bit info
OR
-> 24 - 392 bits MPEG-2 PES header = short PES bit info + byte unsigned PES header size + optional PES timecode/info
-> variable bits video sub-pictures = video sub-pictures bit data
-> 4 bytes optional private 2 packet/block start code = long hex value of 0x000001BF
-> 16 bits packetized elementary stream length = short unsigned size of start code packet/block
-> variable bits navigation = audio/video navigation bit info
-> 4 bytes optional audio 0 - 31 packet/block start code = long hex value of 0x000001C0 - 0x000001DF
-> 16 bits packetized elementary stream length = short unsigned size of start code packet/block
-> 96 bits MPEG-1 PES header = 12 bytes PES bit info
OR
-> 24 - 392 bits MPEG-2 PES header = short PES bit info + byte unsigned PES header size + optional PES timecode/info
-> variable bits elementary audio payload = elementary audio packets
- NOTE: audio packets/blocks appear more than once. DVD uses only audio 0 - 7 packets/blocks.
-> 4 bytes optional video 0 - 15 packet/block start code = long hex value of 0x000001E0 - 0x000001EF
-> 16 bits packetized elementary stream length = short unsigneed size of start code packet/block
-> 96 bits MPEG-1 PES header = 12 bytes PES bit info
OR
-> 24 - 392 bits MPEG-2 PES header = short PES bit info + byte unsigned PES header size + optional PES timecode/info
-> variable bits elementary video payload = elementary video header + other video start codes
- NOTE: video packets/blocks appear more than once. VCD/DVD uses only video 0 packets/blocks.
- NOTE: generally one packet/block contains at least one frame of video.
-> 4 bytes stream end start code = long hex value of 0x000001B9
- NOTE: only one stream end to terminate file bit stream
ISO/IEC 11172-2/13818-2 ELEMENTARY VIDEO HEADER
-> 4 bytes video sequence start code = long hex value of 0x000001B3
-> 12 bits horizontal pixels = 1 1/2 bytes unsigned video size
-> 12 bits vertical pixels = 1 1/2 bytes unsigned video size
-> 4 bits pixel aspect ratio = 1/2 byte unsigned aspect type
- v1 types are Reserved = 0; 1:1 = 1; 0.6735 = 2; 0.7031 = 3
- v1 types are 0.7615 = 4; 0.8055 = 5; 0.8437 = 6; 0.8935 = 7
- v1 types are 54:59 PAL = 8; 0.9815 = 9; 1.0255 = 10; 1.0695 = 11
- v1 types are 11:10 NTSC = 12; 1.1575 = 13; 1.2015 = 14; Reserved = 15
- v2 types are Reserved = 0; 1:1 = 1; 4:3 = 2; 16:9 = 3; 2.2:1 = 4
- v2 types are Reserved or v1 type = 5 - 15
-> 4 bits frame rate = 1/2 byte unsigned fps type
- types are Reserved = 0; 23.976 frames/sec = 1; 24 frames/sec = 2
- types are 25 frames/sec = 3; 29.97 frames/sec = 4; 30 frames/sec = 5
- types are 50 frames/sec = 6; 59.94 frames/sec = 7; 60 frames/sec = 8
- types are Reserved = 9 - 15
-> 18 bits picture rate = 2 1/4 bytes unsigned data bit rate in 400 bps units
-> 1 bit header marker flag = 1/8 byte boolean value
-> 10 bits VBV buffer size = 1 1/4 bytes unsigned decompression buffer in 16,000 byte units
-> 1 bit constrained parameter flag = 1/8 byte boolean value
-> 1 bit load intra quantizer matrix flag = 1/8 byte boolean value
-> 64 byte quantizer table - only if above is true otherwise no values
-> 1 bit load intra non quantizer matrix flag = 1/8 byte boolean value
-> 64 byte quantizer table - only if above is true otherwise no values
-> Continues with other MPEG video start codes and associated data like GOPs, slices and pictures
- NOTE: only one video header per file bit stream