YouTube does 720P HD using H.264

I just finished testing YouTube's new H.264-based HD video, and it is very compelling. You can see the video I uploaded at the YouTube site, click here.

Briefly, to have your video encoded in HD, all you have to do is upload the video in 720p format. Note that the usual file size (1 GB) and duration limits (10 minutes) apply. You can upload in a variety of formats; I used H.264. YouTube first creates a very ugly 320x180 video for normal viewing, then the big enchilada.

Video Encoding Parameters

What do we know about the video? Well, thanks to the information screen of the free MediaInfo video analysis tool, we know quite a bit. For starters, we can see that YouTube is producing the file at 720p (1280x720) at a video data rate of about 2 mbps, which translates to a fairly economical .072 bits per pixel. By way of comparison, Apple used .089 bits per pixel for a recent marketing video, while Cranky Geeks uses .072, pretty much identical to YouTube.

On the H.264 front, YouTube is encoding with the High profile with CABAC enabled. These are the specs I've been recommending for awhile, but few real world publishers have actually used them, so it's nice to get affirmation from the largest video publisher in the world. Of course, those producing with Apple Compressor, including, presumably, Apple, can't use either advanced parameter because Compressor doesn't support CABAC or the High profile. In addition, only the most recent versions of the QuickTime Player could play back the High profile, so if you were producing for QuickTime playback, the Main profile made more sense.

On the other hand, the Flash Player can play all levels of the High profile, as well as Main and Baseline, so when producing H.264 for Flash, High is the way to go. Interestingly, though not shown, YouTube produced the file with an MP4 extension for playback in the Flash Player, not the F4V. Flash Player doesn't care, it will play either format, but F4V is the extension used by most recently released encoding tools.

Audio Encoding Parameters

On the audio front, YouTube encoded with AAC LC, with two channels (e.g. stereo) to a data rate of 93 kbps. I would have used mono here to save a channel, but nobody asked. If you've been encoding with MP3, you probably think that the 93 kbps is miserly, but AAC LC is much higher quality compression, so should approximate at least 128 kbps MP3, if not higher.

Other Encoding Parameters

What else do we know about the file? Thanks to Inlet Semaphore, we can really dig into the file for details.

Semaphore's useful file analysis tool.

I've attached Semaphore's file analysis output to this article. From that, you can see that YouTube used a maximum of 3 reference frames (I've been using 4). From the frame graph above, you can see that YouTube inserted a key frame every two seconds (the little vertical lines below the time line are key frames). I prefer one every ten seconds because it should improve quality slightly and reduce pulsing, or a periodic, noticeable pulse each time a key frame updates the entire frame. YouTube did enable key frames at scene changes, which is why you see key frames at irregular locations.

I used Semaphore's frame analysis tool to identify how frequently YouTube inserted B frames, and it looks like they used a value of 2, which means 2 B-Frames between each P or I-Frame, which is in line with my recommendations.


For better or for worse, love it or hate it, YouTube is the single largest distributor of streaming video on the planet, so their video-related actions are always noteworthy. As a video producer, I like that YouTube is willing to be my HD content delivery network, though I'm sure the quality of service guarantees are limited (har, har). Note, also, the player concerns discussed below.

YouTube's configuration also reflects their obvious judgment that a useful number of 'Netizens can receive video in real time at 2.1 mbps second, which is among the highest streaming data rates that I've seen. That raised my eyebrows. If you're producing H.264, YouTube appears to be saying that the High profile with CABAC is the way to go. Again, I'd recommend using a longer key frame interval, but the number of B-Frames and reference frames are spot on.

I've embedded the video below. Note that you can access the HD version by clicking on the lower right, but that the player won't expand like it does on YouTube. You can click the full screen button to view the video in full screen, where the full resolution is apparent.

To me, the video playback looked a touch jerky, less smooth than I've seen in the past. To make sure that this wasn't related to the video encoding parameters that YouTube used, I uploaded the file I downloaded from YouTube and posted it here. If you scroll over to about 46 seconds in both videos, you'll see a panning shot that looks much smoother in simple player that I created from a template in Flash CS3. To be clear, the same file is playing from both players; they're just located on two different servers.

I found and played several other HD videos in YouTube and noticed that many, but not all, shared the same jerkiness of my test video. Not sure what to make of this, but if I was deploying HD video via the Flash Player, I'd be sure to test real world playback before finalizing my player. No huge relevation there, but there it is.


Comments (36)

Said this on 2-26-2009 At 01:19 pm
Jan - good article as always. question - what happens if the source is higher, 1440 or 1920 x 1080? I've uploaded a few even uncompressed (avi) at 1080 and they look terrible, even w/ sufficient bandwidth to view 'hd'. I was surprised at the poor quality encode after upload. Should I downres to 720 before uploading, can you tell if that helps w a better result?
Said this on 2-27-2009 At 08:04 am

Thanks for your note. YouTube's HD seems to work most reliably when you upload 720p footage. I would always avoid scaling and deinterlacing in YouTube because results have consistently been mediocre.

Let me know how it works out for you.

Said this on 2-27-2009 At 07:13 pm
Most users don't want to know about H.246 or anything like this. They want Plug and Play and automatically the best quaility without spending 3 hours tweaking files to suit.
Said this on 2-27-2009 At 07:31 pm
I totally agree, that's what's great about YouTube. But if you're a web video producer, and streaming videos from your own site, and are considering H.264, it's good to know what YouTube is doing. For example, very few producers use H.264's high profile. Now that YouTube has legitimized it, I'm sure lots more will.

Said this on 3-2-2009 At 12:45 pm
I use Final Cut and Compressor. What is the best bang for the buck as a Compressor plug in to get the H.264, High profile with CABAC enabled ? Would I be better served to get a stand alone encoding product? Any upgrades to Compressor to include this profile that you know about?
Said this on 3-2-2009 At 01:04 pm

I guess you could consider Episode as a plug-in that enables bot High profile and CABAC. I'm guessing that there are others, but I haven't played with any. You can run Episode as both a plug-in and standalone product.

As far as I know, there have been no Compressor upgrades that enable these functions released by Apple.
Shaun Cammack
Said this on 3-2-2009 At 01:31 pm
You may check out the x264 plugin for Quicktime ( It gives the CABAC option. I've been using it for client viewables for a while and it's much faster at encoding than Apple's version, and as an added bonus, it doesn't have the same issues with gamma. There is another version I haven't tried, but might ( which was updated much more recently and may give even more options.

I haven't tried with YouTube yet, but intend to do so, soon.
Peter Cook
Said this on 3-2-2009 At 04:13 pm
It's a shame about the audio. I may be audio-biased, but I think it dramatically cheapens an otherwise amazing looking (given the destination) video. Imagine how much more impressive it would be if the audio quality increased along with the video.

Thanks for the article.
Said this on 3-2-2009 At 04:19 pm

Sigh. I hate to air my dirty laundry, but this clip was produced as a video test tape, with audio quality secondary. So I wouldn't draw any conclusions about YouTube's audio quality based upon this clip.

Thanks for weighing in.

Said this on 3-2-2009 At 04:19 pm
Great feedback, I will do so soon.


Trevor Harris
Said this on 3-3-2009 At 07:11 am
There is a simple fix for the jerkiness which is a bug. Go into hd mode press the pause button move the handle to the begining of the clip and play. The jerkiness seems to be related to switching from SD to HD may be something to do with the cache. Complain to Youtube if they get enough complaints they may fix it.
Said this on 3-20-2009 At 05:56 pm
Hi, I am having problem about uploading HD videos to youtube. The thing is, I usually convert my 640 X 480 videos to 1080p HD, but when I upload the converted HD video to Youtube, the resultant video is not HD. The "watch in HD" button at the bottom right won't even show up. I convert my videos using AVS video converter, which in turn uses H.264 codec for any kind of HD conversion. Well, Youtube used to show my videos as HD like a month back, but recently no matter what I do, Youtube doesn't make my videos available in HD. I think I should also mention that I have also tried 720p HD, but the result is the same. As a result, the uploaded videos look crap (not quality enhanced, but stretched). I am so frustrated. Do you have any solution to this. Thanks a lot in advance!
Said this on 3-24-2009 At 02:27 am
Jan, awesome article! I was in the process of trying to figure our the specs myself....and it's much easier to read, thank to do! Great job haha.

Here's what I know (an intermediate editor using Sony Vegas)

*H.264 is the encoder to use
*1280x720 is a must

Now, what happens if I upload the native 720p video (59.940 frames per second). Youtube re-encodes down to 30fps, which would delete frames.

Would it be best to render the video with 30fps before uploading?
Jan Ozer
Said this on 3-24-2009 At 09:54 am

Thanks for your note.

Tough to debug problems remotely. All I can tell you is that uploading 720p videos has worked for me. In general, whenever working with YouTube, you should upload videos at the resolution you want displayed.

Sorry I can't be more helpful.


Jan Ozer
Said this on 3-24-2009 At 09:56 am

Thanks for your note!

My policy with YouTube is to always upload in exactly the specs that I want displayed so YouTube has to do as little processing as necessary. So I would definitely change the frame rate before uploading.

Thanks again for your note.

Said this on 3-30-2009 At 10:59 am
Forget about fancy/pricey software and hardware and buy the right low low cost HD camcorder that shoots in AVCHD. Here's a few tests to show visual quality (watch in HD):
a) This video shot indoors with natural lighting from window

b) This close-up video of "hairs" on a miniature cactus plant - again shot with low cost camcorder:
Said this on 3-30-2009 At 11:04 am
Just buy a cheap cheap AVCHD camcorder that shoots 720p and let YouTube do the work. Here's an example that was shot indoors with natural light:
Said this on 3-31-2009 At 11:43 am
Hi Jan,
This is great! I am diving into the world of FLV for corporate applications, if it makes sense and this bit of info helped a great deal in getting a jump ahead!

Jan Ozer
Said this on 4-1-2009 At 09:19 pm
Looks great, keep up the good work!
Jan Ozer
Said this on 4-1-2009 At 09:20 pm

Wow, my little web site helping a Streaming Media All Star such as yourself. I'm very proud!


Glad to be of service, Nico, and please drop by often.

Said this on 5-5-2009 At 10:09 am
Great article and very informative
Said this on 6-5-2009 At 02:42 pm
Nice article

Though in my case Youtube didn't touch frame rates of the uploaded 20 fps and 25fps 720p videos. Also the bit rate was fairly low 500-700 kbps. The videos were basically screencasts.
Jan Ozer
Said this on 6-5-2009 At 03:09 pm

Thanks for weighing in. Would love to see a link to your youtube videos; i haven't had such great results with screencasts on youtube and I'd like to figure out how to do it.
Said this on 6-15-2009 At 10:11 am
In the last few days, Youtube have updated HD handling such that it streams much better without even having to click on HD. The blur is gone too.

For submissions, I just publish in 720p from Windows Movie Maker.
Anders S Sorensen
Said this on 7-13-2009 At 06:49 am
Good Article, very informative, but why dont youtube run the same number of b frame interval as you recommend, if thats a plus for the encoding quality, or are they?
I have seen some of your videos at Vimeo, do you have any ideas which standards Vimeo uses, or can you recommend enconding options suited for Vimeo, (not that you can compare youtube and vimeo content imo)
Anders S Sorensen
Said this on 7-13-2009 At 07:02 am
one more on the go..:)
Do you have any ideas how to make videocontent more smooth eksamble with borderlines on things in movement, especially HD content looks a bit unnatural in the way it moves - laggy sort of way..
Said this on 7-14-2009 At 11:02 am

I don't have any association with YouTube and don't know how they chose their parameter. I'm guessing that the differences are minor; the key points (for me) are that they use the High Profile and CABAC.

I haven't studied Vimeo's outputs. Key for me is that they don't scale down 640x480 screencams, while YouTube does. That's why I use them. For real world video, YouTube is great, but screencams come out awful.

Not sure that i understand your final question, sorry. Please rephrase, thanks.
Said this on 8-24-2009 At 03:04 am
ok, i get it.
how about key frame ? you said higher the better, how much ?
will the automatic frame re-ordering work better ?

any little words for newbie would be great. this is a wonderful article with lots of info. thank you so much.

-- ruben
Said this on 8-24-2009 At 11:34 am
Hey Ruben;

Thanks for the kind words. YouTube used a key frame every two seconds, I prefer one every ten seconds.

YouTube did use frame reordering - whenever a file has B-frames, the producer used frame reordering. Note that the term "frame reordering" is an Apple concept from Compressor, not a true H.264 concept.

You've inspired me to create a new article H.264 for the newbie. You can view it here.


Gustav Forsberg
Said this on 11-11-2009 At 04:22 am
Thanks a lot for your article. Saved me a lot of time.
Said this on 11-11-2009 At 09:26 am

Glad to help. Thanks for writing.

Said this on 11-24-2009 At 08:54 pm

Thank You for educating me on this subject :-)
Said this on 11-24-2009 At 10:31 pm
my pleasure, glad you found it helpful.
Said this on 5-16-2011 At 05:44 pm
That's not just the best answer. It's the besetst answer!
Said this on 5-16-2011 At 09:18 pm
Glad you found it helpful.

Said this on 3-6-2013 At 07:28 am

Question - So what would be the i & p frame and GOP lenght for


1080p @ 30fps at a bit rate of 16bit


Tried to understand yours but struggled



Post a Comment
* Your Name:
* Your Email:
(not publicly displayed)
Reply Notification:
Approval Notification:
* Security Image:
Security Image Generate new
Copy the numbers and letters from the security image:
* Message: