October 17, 2006
MovieVideoChartPlease note, this blog has been archived and now lives at www.discretecosine.com
One of the hardest thing to teach is video compression, because it's really difficult to visualize what's going on at a low level. One of the best tools for understanding what's going on inside a highly compressed video file is Textronix' MTS4EA software. It gives you a full visual analysis with motion vectors and macroblock coefficients and everything else a math geek could want. Unfortunately, even with the generous educational discount, it's still a bit out of most students' price range. About $20,000 out of their price range. Bummer.
However ... I've just become aware of a little application from Apple called MovieVideoChart. This program (described in depth in WWDC05 Session 208 for you ADC members) gives you a visual representation of each frame of your compressed video, showing you which frames are keyframes, which are intermediate, and how they're reordered in your video.
In the above screenshot, you can see a few things. The red frame (marked with the word "sync") is an I-Frame. It's the start of a GOP. In this case, this video has 150 frames between each keyframe, which is pretty extreme, but generally OK with modern codecs. Frames tagged "droppable" are are B frames (B frames can generally be ignored without breaking other frames, so they're the first to get dropped on a slow system). Everything else is a P frame.
The bottom row is showing you the order in which the frames are decoded. The middle row shows you order in which the frames are displayed. The top row would should you the effects of any edits made to the file itself.
This can teach you a lot about modern (h.264 in this case) video compression. Frame reordering is an important concept. If you want to understand why B frames are so important, just look at the "data size" entry for the B (droppable) frames. Most frames are running between 2000 and 4000 bytes (P and I frames respectively) but the B frame is between 130 and 700 bytes! That's a pretty huge reduction, and that's just one of the many things you can learn from this free program.
A full explanation of I P and B frames is out of the scope of this post (though I'd be happy to geek about it someday), but Apple has an OK blurb up if you're curious. Otherwise, take a look at MovieVideoChart. You might also be interested in Dumpster (at the bottom of the page) which shows you some good information about the internal constructs of your video file.
Posted by at October 17, 2006 8:20 PM | Education