Reality and Practice
And so, at last, happiness has arrived. Starting with a certain version, Flash began supporting H.264, and even with heavily compressed AAC-HE audio. Microsoft got scared, and announced that future versions of Silverlight will also have H.264 support.
Thus, a certain parity was established between the elephant and the whale, and paradise arrived for website owners. Well, almost. Except for the fact that H.264 in Flash lags ungodly at resolutions above the standard 640x480. Silverlight with its VC-1 runs two to three times faster, but it's still only installed on about 30 percent of all internet-connected computers.
So what options are there then for hosting video on sites?
1. Use Silverlight and Microsoft Expression Studio for encoding in VC-1. It is paid, true, but they hand it out as a freebie to students with an ISIC through the DreamSpark program, just like many other development tools from Microsoft.
2. Use Flash, for example the popular JW FLV Player, and encode in H.264 using some program, an ungodly amount of which have spawned recently. Apple's paid QuickTime is not bad, but it doesn't understand MPEG on input, at least I couldn't find how to do it on Windows. But at least it's easy and convenient to use. Word is Nero Recode is also good at encoding into h.264, but all my attempts to use it ended in failure: it either glitches out or refuses to let you choose the necessary parameters.
In the end, I settled on a very decent program called Xvid4PSP by a Russian developer going by the handle Winnydows. The program is free, because it's simply a shell for a bunch of open-source projects like ffmpeg and h.264. By the way, I also tried using ffmpeg directly from the command line on Linux, but I never managed to create an h.264-encoded video. It's not for nothing that the ffmpeg developers write on their official site that the program is not meant for direct use, but rather for inclusion in other packages, roughly the way it's done in XviD4PSP.
In any case, the good news is that the resulting h.264 in an MP4 container can be played by Flash, QuickTime, and even on all sorts of iPhones and Nokia 5800s. Naturally, it also plays effortlessly on a computer using any player, as long as an H.264 decoder is installed.
3. Use third-party video hosting, such as YouTube, which recently started supporting h.264, dubbing it “high quality”. Or Vimeo – it uses a worse codec, VP6, but it also looks alright, plus h.264 support is not far off.
The Future and High Resolution
So all in all, things on the web are looking pretty good with video, but but still not perfect. But on the high-resolution disc front, everything is fine: the Blu-ray quality in full FullHD resolution (1920x1280) brings unbelievable joy. On the flip side, the required processing power is a bummer: usually you need at least a dual-core Intel Core 2 Duo, and even that isn't always enough. For it to be enough, you should install the CoreAVC filter, which contains the fastest H.264 decoder in nature. And if you have a graphics card with hardware video decoding support, like the ATI HD2600 – it makes sense to install the PowerDVD player, which contains a codec with support for this feature.
Meanwhile, the free ffdshow codec lags ungodly on FullHD H.264, just like the codecs of all other companies.
In principle, that would be the end of the fairy tale, but out of the important stuff, here's what's worth mentioning. All the aforementioned codecs contain patented algorithms. This already sounds idiotic, and in practice, it's even worse – codecs are either paid, or free, but not very legal. Luckily, not all countries recognize algorithm patents, and the owners prefer not to go after free codecs – there's little benefit, and a lot of money goes down the drain. In any case, all these codecs (originating from the MPEG consortium) use one and the same base algorithm - block-oriented motion-compensation-based, I won't translate or explain it in detail.
But the possibility of using wavelets for video compression has been researched for quite a while now. In the end, they researched their way to a result – the British state channel BBC, known for many things, made a wavelets-based codec called Dirac . Aside from such pleasant features as being free and open-source, Dirac is also patent-free and extremely efficient.
The downsides – hardly anyone knows about it, there's almost no software support, and it hogs the processor even worse than H.264. But these things are fixable, so so in theory the future belongs to Dirac, although not the near future. That is, if they don't come up with something even more advanced. In any case, the MPEG family isn't going anywhere, because it has the broadest support in broadcasting standards and devices, and besides, H.264 is good.