Attention: We have retired the ASP.NET Community Blogs.
Learn more >
Macromedia's New Alternative to Sorenson Encoding
One of the most interesting part of the SWF specs has been the
embedded video section. As you may know, starting with Flash
6.0, Macromedia added support for embedded video inside of SWF
movies. The video compression codec was licensed from Sorenson
and output to a slightly modified version of the H.263 video
compression standard. Although it hasn't gotten any coverage
yet that I have seen, in Flash 7.0 / MX 2004, Macromedia has
added support for another video codec: ScreenVideo.
ScreenVideo basically just divides your screen up into a grid
and then encodes each of those grid squares as a lossless (or
ZLIB compressed) chunk of data. If a grid square does not
change, then the chunk's data is left out in subsequent
frames, which means that this format is great for encoding
video that has relatively static content (screen recording is
a likely usage). Unfortunately, true to Macromedia's style,
the docs on the video tags inside the SWF are incorrect (yes,
the specs are a ton better, but still a few bloopers in
there), and I had to spend all night decompiling SWFs and
finally get in touch with
Burak (the ASV guy) to
confirm my findings. In any case, just to document this so
people running into the same prob can find the answer, the
ScreenVideo packet needs to be proceeded by UB[4] Frame Type,
UB[4] Codec. This bears a striking resemblence to its format
inside of an FLV file, which is noted in the specs as UB[4]
Codec, UB[4] Frame Type. However, Burak mentioned that the FLV
specs might be incorrect and that the reverse order is
actually what you want. Oh, well. It works now.