-->
Save your seat for Streaming Media NYC this May. Register Now!

Cracking the H.264 Codec

Article Featured Image
Article Featured Image

In a later update, Uro clarified that irrespective of the extension used, the Flash player will examine the file and attempt to play it:

Update, since I am apparently not clear enough and have to repeat myself: The Flash Player will not look at the file extension when loading files. It just means that if you are targeting the Flash Player or AIR, we suggest to use these file extensions.

Audio
On the audio side, Uro reports the follwing:

[A]udio can be either AAC Main, AAC LC, or SBR, corresponding to audio object types 0, 1, and 2. We also support the ".mp3" sample type, meaning tracks with MP3 audio. MP3inMP4, which intends to do multichannel MP3 playback within MP4 files, is not supported. Also, the old QuickTime specific style of embedding AAC and MP3 data is not supported. It is unlikely, though, that you will run into these kind of files.

Delivery Concerns
Those who have delivered QuickTime files over the internet will recall that you need to format the file for QuickStart for progressive delivery while hinting the file for delivery via a streaming server. Flash files don’t share these technical requirements, but when being delivered via progressive download, each file’s "moov atom" must be located at the beginning of the file. Otherwise, it will download in its entirety before playback starts.

Briefly, the moov atom contains the index information for the entire file, and most encoding tools, including the current versions of Premiere Pro and After Effects, place it near the end of the file. Uro lists two open source solutions for shifting the moov atom to enable progressive streaming:

—QTIndexSwapper (Adobe AIR app by Renaun Erickson; http://renaun.com/blog/2007/08/22/234)
—qt-faststart.c (command-line app by Mike Melanson; http://multimedia.cx/qt-faststart.c)

I checked the last update I had for Premiere Pro, and it still doesn’t produce Flash files with the H.264 codec, so I’m assuming this problem hasn’t been resolved.

According to the cited documentation, Adobe has given us quite the blank slate. Since few, if any, playback devices could actually decode H.264 video at the maximum parameters supported by Adobe, the focus moves from what we theoretically could do to what we practically should do. Fortunately for this article, for the most part, this is the same problem facing H.264 producers regarding general playback outside the Flash environment. Accordingly, let’s transition to producing H.264 for general consumption.

H.264 for General Usage
When producing H.264 for general usage, remember to choose the output format that matches your target. Generally, this will be MOV for QuickTime-related targets, F4V for Flash, and MP4 for devices.

Streaming Covers
Free
for qualified subscribers
Subscribe Now Current Issue Past Issues
Companies and Suppliers Mentioned