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: , , , ,

Tuesday, February 19, 2008

BBC to sell programmes through iTunes.

The BBC selling TV episodes via the Apple iTunes store right now. Hit series such as Torchwood, Little Britain and the first episode of current series Ashes to Ashes are already up.

Episodes are a rather steep  £1.89 each, or you can buy a whole season at some kind of discount (following the US model). Series 1 of Life on Mars would set you back £13.99. Mind you that's at a low  640*360 resolution with normal stereo sound, and no extras. You can get the DVD box set (i.e much higher quality image , 5.1 sound with the usual specious features) from Amazon for only another £2.

 It's a good idea, one that the BBC should have got into a long time ago, though now the BBC's own iPlayer seems to render the idea obsolete (the strategy of releasing shows on iTunes eight days is even specifically designed not to clash with iPlayer's seven day's for free policy) . The US iTunes store has thrived on selling episodes of the longer running TV series in the states where people have missed episodes and wanted to catch up. (which is why Lost was such a big iTunes hit). 

One wonders why the BBC would go down this route after launching the iPlayer.  One thing it does do is offer non license fee payers a way to see (some) BBC shows legally far sooner than waiting to rent or buy on DVD.  It should be noted that International co-productions (Such as big budget shows like the new Dr Who, produced with Canada's CBC, or the natural history documentaries produced with the Discovery Channel and Japan's NHK) are not being offered.

Labels: , , , ,

Thursday, August 02, 2007

Perian

Perian is an amazing component for Mac OSX quicktime that allows Quicktime to handle additional video codecs, including Flash video. If you want to use flash clips with the also-incredibly-useful MPEG Streamclip, (say to trim and convert videos downloaded from youtube) Perian will allow you to use them. It's just become one of those mandatory to install programs for me. I used it recently to convert some public domain video on Youtube to DVD and DV.

Labels: , , , , ,

Thursday, June 21, 2007

RE: YouTube on AppleTV, follow up..

Well, here's the answer.... Apple isn't installing flash on AppleTV; Youtube will re-encode all its content to the h.264 codec.

Now if only there were some specs on what quality that would be to. Is it larger than the 320x240 currently employed by YouTube? Allegedly 16:9 clips now play in full screen, but is it a proper 16:9 raster (eg 480x272 pixels) or anamorphically distorted from a 4:3 resolution? Is there a way (or a hack) to embed these h.264 clips in websites? For example Revver currently offers both Quicktime and flash as embeds, will YouTube offer that too? Would Apple let them? Quicktime may want to offer YouTube clips at a higher quality (gosh, what an incentive!) for AppleTV customers only, but alternatively could see a way of using Youtube to get Quicktime into even more computers.

Souces:
www.ilounge.com
www.AppleTVhacker.com

Labels: , , , ,