home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 5
/
DATAFILE_PDCD5.iso
/
utilities
/
m
/
mpegtools
/
MPEGstat
/
Manual
next >
Wrap
Text File
|
1995-04-13
|
7KB
|
216 lines
mpegstat - analyzes MPEG-1 encoded bitstreams
SYNOPSIS
--------
mpegstat [ -all basename ] [ -block_info filename ] [ -dct ] [ -end N ]
[ -histogram filename ] [ -offsets filename ] [ -qscale filename ]
[ -quiet ] [ -rate filename ] [ -ratelength N ] [ -time ]
[ -size filename ] [ -start N ] [ -syslog filename ] [-verify ]
[ file_name ]
DESCRIPTION
-----------
mpegstat decodes mpeg-1 encoded bitstreams collecting varying amounts of
statistics. Errors are sent to stderr, basic statistics to stdout.
The basic information is the pattern of frames used, number of bytes for
each frame type, the specified parameters, and lengths of vectors. For each
frame type, the average size, compression rate, Q-factor, and time to decode
are given.
Wherever a filename is requested - can be used to denote stdin/out.
OPTIONS
-------
-all basename
Records information from all options (qscale, block_info, etc.) into
files with basenames of basename (For wizards, -all foo -block_info bar
will record all options BUT -block_info into files of the form foo.*).
-block_info filename
Records information about every block into file filename. The format is:
frame frame# IPB-type
slice slice# q-scale
block block# IPB-type Q-scale bits block-type <vectors-if-any> <cbp>
<dct decode>
-dct
Enables the decoded dct values to be output into the block file.
-end N
Causes mpeg_stat to finish collecting statistics at frame N.
-histogram filename
Summaries the overall statisitcs for each frame type into the file.
-offsets filename
Record the offset of every picture, GOP, and slice into file filename.
-quiet
Roggles the display of the frame-types as they are parsed (and custom
quantization matrices) [default: on].
-qscale filename
Writes Q factor and custom quantization matrix information into file
filename. The Q-factor and number of blocks of that quality (ignoring
skipped blocks) for each type of frame is recorded.
-rate filename
Record the bit rate at every picture (after the first second) into the
file filename. Also collect minimum and maximum bit rate encountered in
the summary information. (Rate is the number of bits used per second, at
every frame).
-ratelength N
Change the measurement period for rate to N, so it will measure the total
rate required over any N frame period (after the first N, of course).
-size filename
Stores information about the type (I,P,B) and size of each frame in file
filename (one frame per line).
-start N
Causes mpeg_stat to begin collecting statistics at frame N. Preceding
frames will be parsed, but few statistics are collected (the system layer
counters will sill be running).
-syslog filename
Describes the parsing of the system layer into the file filename. Note
this option is not turned on by -all.
-time
Prints the amount of time total and per-frame type averages to decode. This
will give an estimate of time in a software player, but is not generally
useful, so it is off by default.
-verify
Does more work to check the validity of the sequence. Slows down the
statistics, so it is optional.
EXAMPLE
-------
Decoding the flowergarden sequence (mpegstat -quiet flower.mpg) should
produce the following statistics:
mpegstat -- MPEG Analyzer for MPEG I video streams (version 2.0)
Reading flower.mpg
Frame sequence as to be displayed:
BBPBBPBBPBBPBBIBBPBBPBBPBBPBBIBBPBBPBBPBBPBBIBBPBBPBBPBBPBBIBBPBBPBBPBBPBBI
BBPBBPBBPBBPBBIBBPBBPBBPBBPBBIBBPBBPBBPBBPBBIBBPBBPBBPBBPBBIBBPBBPBBPBBPBB
Searching for constant frame type sequence...pattern detected:
IBBPBBPBBPBBPBB
SUMMARY:
Total Bytes read: 0. Total number of frames: 150. Length is 5.01 sec
Width: 352 Height: 240
Avg. Frame Size: 4786 bytes + 6 bits (average rate 1147692.76 bits/sec)
Total Compression Rate: 1.89 % of uncompressed 24 bit images
= 0.45 bits per pixel
Number of Macroblocks [width * height = sum]: 22 x 15 = 330 per frame
Skipped Macroblocks = 4389 (9.46%), Coded Macroblocks = 41992 (90.54%)
Total Time Decoding: 8.611 secs. 0.05721 sec/frame or 17.11 frames/sec.
MPEG-Viewer requirements:
Pixel aspect ratio of 0.6735
Required display speed: 29.97 frames/sec
Specified bit rate is 1.00 MBits/sec (2500 * 400bits/sec)
Requested buffer size is 8K ints (16 bits).
And the constrained parameter flag is on.
The stream meets the constrained parameter requirements.
Length of vectors in pixels:
Horizontal forward vectors, maximum : 39 average: 6
Vertical forward vectors, maximum : 22 average: 1
Horizontal backward vectors, maximum: 29 average: 5
Vertical backward vectors, maximum : 16 average: 1
Frame specific information:
10 I FRAMES, average is:
Size: 17323 bytes + 1 bits (24.13%)
Compression Rate: 6.84%
Q Factor [scales quantization matrix]: 11.15
Time to Decode: 0.114039 secs.
40 P FRAMES, average is:
Size: 8031 bytes + 0 bits (44.74%)
Compression Rate: 3.17%
Q Factor [scales quantization matrix]: 10.85
Time to Decode: 0.075342 secs.
100 B FRAMES, average is:
Size: 2235 bytes + 4 bits (31.13%)
Compression Rate: 0.88%
Q Factor [scales quantization matrix]: 15.01
50.59% interpolated Macro Blocks
Time to Decode: 0.044516 secs.
NOTES
-----
The analyzer expects MPEG-1 video streams only. It can handle multiplexed
MPEG streams (video+audio streams), but mostly analyzes the video portion.
Some streams do not end with the proper sequence end code and will probably
generate an "Improper sequence end code." error when done. In general
mpegstat attempts to catch and alert its user to errors in the stream. Such
errors are glossed over in mpeg_play. Be aware that errors can disturb
statistics gathering, generating odd results.
This player can handle XING data files. Be aware that XING makes no use of
temporal redundancy or motion vector information. In other words, they do
not use any P or B frames in their streams. Instead, XING data is simply a
sequence of I frames.
HISTORY
-------
The analyzer is based on the UC Berkeley mpeg_play player by Ketan Patel,
Brian Smith, Henry Chi-To Ma, and Kim Man Liu. It was modified at the
Technical University of Berlin, Germany, Dept. of Computer Science by Tom
Pfeifer, Jens Brettin, Harald Masche, Alexander Schulze, and Dirk Schubert.
It has been further modified to collect much more information by Steve Smoot
(UC Berkeley).
BUGS
----
No statistics should be collected before the start frame. Sometimes system
layer streams will indicate that they lack proper end codes, when they have
them. VBV size conformance is not checked. Verification is not complete.