Friday, April 04, 2008

H.264 HD flash demos

Some extraordinary results for flash using the H.264 codec can be seen on this page. Double click the image for it to play in full screen. 

The encoding was done by Fabio Sonnati (his English language blog is here) and he gets a 1280x 720 version of the trailer for  the Sigur Rós concert/tour film Heima into a 500kb/s stream. To put that in context, Youtube's older .flv streams are usually at about 200-250kb/s at 320x240. So at just over twice the bandwidth, Mr Sonnati has managed to cram 12 times the image!

Now there are a few caveats. 
  • The Heima footage is very compression friendly: clean, grainless images, largely still frames or slow pans with little fast cutting and almost no fades or dissolves. Faster cutting, grainer footage or more movement (especially hand-held) would look much worse. (I posted before about how to get Youtube or web video in general to look better and Heima it seems follows almost all those rules - it still looks GREAT in HD though.)
  • This was hand crafted compression. On his blog S. Sonnati explains that he worked very hard and carefully optimised the settings for the footage at hand. This wasn't a pre-baked server side formula as used by Youtube/Vimeo et al.
  • Despite the above, severe compression artefacts are very clearly visible on the footage, expecially in mid range detail, high frequency/contrasty detail shows up quite clearly but slightly softer textures and backgrounds quite obviously suffer at this extraordinarily low bit rate, and smooth gradients (such as skies and clouds) have noticeable quantizations blocks in them.
Still, let me just say that again, 720 HD at 500kb/s. The entire four minute video is only 15MB! 

S. Sonnati reckons "generic" 720p footage  (so a bit more aggressive, but not The Bourne Ultimatum or 24) would look OK at about 1 Mb/s and above (i.e. 2 times the data rate here) for similar results, 1080p would look OK at 2Mb/s and above.

By comparison, FFmpegX recommends 2.5 Mb/s for 720p and 5.8 at 1080p (assuming 24fps) if using all the features, encodes can be a little more efficient than that. Apple trailers in H.264 run at about 5MB for 720p  and 8-10MB for 1080p.

There are more examples at www.lithium.it/fvf/demoH264/demo.html, including a 1.5 Mb/s 1080p version of the Heima trailer, the far more visually aggressive trailer for a Nine Inch Nails concert film (1080p 2Mb/s), as well as some very sedate 720p BBC wildlife footage encoded at slightly higher bit rates. Be warned, you need a fairly powerful computer to watch the footage at their full frame rates (they work OK for me well on an 2Ghz intel core duo iMac with 2GB of ram) and the server they on doesn't really have enough bandwidth and there is a lot of buffering on the higher bandwidth videos.

Labels: , , , , , ,

Tuesday, March 04, 2008

Higher quality Youtube?

[update: It's working again!]

Seems there is a hack to get better quality out of Youtube!

add "&fmt=18" or "&fmt=6" to the end of the URL you of the vid you're watching and see the improvement in quality (tis doesn't work for ALL videos, some obviously haven't been re-encoded yet).

Below is an example, a project by some of my students.

Normal Youtube video is encoded as FLV (OnVP6) 320 × 240, 200 kbps, Audio mono, 22.05 kHz, 61 kbps

The higher quality video is encoded as MP4 (H.264), 480 × 360, 400 kbps, audio is stereo, 44.1 kHz, 118 kbps

So better resolution, better datarate, better codec, better audio.

However at present you can't embed the H.264 versions.

[UPDATE: On Thursday 6th March 2007. The "feature" seemed to have been disable. However by friday it is working again!]

Labels: , , , ,

Saturday, February 23, 2008

BBC iPlayer getting 1.3 million unique viewers a week...

According to BBC figures quoted in this Guardian Unlimited article. In addition it reports that "iPhone and iPod Touch owners will be able to access iPlayer content within the next few weeks. This will be the first time the broadband TV service has been available beyond PC and Mac computers." This means a move away from WMV for the high quality Windows only download to the H.264 codec (WMV is available on Mac and linux, but not the DRM). This would also make the downloaded videos compatible with AppleTV, even though AppleTV is not mentioned in any of the many articles carrying this story, Ashley Highfield, the BBC's Director of Future Media & Technology, discussed the possibility previously:
"Apple's (long anticipated) move to a rental model, means that we can look to getting BBC iPlayer onto this platform too, as we should be able to use the rental functionality to allow our programmes to be downloaded, free, but retained for a time window, and then erased, as our rightsholders currently insist."
This would make three services that are AppleTV compatible, after iTunes (which is already selling BBC shows) and arthouse movie download service Jaman. The Jaman plug-in is an unsupported hack not an official update (and I've no idea if it's been kiboshed by the recent AppleTV makeover). It's odd that Apple haven't been more welcoming to services like Jaman, since iTunes basically sells iPods as much as it sells music, the more third party services that are supported on AppleTV the more attractive it is as a commodity.

This article from The Register included an addendum which says "the BBC got in touch to say it will always offer a Flash version", presumably in the browser embedded player, but since flash is moving away from the old Sorenson Spark codec to H.264 too, the statement may mean the embedded player will remain SWF based, even if the codec is updated.

This hopefully will mean a significant step forward for H.264 becoming a de facto web standard for online video, since it will be seamlessly supported by Quicktime (installed on all Macs and 60% of PCs) and Flash (installed on 90% of internet connected computers).

Labels: , , , , , ,