Testing YouTube's 1080p HD Offering
On November 12, YouTube announced that "1080p HD Is Coming to YouTube." In this article, I'll describe the type of file you should upload to trigger 1080p encoding, analyze the 1080p files created by YouTube, and detail the other files created by YouTube in addition to the 1080p file.
My workflow was simple; I uploaded four 1920x1080 files to YouTube: one a 1080i file in HDV format, the others 1080p files in H.264 format, encoded at about 10Mbps. Then I went to YouTube and started downloading the files via the Firefox plug-in Download Helper.
YouTube encoded all four files into 1080p H.264 format. I used several tools to analyze the files, starting with Jerome Martinez's excellent MediaInfotool, which is available for both Mac and Windows. Here I learned the basics:
• firstname.lastname@example.org fps
• High Profile, Level 4
• CABAC enabled
• Data rate 3,514
• Bits/(Pixel*Frame): 0.057
By way of comparison, as discussed in my article YouTube does 720P HD using H.264, YouTube's 720p video was encoded at 2Mbps, for a Bits/(Pixel*Frame) of 0.072. The decrease in Bits/(Pixel*Frame) doesn't mean that the quality is worse; rather, it tends to prove that H.264, like all video codecs, is more efficient at higher resolutions. In any event, if the Bits/(Pixel*Frame) of your video is greater than 1.0, you may be able to cut the video data rate with no loss of perceived quality.
On the audio front, MediaInfo revealed that YouTube produced the stereo audio at 125Kbps (compared to 93Kbps for 720p), encoding with the AAC Low Complexity codec.
Other File Details
What else can we tell about the file? A quick look with Inlet Technologies' Semaphore product reveals a couple of interesting details.
First, YouTube uses a keyframe every two seconds or so; I personally use and recommend a keyframe setting of ten seconds. Second, according to Semaphore, YouTube isn't using any B-frames, just P- and I-frames. When I originally tested YouTube's 720p encodes, Semaphore revealed that YouTube was inserting two B-frames between P- and P-frames, and between I- and P-frames. I retested that file and reached the same conclusion, then tested two 720p YouTube files uploaded after that time and found that YouTube wasn't using any B-frames in those either.
In Compression 101, we all learned that B-frames were the most efficient frame because they can reference redundancies in frames located before or after the B-frame. This efficiency should translate the quality. The downside is encoding speed, since searching in both directions certainly takes longer, and also playback complexity, since to display a B-frame, you need all frames that the B-frame references to be decoded and available in the playback buffer. This complexity translates to higher horsepower requirements on the playback station, which could lead to dropped frames during playback.
From this data we could postulate that YouTube stopped using B-frames because:
• It was taking too long to encode the files.
• The files were playing back too slowly on some computers.
• B-frames didn't enhance quality enough to make a difference.
Or, it could be some other reason. Overall, since YouTube encodes more video files than any other site on the planet, it does give one pause. I'll have to rethink my H.264 encoding recommendations with this data in mind.
Other Files Created
In addition to the 1080p files detailed above, YouTube created a number of lower-resolution files for the files that I uploaded, as detailed in the table below.
I've run some other tests with YouTube involving SD/720 input files that you can read about here. In these tests, in addition to the Original and HQ options shown in the table, YouTube created so called HQ18 files (480x270 H.264 files @ either 415 or 525Kbps video), HQ35 files (854x480 VP6 files@1177Kbps video) and HQ22 files (1280x720 H.264 @ 2242Kbps video). YouTube did not create any of these file types for any of the four videos that I uploaded.
When did YouTube playback the files created? As you probably know, the YouTube player has three states; small embedded window, large embedded window, and full screen. You can also configure your connection speed according to the following settings.
With these variables in mind, YouTube appeared to display the files according to the following logic:
• Original file—small player, low connection speed
• HQ—small/large player, fast connection speed
• 1080p—full-screen player
The only consistently repeatable result was that YouTube only seemed to play the 1080p file during full-screen playback—the other two files generally appeared as noted, but not universally.
If you'd like to watch one of the files that I created, click here to see my favorite local band—Galax's own No Speed Limit—performing "Wayfaring Stranger."
• YouTube appears to encode all 1080 files uploaded to the site into 1080p format.
• The file is produced using the H.264 codec at about 3.5Mbps, in the High profile with CABAC enabled, but no B-frames. YouTube also creates at least two other formats for lower-resolution playback.
• The most reliable way to play the 1080p file is to click the full screen option in the YouTube player.