mpeg video


sequence header

this contains information related to one or more "group-of-pictures"

byte# data details
===================================================================
1-4 sequence header in hex 000001b3
code
12 bits horizontal size in pixels
12 bits vertical size in pixels
4 bits pel aspect ratio see below
18 bits picture rate see below
1 bit marker bit always 1
10 bits vbv buffer size minimum buffer needed to decode this
sequence of pictures; in 16kb units
1 bit constrained
parameter flag
1 bit load intra 0: false; 1: true (matrix follows)
quantizer matrix
64 bytes intra quantizer optional
matrix
1 bit load nonintra 0: false; 1: true (matrix follows)
quantizer matrix
64 bytes nonintra quantizer optional
matrix
- squence extension optional
data
- user data optional application-dependent data
===================================================================

aspect raios are defined by a code which represents the height and
width of the video image.
picture rates are also defined by a code that represents the number
of pictures that may be displayed each second.

each group of pictures has a header that contains one "i picture"
and zero or more b and p pictures. the header is concerned with
the time synchronisation for the first picture in this group, and
the closeness of the previous group to this one.

/*****************************************************************/

for picture rate:
1 = 23.976 frames/sec
2 = 24
3 = 25
4 = 29.97
5 = 30
6 = 50
7 = 59.94
8 = 60

here gives an example. below is hex dump of first 256 bytes of
the first video frame of test.mpg from xingmpeg.

00 00 01 b3 16 00 f0 c4 02 a3 20 a5 10 12 12 14
14 14 16 16 16 16 18 18 19 18 18 1a 1b 1b 1b 1b
1a 1c 1d 1e 1e 1e 1d 1c 1e 1f 20 21 21 20 1f 1e
21 23 23 24 23 23 21 25 26 27 27 26 25 29 2a 2a
2a 29 2d 2d 2d 2d 30 31 30 34 34 38 16 00 f0 c4
00 00 01 b8 00 08 00 00 00 00 01 00 00 0a 72 00
00 00 01 01 13 f9 50 02 bc b2 b8 be 68 8b a4 9f
c5 b5 ca 00 56 76 39 65 f2 30 8b a6 9d 50 69 e7
da fe 13 cf b7 ff 8f f4 ce 7b fa 0e f0 66 ae 1c
5d e7 00 c8 0a 92 b9 29 3c 21 23 f1 d6 40 13 06
f0 10 10 c6 27 80 a0 34 e1 c8 e4 0f 74 91 da c4
03 a0 dc 03 12 60 18 49 27 1d d4 bc 67 0e 54 8c
96 fc 5d c0 06 e0 1a 72 11 7c 9a 8d c9 45 89 6d
cd c4 0b 63 dc 90 18 24 00 ec 84 90 18 10 c9 3b
1e a7 60 3c 9d 74 80 76 05 0b 02 81 a9 29 39 68
53 8f 59 f1 bf 93 fb a0 04 01 bc b0 ce 18 e1 25

sequence header = (hex) 00 00 01 b3
horizontal size = 0x160 = 352
vertical size = 0x0f0 = 240
pel aspect ratio = [i don't know]
picture rate = 4 = 29.97 frames/sec
marker bit = 1