Streaming Media - June/July 2008 - (Page 58) cracking the h.264 codec Table 1 - H.264 Encoding Specs for Apple iPod Original iPod Video Codec Data rate Resolution Frame rate Profile Audio codec Data rate Audio parameters Formats H.264 768Kbps 320x240 30 fps Baseline Profile to Level 1.3 AAC-LC 160Kbps 48 kHz, stereo .m4v, .mp4, .mov iPod Touch H.264 1.5Mbps 640x480 30 fps Low-Complexity version of H.264 Baseline Profile AAC-LC 160Kbps 48 kHz, stereo .m4v, .mp4 and .mov H.264 2.5Mbps 640x480 30 fps Baseline Profile up to Level 3.0 AAC-LC audio 160Kbps 48 kHz, stereo .m4v, .mp4 and .mov Table 2 - H.264 Encoding Parameters for Apple iPhone iPhone Video codec Data rate Resolution Frame rate Profile Audio codec Data rate Audio parameters Formats H.264 1.5Mbps 640x480 30 fps Low-Complexity version of H.264 Baseline Profile AAC-LC 160Kbps 48 kHz, stereo .m4v, .mp4 and .mov H.264 768Kbps 320x240 30 fps Baseline Profile up to Level 1.3 AAC-LC audio 160Kbps 48 kHz, stereo .m4v, .mp4 and .mov 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://multi media.cx/qt-faststart.c) In terms of practical knowledge, I gleaned the most from Kaourantin.net, a highly useful and topical blog written by Adobe developer Tinic Uro. In terms of supported file formats, Uro reports that the Flash Player should play .mp4, .m4v, .m4a, .mov, and .3gp files as well as files using the newer extensions shown in Table 3. Uro explained the need for the new extensions as follows: Why new file extensions? It will be an easy way to distinguish files which can be played back by the Flash Player. There are simply too many instances where .mov and .mp4 files cannot be played back or, vice versa, a file compatible with the Flash Player might not play back in QuickTime, an iPod, or other video device. I will also be working on a technical document to exactly outline what the Flash Player does support and what it does not support, although my previous posts already pointed out that we are very close to full support of the H.264 standard with the exception of Extended Profile and FRExt. 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. 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. Beyond this, when choosing your H.264 encoding parameters, there are three inter-related things you 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 58 STREAMING MEDIA June/July 2008 http://renaun.com/blog/2007/08/22/234 http://multimedia.cx/qt-faststart.c http://multimedia.cx/qt-faststart.c
For optimal viewing of this digital publication, please enable JavaScript and then refresh the page. If you would like to try to load the digital publication without using Flash Player detection, please click here.