libextractor

GNU libextractor
Log | Files | Refs | Submodules | README | LICENSE

MPEG.txt (3254B)


      1 From: Wilson Woo <wilson00@HK.Super.NET>
      2 To: submit@wotsit.demon.co.uk
      3 Subject: MPEG Video
      4 
      5 THIS TEXT CONTAINS ONLY MPEG VIDEO HEADER INFO - BY WILSON WOO
      6 It's only what I know. Please feel free to update it.
      7 
      8 Below is information got from someone.
      9 
     10 /*****************************************************************/
     11 
     12 Sequence Header
     13 
     14 This contains information related to one or more "group-of-pictures"
     15 
     16 Byte#      Data                Details
     17 ===================================================================
     18 1-4        Sequence header     In Hex 000001B3
     19            code
     20 12 bits    Horizontal size     In pixels
     21 12 bits    Vertical size       In pixels
     22  4 bits    Pel aspect ratio    See below
     23 28-4+12
     24 18 bits    Picture rate        See below
     25  1 bit     Marker bit          Always 1
     26 10 bits    VBV buffer size     Minimum buffer needed to decode this
     27                                sequence of pictures; in 16KB units
     28  1 bit     Constrained
     29            parameter flag
     30  1 bit     Load intra          0: false; 1: true (matrix follows)
     31            quantizer matrix
     32 64 bytes   Intra quantizer     Optional
     33            matrix
     34  1 bit     Load nonintra       0: false; 1: true (matrix follows)
     35            quantizer matrix
     36 64 bytes   Nonintra quantizer  Optional
     37            matrix
     38  -         Squence extension   Optional
     39            Data
     40  -         User data           Optional application-dependent data
     41 ===================================================================
     42 
     43 Aspect raios are defined by a code which represents the height and
     44 width of the Video image.
     45 Picture rates are also defined by a code that represents the number
     46 of pictures that may be displayed each second.
     47 
     48 Each group of pictures has a header that contains one "I picture"
     49 and zero or more B and P pictures. The header is concerned with
     50 the time synchronisation for the first picture in this group, and
     51 the closeness of the previous group to this one.
     52 
     53 /*****************************************************************/
     54 
     55 For picture rate:
     56 1 = 23.976 frames/sec
     57 2 = 24
     58 3 = 25
     59 4 = 29.97
     60 5 = 30
     61 6 = 50
     62 7 = 59.94
     63 8 = 60
     64 
     65 Here gives an example. Below is Hex dump of first 256 bytes of
     66 the first Video frame of TEST.MPG from XingMPEG.
     67 
     68 00 00 01 B3 16 00 F0 C4 02 A3 20 A5 10 12 12 14
     69 14 14 16 16 16 16 18 18 19 18 18 1A 1B 1B 1B 1B
     70 1A 1C 1D 1E 1E 1E 1D 1C 1E 1F 20 21 21 20 1F 1E
     71 21 23 23 24 23 23 21 25 26 27 27 26 25 29 2A 2A
     72 2A 29 2D 2D 2D 2D 30 31 30 34 34 38 16 00 F0 C4
     73 00 00 01 B8 00 08 00 00 00 00 01 00 00 0A 72 00
     74 00 00 01 01 13 F9 50 02 BC B2 B8 BE 68 8B A4 9F
     75 C5 B5 CA 00 56 76 39 65 F2 30 8B A6 9D 50 69 E7
     76 DA FE 13 CF B7 FF 8F F4 CE 7B FA 0E F0 66 AE 1C
     77 5D E7 00 C8 0A 92 B9 29 3C 21 23 F1 D6 40 13 06
     78 F0 10 10 C6 27 80 A0 34 E1 C8 E4 0F 74 91 DA C4
     79 03 A0 DC 03 12 60 18 49 27 1D D4 BC 67 0E 54 8C
     80 96 FC 5D C0 06 E0 1A 72 11 7C 9A 8D C9 45 89 6D
     81 CD C4 0B 63 DC 90 18 24 00 EC 84 90 18 10 C9 3B
     82 1E A7 60 3C 9D 74 80 76 05 0B 02 81 A9 29 39 68
     83 53 8F 59 F1 BF 93 FB A0 04 01 BC B0 CE 18 E1 25
     84 
     85 Sequence header  = (Hex) 00 00 01 B3
     86 Horizontal size  = 0x160 = 352
     87 Vertical size    = 0x0F0 = 240
     88 Pel aspect ratio = [I don't know]
     89 Picture rate     = 4 = 29.97 frames/sec
     90 Marker bit       = 1