Tektronix products are covered by U.S. and foreign patents, issued and pending. Information in this publication supercedes
that in all previously published material. Spec ifications and price change privileges reserved.
TEKTRONIX and TEK are registered trademarks of Tektronix, Inc.
Contacting Tektronix
Tektronix, Inc.
14200 SW Karl Braun Drive
P.O. Box 500
Beaverton, OR 97077
USA
For product information, sales, service, and technical support:
HIn North America, call 1-800-833-9200.
HWorldwide, visit www.tektronix.com to find contacts in your area.
This set of seven tutorials helps you learn more about operating the Tektronix
MTS4CC Elementary Stream Compliance Checker. Perform tutorials 1--7 in the
order they are presented, regardless of the video standard of interest. Tutorial 6
relates only to MPEG-2 and interlaced video.
The tutorials will help you answer the following questions:
HHow do you know that your video compression complies with the standards?
HIf your codec doesn’t work well with other vendors’ codecs, where is the
problem — is it with your codec or theirs?
HCodec optimization:
HAre you making the best use of available bandwidth?
HWhich frames and movement types use the most bits and why?
HWhat changes to your codec software give the best reductions in bits
used for the least reduction in visual quality?
HWhat types of video content does your codec work poorly with and why?
Table 1 includes a description for each tutorial.
Table 1: Tutorial descriptions
TutorialNameStandardAreas Covered
1H.263 Compliance and Motion
Vectors
2MPEG-4 ComplianceMPEG-4 Simple ProfileCommon errors; searching for areas of
To complete the tutorial procedures, you must be familiar with the basic
functions shown in Table 2. To perform the desired function, click on the
associated icon or type the appropriate keyboard shortcut.
Table 2: Basic functions
FunctionForwardBackward
IconKeyboard shortcutIconKeyboard shortcut
Play videoCtrl + PCtrl+Shift+P
Stop videoCtrl + SCtrl + S
Pause/step one frameCtrl + ACtrl+Shift+A
Fast forward/backwardCtrl + FCtrl+Shift+F
Pauseonframe
Skip to next frame type/number/timeCtrl + KCtrl+Shift+K
How to Begin a Tutorial
1. After starting MTS4CC, click anywhere to remove the splash screen. If you
do nothing, the spash screen will disappear after 4 seconds.
2. Load the desired tutorial stream. Note that the demo version of the MTS4CC
will only play the provided example video files.
This tutorial covers the standards and compliance issues in H.263, and also
demonstrates the proper functioning of the motion vectors.
Procedure
1. To load the H.263 tutorial, click File > Example files > H.263 stream >
Rally (250K). The window title changes to MTS4CC-H.263 Example -Rally (250k), and a warning message appears, as shown in Figure 1.
6. Click Continue. An error message appears, as shown in Figure 3.
7. Note that it was an MBCPC error that resulted in the Out of Sync alert
message shown in Figure 3. This often occurs when one syntax error triggers
a series of alerts.
Figure 3: Out of sync error message
8. Select the Skip ALL Error alerts in the future check box, and then click
Continue.
9. To open the Alert Log, click the Alert Log icon
appears, as shown in Figure 4.
10. Note the active filter button in the toolbar. B ecause Skip ALL error alerts
in the future was selected, the alert log view is filtered and the filter button
is active. The status bar indicates that 23 of 24 alerts are hidden.
11. Click the Filter icon to deactivate the filter and view all alerts, as shown in
Figure 5.
12. Double-click an alert to view the alert details, as shown in Figure 5, and then
click Close. View the columns that appear in the alert log, which are shown
in Figure 6, and note the column descriptions that follow.
HLevel -- the severity level for the alert. Levels include Info, Warning,
Error,andFatal.
HID -- MTS4CC unique alert ID number.
HClass -- Syntax area where the alert occurs.
HTitle -- Alert title.
HDecode and Display -- Frame numbers where the alert is decoded and
displayed (can vary).
HAddress -- The address of the alert in the bitstream.
13. Close the Alert log and return to the main page of the application.
14. Click the
visible. An image of the video is shown in Figure 7.
15. Note the following about the image:
HThe white dots are at the center of each MacroBlock.
HThe white lines indicate motion vectors. The arrows for each MV point
to the position in the previous frame that contains the data for the current
MacroBlock.
16. Click the color transfer icon
17. To play the video again, click theicon or type CTRL + A. Note that the
motion vectors are clear and accurate.
icon to play the video again with the Motion Vectors (MVs)
to change the overlay from white to black.
Conclusion
8
Figure 7: Video image
This tutorial demonstrated where there is a standards-compliance issue in the
H.263 bitstream, but also showed that other aspects of the H.263 bitstream, such
as the motion vectors, are implemented properly.
6. Click Goto, andthenclickHex, as shown in Figure 9. The Hex view
appears with the error location highlighted, as shown in Figure 10.
7. Close the Hex view, and again view the error shown in Figure 9. The error
occurs because modulo_time_base was set to 1 after a whole second elapsed
since the modulo_time_base was last 1 (at which time vop_time_increment
should be reset, although not necessarily to zero).
8. Click the
alert shown in Figure 9 appears again.
9. In the alert dialog box, select Skip this Warning only in the future,and
then click Continue.
10. Complete the video and observe whether it works properly.
icon or type CTRL + P to resume playing the stream. The
14. To see if the codec makes the best use of the MPEG-4 standard, open the
Overlay menu, and then click MB Types (you can also type CTRL+ Y).The MB types color key appears.
15. Move forward 3 frames. The MB types are color-coded as shown in
Figure 12.
Figure 12: MB Types color key
16. Move forward to frame 34. As shown in Figure 13, note that there are
several green (intra) coded MacroBlocks in the static black background (intra
coded MBs generally use the most bits).
17. View frames 35, 36 and 37, as shown in Figure 14. Observe that the
MacroBlocks disappear.
18. Go back to frame 34.
19. From the Overlay menu, click MB Statistics, and then click Bits.In
Figure 15, note that the black background uses a high number of bits.
20. View frames 35, 36 and 37, as shown in Figure 16. Observe that the
background uses progressively fewer bits.
21. Compare frame 34 with frame 37. Observe that the black background in
frame 34 is coded and uses many bits, while the black background in frame
37 is not coded, and it uses no bits.
HUse the Video summary tooltip and understand the information provided.
HUse the MacroBlock overlays: MB types and motion vectors.
HUse the hexview bitstream viewer.
It appears that the encoder chooses MB types less than optimally by using intra
MBs for the background, which wastes many bits.
HConsider whether there are software bugs, such that the encoder is too
sensitive to minor changes in the gray level.
HCheck the encoder part of the codec that decides when to use Intra MBs and
Inter MBs, and when to not code the MB.
Fixing this problem would save many wasted data bits.
NOTE. The MPEG-4 standard provides more data bits for intensity-gray level
than for color information, so it is naturally more sensitive to changes in gray
level (this mimics the human visual system). However, it appears that the
sensitivity to gray in this example is too great.
HSyntax error: not obeying Profile/Level restrictions.
HExtracting and saving the video track.
HViewing MP4 file structure.
This tutorial requires that you have completed the previous tutorials and that you
can perform the following tasks:
HPlay, stop, step forward, and fast forward a video.
HUse and interpret the alert messages.
HUse the Video summary tooltip and understand the provided informa-
tion.
HUse the MacroBlock overlays: MB types and motion vectors.
Procedure
HUse the hexview bitstream viewer.
1. To load the MP4 tutorial, click File > Example files > MP4 Files> Packet
Woman. A list of tracks included in the MP4 appears in a dialog box, as
shown in Figure 17.
2. View the track information included in the dialog box. The video track ID,
for example, is 001. Although there can be multiple tracks, the first video
track is selected automatically.
3. Click OK. The video track is analyzed, and an error message appears, as
shown in Figure 18.
4. View the error message details as shown in Figure 18:
HThe VOP has more MacroBlocks (396) than allowed in MPEG-4 /
Simple Profile / Level 1: the maximum number allowed is 99.
HThis is likely an error with the level. It is stated as Level 1 in the
encoded file, but it is actually the size of a Level 2.
5. Select Skip this Error only in the future, and then click Continue.
MTS4CC will continue, by using the actual size. A buffer conformance
warning message appears, as shown in Figure 19.
6. View the warning message details as shown in Figure 19:
HOverflow by 297 MB.
HThis error is to be expected, because the Level is incorrectly given as L1
(which has a limit of 99 MBs) whereas it should be L2 (which has a
limit of 396 MBs).
Figure 19: VCV overflow warning message
7. Select Skip this Warning only in the future, and then click Continue.
Another buffer conformance warning message appears, as shown in
Figure 20.
8. Select Skip this Warning only in the future, and then click Continue.
9. To ensure that the application window is active, click the Title bar.
10. From the analysis menu, select View video stream structure.TheStruc-
ture window appears, as shown in Figure 21.
11. View the top-level atoms in the MP4 file. Click the + next to each atom to
14. In the Save stream file as dialog box, type a different file name if required.
NOTE. To open this dialog box in the future for a video track that was not
extracted at the time the MP4 file was first opened, open the File menu and then
click Save stream file as.
Conclusion
This tutorial demonstrated how to:
HView the tracks in an MP4 file.
HExtract and play a video, while checking for errors.
The track ID and video file type has been automatically appended to the file
name.
HIdentify and locate the Level conformance error.
HIdentify two buffer conformance errors (see Tutorial 5 for details about
HUsing the Video summary tooltip and the MB types overlay.
HPerforming optimization checks that could reduce bit usage by 45% in this
sequence.
This tutorial requires that you have completed the previous tutorials, and that
you know how to:
HPlay, stop, step forward, and fast forward the video.
HUse and interpret the pop-up alerts.
HUse the Video summary tooltip and understand the information provided.
HUse the MacroBlock overlays: MB types and motion vectors.
HUse the hexview bitstream viewer.
Procedure
HOpen MP4 files, view/extract the video, and view the MP4 file structure.
1. To load the MP4 tutorial, click File > Example files > MP4 Files>
Picadilly Circus. A list of tracks included in the MP4 appears in a dialog
box, as shown in Figure 24.
2. View the track information included in the dialog box. The video track ID,
for example, is 001. Although there can be multiple tracks, the first video
track is selected automatically.
3. Click OK.
4. To view the Video Summary tooltip, click the
5. To view the MB types overlay, click theicon or type CTRL + M.
6. Click the
shown in Figure 25.
icon. A VCV buffer conformance warning message appears, as
Table 4 provides the functions of each Buffer Analysis toolbar icon.
Table 4: Buffer analysis icons
IconFunction
Zoom in (+) and zoom out (--) centered on the window;
affected by the Lock X / Y icons.
Fit all data into window.
Go to origin (zero), which is the start of the video sequence.
Lock X/Y zoom in/out and scrolling/panning. When the Lock
Y button is pressed, zoom in and zoom out and scroll/pan only
affect the X-direction. This allows you to keep a useful vertical
scale, while still viewing the length of the video sequence.
Autoscroll; fill the analysis data in real time as the video is
being decoded and scroll the window to the right.
Procedure
Measure the data at the cursor. The data values are reported on
the status line at the bottom of the analysis window. Offsets
and angles/slopes of lines can also be measured by holding the
mouse and dragging.
Scroll/pan (the cursor changes to show the scroll/pan direction); this is affected by the Lock X-Y icons.
Zoom in/zoom out centered on the location of this cursor; this
is affected by the Lock X-Y icons. Press the <shift> key to
zoom out.
1. To load the tutorial, click File > Example files > MPEG-4 Elementary
Streams> Man Walking. Ensure that the video is not playing.
2. From the Analysis menu, click View buffer analysis.TheBuffer Analysis
window appears, as shown in Figure 30.
3. View the graph example in Figure 30, as well as the descriptions in Table 5.
4. Observe the VBV, VCV and VMV values that appear beside the graph and
are shown in Figure 31. These parameters are specified in the stream, or
from the implied values from the Profile/Level, as given in the standard, or
the implied values from the Object Type (Simple or Advanced Simple), at
the highest level for each. You can enter them manually by selecting Usecustom parameters.
Figure 31: VBV, VCV and VMV values
5. Click the Pause/ Step Forward icon
the window because the Man W alking sequence contains B-VOPs, and the
buffer analysis cannot start until there is sufficient data for the calculations
(this will not occur until frame 4).
6. Click the Pause/ Step Forward icon
7. Click the Fit to Window icon
shown in Figure 32.
8. Click the Fast forward icon
Figure 33.
9. Note that the VBV overflow occured while decoding frame 55 (the display
frame number is 54).
10. Select Skip this Warning only in the future, and then click Continue.
11. Observe that the red VBV line goes above the Buffer limit line, as shown in
Figure 34.
12. Observe that when the decoding stops, the graph looks like the section that
appears between 75% and 105% buffer occupancy. Note also that the number
of frames with VBV overflow appears at the bottom of the screen. In this
case, the number of frames with VBV overflow is 106.
34
Figure 34: Buffer limit graph
13. To fit the graph to the window, click the
toolbar. The red line displays the VBV overflow, as shown in Figure 35.
14. Consider the information presented by the graph. The standard values used
for a frame result in a VBV overflow, which means that the decoding rate
cannot keep up with the input data rate, and frames will drop, beginning with
frame 54.
Solutions include:
HIncrease the vbv_buffer_size so that it does not overflow.
HDecrease the bit-rate, which is the rate at which the encoder sends the
data to the decoder.
HIncrease the displayed frame rate, so that the decoder removes bits more
quickly.
HIncrease the number of bits per frame by changing the quantizer or
increasing the frame size.
HChange the Profile/Level indication, so that it stays within the set limits
(for example, change to ASP at Level 2).
HUse custom values in the vbv_parameters in the sequence header.
15. Clear the check boxes for VCV and VMV so that only the VBV check box is
selected. Note that the vertical scale is now measured in bits, not %, as
shown in Figure 36.
16. Observe that the VBV line has disappeared because it is beyond the scale set
for the VBV.
17. Click the
icon three times for a detailed view of the graph, as shown in Figure 37.
icon on the Buffer Analysis toolbar, and then click the
21. View the video buffer verifier, as shown in Figure 40. The default vbv_buffer_size for ASP L0 is 163,840 bits = 20,480 bytes, which is not very large.
22. Enter 655,360 bits = 80 kbytes, click Apply, and then click the Fit to
window icon
no overflows or underflows.
23. Consider the following:
HWhat if your mobile device cannot spare 80 KBs of memory, and can
only spare 20 KBs, as specified by the standard?
HBy how much does the input data rate need to be reduced?
HDoes this comply with the specifications of the network on which your
device will operate?
. Observe that the graph stays below the limit and there are
24. Reset the parameters by clicking Use parameters from stream header,and
then reselect the Use custom parameters check box. The VBV graph shows
that the decoder is being supplied with data faster than it can decode.
25. Reduce the bit rate to 121072 bits, as shown in Figure 41, and then click
Apply. The graph goes up slightly and there are fewer frames with overflow,
This tutorial demonstrated that the buffer analysis of the MPEG-4 example, Man
Walking, showed that the stream does not comply with the buffer constraints.
The tutorial recommended ways to resolve this issue.
The tutorial also brought up the following considerations:
HHow much memory needs to be allocated? Can your hardware allow this
much memory usage?
HIs the input data rate limit appropriate for your network?
1. To load this tutorial, click File > Example files > MPEG-2 Program
Streams> Person Track. A list of tracks included in the MPEG-2 program
stream appears in a dialog box, as shown in Figure 45.
2. View the track information included in the dialog box. The video track ID,
for example, is 0xe0. Although there can be multiple tracks, the first video
track is selected automatically.
44
Figure 45: Track list
3. Click OK. The video track is analyzed and an error appears, as shown in
Figure 46.
4. View the error message details, which provide a summary of the stream up to
the point of the error.
5. Click Continue. Ensure that the Skip this Error only in the future check
box is not selected. Another buffer conformance error message appears, as
shown in Figure 47.
6. View the error message details. An invalid VLC has been used for the
dct_differential field at bitstream byte address 0x1000, bit 5.
7. Click Continue. Ensure that the Skip this Error only in the future check
box is not selected. Repeat this step for an additional error message that
appears.
8. Resume playing the video. Observe that the error is visible in frame 1, as
shown in Figure 48.
46
Figure 48: Error in image
9. Click the the Pause, Step forward icon
10. Click Continue. An Invalid VLC error message appears, as shown in
Figure 49.
11. From the Goto menu, click Hex.
12. Click Continue, and then view the HexView window, as shown in
Figure 50. Note that the error is highlighted automatically.
13. Observe the bits surrounding the error and consider whether it is a start code
emulation.
14. To open the Grenadier Guards program stream, Click File > Example files >
MPEG-2 Program Streams> Grenadier Guards. An error message
appears, as shown in Figure 51.
15. View the details of the error message: the value of the denominator of
frame_rate_extension is 1, but it must be 0 in Main Profile.
Figure 51: Error message
16. Select Skip this Error only in the future, and then click Continue.The
status bar indicates one disabled alert, as shown in Figure 52. An error
message and a warning message appear, as shown in Figure 53 and
Figure 54.
Figure 52: Disabled alert indicator
17. For both error messages, select Skip this Error or Warning in the future,
andthenclickContinue. Do not resume playing the video.
HComparing the fidelity of the same bitstream compressed with either
MPEG-2 or H.264/AVC.
HViewing the visual difference between the compressed bitstream and the
YUV source reference video.
This tutorial requires that you have completed the previous tutorials and that you
can:
HOpen example streams.
HPlay, stop, step forward, and rewind a video.
Procedure
HUse and interpret alert pop-up messages.
HUse the icons and controls on the buffer analysis graphical display.
This tutorial also requires that you already understand the principles of fidelity
analysis (MTS4CC does not cover this; however, the user manual contains
descriptions of the fidelity metrics).
1. To load the tutorial, click File > Example files > MPEG-4 Elementary
Streams> Man Walking. Ensure that the video is not playing.
2. From the Analysis menu, click Enable fidelity analysis.TheVideo
analysis options dialog box appears (see Figure 59) for theYUV reference
file. This file will later be used for comparison with the compressed video
file. The YUV reference file is provided as an example, as indicated by the
text under the Reference filename field, shown in Figure 59.
3. Set the Frame rate to 30, as shown in Figure 59.
4. From the Metric drop-down menu, select PSNR (full signal range),and
then click OK. (A detailed description of each fidelity metric is available in
the user manual).
5. From the Analysis menu, click Enable fidelity trace.
6. On the Trace tab, select the Enable check box, choose the filename
mp4asp_1_video and then, under Options, select VOP Fidelity, as shown
in Figure 60.
7. On the Frame range tab, select the All frames check box, as shown in
Figure 61, and then click OK. The video window appears with the fidelity
12. To open the Grenadier Guards program stream, Click File > Example files >
MPEG-2 Program Streams> Grenadier Guards. An error message
appears.
13. Select Skip this Error only in the future, and then click Continue.
14. From the Analysis menu, select View analysis options.
15. On the Visual difference/ Fidelity tab, set the YUV frame rate to 25, andthen click OK.
16. An error message appears because there are only 10 frames of YUV data.Click OK, and then view the graph result, as shown in Figure 65.
17. Load the MPEG-2 program stream example, Grenadier Guards, as shown in
Figure 66.
18. Compare the MPEG-2 program stream in Figure 66 with the H.264/AVC
PSNR example shown in Figure 67. Note that the PSNR is higher for
H.264/AVC in Y, U, and V.