home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / m / mpegtools / MPEGstat / Manual next >
Text File  |  1995-04-13  |  7KB  |  216 lines

  1.  
  2. mpegstat - analyzes MPEG-1 encoded bitstreams
  3.  
  4. SYNOPSIS
  5. --------
  6.  
  7. mpegstat [ -all basename ] [ -block_info filename ] [ -dct ] [ -end N ]
  8.          [ -histogram filename ] [ -offsets filename ] [ -qscale filename ]
  9.          [ -quiet ] [ -rate filename ] [ -ratelength N ] [ -time ]
  10.          [ -size filename ] [ -start N ] [ -syslog filename ] [-verify ]
  11.          [ file_name ]
  12.  
  13. DESCRIPTION
  14. -----------
  15.  
  16. mpegstat decodes mpeg-1 encoded bitstreams collecting varying amounts of
  17. statistics. Errors are sent to stderr, basic statistics to stdout.
  18.  
  19. The basic information is the pattern of frames used, number of bytes for
  20. each frame type, the specified parameters, and lengths of vectors. For each
  21. frame type, the average size, compression rate, Q-factor, and time to decode
  22. are given.
  23.  
  24. Wherever a filename is requested - can be used to denote stdin/out.
  25.  
  26. OPTIONS
  27. -------
  28.  
  29. -all basename
  30.  
  31. Records information from all options (qscale, block_info, etc.) into
  32. files with basenames of basename (For wizards, -all foo -block_info bar
  33. will record all options BUT -block_info into files of the form foo.*).
  34.  
  35. -block_info filename
  36.  
  37. Records information about every block into file filename. The format is:
  38.  
  39. frame frame# IPB-type
  40.  
  41. slice slice# q-scale
  42.  
  43. block block# IPB-type Q-scale bits block-type <vectors-if-any> <cbp>
  44.              <dct decode>
  45.  
  46. -dct
  47.  
  48. Enables the decoded dct values to be output into the block file.
  49.  
  50. -end N
  51.  
  52. Causes mpeg_stat to finish collecting statistics at frame N.
  53.  
  54. -histogram filename
  55.  
  56. Summaries the overall statisitcs for each frame type into the file.
  57.  
  58. -offsets filename
  59.  
  60. Record the offset of every picture, GOP, and slice into file filename.
  61.  
  62. -quiet
  63.  
  64. Roggles the display of the frame-types as they are parsed (and custom
  65. quantization matrices) [default: on].
  66.  
  67. -qscale filename
  68.  
  69. Writes Q factor and custom quantization matrix information into file
  70. filename. The Q-factor and number of blocks of that quality (ignoring
  71. skipped blocks) for each type of frame is recorded.
  72.  
  73. -rate filename
  74.  
  75. Record the bit rate at every picture (after the first second) into the
  76. file filename. Also collect minimum and maximum bit rate encountered in
  77. the summary information. (Rate is the number of bits used per second, at
  78. every frame).
  79.  
  80. -ratelength N
  81.  
  82. Change the measurement period for rate to N, so it will measure the total
  83. rate required over any N frame period (after the first N, of course).
  84.  
  85. -size filename
  86.  
  87. Stores information about the type (I,P,B) and size of each frame in file
  88. filename (one frame per line).
  89.  
  90. -start N
  91.  
  92. Causes mpeg_stat to begin collecting statistics at frame N. Preceding
  93. frames will be parsed, but few statistics are collected (the system layer
  94. counters will sill be running).
  95.  
  96. -syslog filename
  97.  
  98. Describes the parsing of the system layer into the file filename. Note
  99. this option is not turned on by -all.
  100.  
  101. -time 
  102.  
  103. Prints the amount of time total and per-frame type averages to decode. This
  104. will give an estimate of time in a software player, but is not generally
  105. useful, so it is off by default.
  106.  
  107. -verify
  108.  
  109. Does more work to check the validity of the sequence. Slows down the
  110. statistics, so it is optional.
  111.  
  112. EXAMPLE
  113. -------
  114.  
  115. Decoding the flowergarden sequence (mpegstat -quiet flower.mpg) should
  116. produce the following statistics: 
  117.  
  118. mpegstat -- MPEG Analyzer for MPEG I video streams (version 2.0)
  119.  
  120. Reading flower.mpg
  121.  
  122. Frame sequence as to be displayed:
  123.  
  124. BBPBBPBBPBBPBBIBBPBBPBBPBBPBBIBBPBBPBBPBBPBBIBBPBBPBBPBBPBBIBBPBBPBBPBBPBBI
  125. BBPBBPBBPBBPBBIBBPBBPBBPBBPBBIBBPBBPBBPBBPBBIBBPBBPBBPBBPBBIBBPBBPBBPBBPBB
  126.  
  127. Searching for constant frame type sequence...pattern detected:
  128.  
  129. IBBPBBPBBPBBPBB
  130.  
  131. SUMMARY:
  132.  
  133. Total Bytes read: 0. Total number of frames: 150. Length is 5.01 sec
  134.  
  135. Width: 352  Height: 240
  136. Avg. Frame Size: 4786 bytes + 6 bits  (average rate 1147692.76 bits/sec)
  137.  
  138. Total Compression Rate: 1.89 % of uncompressed 24 bit images
  139.                         =  0.45 bits per pixel
  140.  
  141. Number of Macroblocks [width * height = sum]: 22 x 15 = 330 per frame
  142. Skipped Macroblocks = 4389 (9.46%), Coded Macroblocks = 41992 (90.54%)
  143.  
  144. Total Time Decoding: 8.611 secs. 0.05721 sec/frame or 17.11 frames/sec.
  145.  
  146. MPEG-Viewer requirements:
  147.         Pixel aspect ratio of 0.6735
  148.         Required display speed: 29.97 frames/sec
  149.         Specified bit rate is 1.00 MBits/sec (2500 * 400bits/sec)
  150.         Requested buffer size is 8K ints (16 bits).
  151.         And the constrained parameter flag is on.
  152. The stream meets the constrained parameter requirements.
  153.  
  154. Length of vectors in pixels:
  155.         Horizontal forward vectors, maximum :  39       average:   6
  156.         Vertical forward vectors, maximum   :  22       average:   1
  157.  
  158.         Horizontal backward vectors, maximum:  29       average:   5
  159.         Vertical backward vectors, maximum  :  16       average:   1
  160.  
  161. Frame specific information:
  162.  
  163.     10  I FRAMES, average is:
  164.         Size: 17323 bytes + 1 bits (24.13%)
  165.         Compression Rate:  6.84%
  166.         Q Factor [scales quantization matrix]: 11.15
  167.         Time to Decode: 0.114039 secs.
  168.  
  169.     40  P FRAMES, average is:
  170.         Size: 8031 bytes + 0 bits (44.74%)
  171.         Compression Rate:  3.17%
  172.         Q Factor [scales quantization matrix]: 10.85
  173.         Time to Decode: 0.075342 secs.
  174.  
  175.     100 B FRAMES, average is:
  176.         Size: 2235 bytes + 4 bits (31.13%)
  177.         Compression Rate:  0.88%
  178.         Q Factor [scales quantization matrix]: 15.01
  179.         50.59% interpolated Macro Blocks
  180.         Time to Decode: 0.044516 secs.
  181.  
  182.  
  183. NOTES
  184. -----
  185.  
  186. The analyzer expects MPEG-1 video streams only. It can handle multiplexed
  187. MPEG streams (video+audio streams), but mostly analyzes the video portion.
  188.  
  189. Some streams do not end with the proper sequence end code and will probably
  190. generate an "Improper sequence end code." error when done. In general
  191. mpegstat attempts to catch and alert its user to errors in the stream. Such
  192. errors are glossed over in mpeg_play. Be aware that errors can disturb
  193. statistics gathering, generating odd results.
  194.  
  195. This player can handle XING data files. Be aware that XING makes no use of
  196. temporal redundancy or motion vector information. In other words, they do
  197. not use any P or B frames in their streams. Instead, XING data is simply a
  198. sequence of I frames.
  199.  
  200. HISTORY
  201. -------
  202.  
  203. The analyzer is based on the UC Berkeley mpeg_play player by Ketan Patel,
  204. Brian Smith, Henry Chi-To Ma, and Kim Man Liu. It was modified at the
  205. Technical University of Berlin, Germany, Dept. of Computer Science by Tom
  206. Pfeifer, Jens Brettin, Harald Masche, Alexander Schulze, and Dirk Schubert.
  207. It has been further modified to collect much more information by Steve Smoot
  208. (UC Berkeley).
  209.  
  210. BUGS
  211. ----
  212.  
  213. No statistics should be collected before the start frame. Sometimes system
  214. layer streams will indicate that they lack proper end codes, when they have
  215. them. VBV size conformance is not checked. Verification is not complete.
  216.