[TBA]: h.264 Video Analysis, and Improving TBATV Video Quality

In response to this earlier thread and some PMs, yesterday I spent some time analyzing the h.264 video codec for possible use on all of the video on The Blue Alliance, though more specifically in regards to the streaming video.

The reasons for choosing this video codec is the superior video quality, compatibility with iDevices (iTunes, iPhone, iPod, etc), and the fact that Flash 9 now has built-in support for h.264 video. The downside to this format is that it takes computer with quite some heft in the processing department to encode it at a reasonable speed (I was able to able to transcode at about 150% to 200% of playback speed at 70 to 80% CPU.)

For the following tests, I used this match*. All h.264 encoding was single pass, as the time increase spent doing a double-pass was not worth the minimal increase in quality/decrease in file size. The software used was Visual Hub, and the testing was one on 24" iMac, with 2.8 Ghz Core 2 Duo, 2 Gb 800Mhz DDR2 RAM, and NVIDIA 512mb 8800gs, running Mac OS X Leopard.

At the low end, encoding into h.264 streaming gives much better results over the Flash codec at a minimally higher file size. Here is a screenshot of the existing Flash streaming video versus the h.264 streaming video:


As you can see, on average a 0.5 to 1.0 Mb increase in file size, coupled with the h.264 codec, results in a huge increase in video quality. The native resolution of the video ends up being slightly higher, and the quality ends up being much improved. Under Flash, any of the text in the video is barely legible, whereas under h.264, the text legibility is much improved.

The video settings for the h.264 encoding (shown above) were 432x320px, 29.97 fps, ~300 kbps (variable), and with mp4a audio codec at 44 khz.

On the high quality (downloadable video) end, the difference in end file size and quality of the TBA downloaded WMV versus the h.264 is mimimal. However, since the h.264 was transcoded from the WMV, one cannot attempt to get a higher quality at the same bitrate, resolution, and file size. The only way to throughly test this would be to have an uncompressed original match to start with, of which I don’t have any on this computer. (I have a lot on my home desktop, through…). These tests will remain until a further date to be evaluated, unless someone else in the CD community wants to volunteer. :wink:

What these results throughly show is that by transcoding the streaming video into the h.264 video codec (instead of the Flash codec), it results in a large increase in video quality and crispness with a minimal increase in file size. The final h.264 video remains playable with the Flash 9 video player used on TBATV. This higher quality video allows the user to see much more detail (including having the ability to read text from the video), without having to download the full-quality (approx 20mb) video, which can end up actually saving bandwidth on the TBA servers.

So, here is where I open this up to the thoughts and opinions of the CD community.

What would you think about converting all of the streaming video over to h.264? How many people out there have iPhones or iPod Touches (or other mobile devices) and would like to watch match video on them?

  • I had to. Both of the teams I help mentor were on the same alliance, even though they lost 100-106. :wink:

The video quality looks insanely improved. I would say definitely go for it and convert from flash to this.

Nice work Art, once again.

I had emailed TBA about this earlier and I would love to see the change to x264.

That. Is. Sexy.

As an iPhone user (white 3G), I’d definitely take this over having to hunt down matches on the YouTube app, as I find myself using my iPhone to explain FRC quite often. Beyond that, not every computer’s browser I’ve experienced seems to like Flash videos as much as they do good ol’ QuickTime. (TBA flash videos don’t load at all at school; they stay in a perpetual loading state.)

Is there a free (either as in speech or beer) method of doing this transcoding? I’m certain there’s folks out there whose computers are itching for such a task.

Try this one, the download portion is at the bottom. Our webpage dude says it works well, i don’t know. So could someone try it out.

Converting the videos isn’t killer. I think I can just borrow a desktop and throw all 100 gigs of video at it and come back a week later.

Flash 9 supports h264 streaming the same way it supports FLV streaming. I haven’t tried to do this with the Flash player The Blue Alliance uses, but this would let everyone (who is using Flash 9, at least) get the higher quality streaming videos without significantly increasing the download size.

If we wanted to be really redundant, we could also offer the FLV for people on older systems, particularly because decoding h264 isn’t the friendliest thing to do to your processor. This offers a disk space tradeoff though.

I think I will experiment with replacing the FLV streaming videos with h264 versions and do some compatibility testing. If anyone wants to step up and try this out themselves the way Art did, I would love to benefit from your knowledge :-). College keeps me busy :o