The HTML5 Video Tag’s Fatal Flaw

Back in the day there was no standard way to publish video on the web. You could put any kind of video file you wanted on the server, but there was no guarantee that your readers would have the correct plugin required to view it. Everyone had to have a bunch of plugins installed to have any hope of viewing the majority of video files.

Flash video solve this problem. Flash was installed on nearly every computer anyway, so once they added a video decoder it seemed obvious to provide video content in Flash, even if it was in many ways not as good as the older plugins. Flash video uses massive amounts of processor time and slows down everything else on your computer. On the other hand, websites like Flash because it is easy to skin the player to fit in with the look of the site, and it makes downloading the raw video file (slightly) more difficult.

The <video> tag is supposed to replace Flash by linking to video files in the same way that the <img> tag links to images. In practice this is more complicated than it sounds because videos typically require the ability to skip and rewind content. This means that the browser must be prepared to download different parts of the file and cache things carefully to maintain performance. But these problems have long been solved.

I have been waiting for the big sites to make announcements, and today seems to be <video> day all over the internet. Both YouTube and Dailymotion have demo pages up showing <video> content:

YouTube’s HTML5 Page is designed to show how the <video> tag can replicate the functionality of their famous Flash-based player exactly. Unless you looked at the source (or your OS’s process monitor) you would never know you were using a different player.

The Dailymotion HTML5 Demo is even more impressive, using the <video> tag in combination with fancy Javascript to post-process the video and extract frames.

All this is very cool, but the two demos reveal the video tag’s fatal flaw : codecs. When the video tag was proposed, all browsers were supposed to support an unencumbered decoder named Ogg Theora (no seriously, that’s its name). There were just three problems:

  • Ogg Theora’s quality was not as good as other codecs
  • Although Ogg Theora was designed to be free of patent issues, it was felt that it may be a bit of a lightning rod for litigation.
  • Certain companies may have a vested interest in seeing their own codecs used.

So the requirement to support Ogg Theora was dropped. This means that although all HTML5 browsers will support <video>, there is no guarantee that they will be able to play and particular file. Firefox (at least the 3.5 beta) plays Ogg Theora, but Safari plays H.264 (a superior but expensive to license codec) but not vice versa. For instance, one of the demos above plays in Firefox, the other plays in Safari. This puts us in the farcical situation of having no standard way to publish video, exactly where we started.

There is also the small point that the most widely used browser (IE) does not support the video tag, and probably won’t for years. I predict that Flash video will be around for a while yet, and I am not happy about it.

New Zealand Public Holidays

Queen’s Birthday has snuck up on me again, as it does every year.

I can never seem to keep my public holidays straight, particularly the floating ones, but that is not going to be a problem anymore now that I have found that the Department of Labour publishes all of New Zealand’s public holidays in iCalendar format.

Now that I am subscribed to their feed I should never forget an upcoming day off again. It’s such a pity that after this weekend we don’t get anymore holidays until October.

Wellington

For a blog called “Life of Andrew”, this site doesn’t actually have a lot about my life. This is partly because I am a cypher with an impenetrable air of mystery and partly because I am very boring. But I have recently moved cities and felt I should mark the occasion.

That’s right, I am now officially a Wellingtonian (well, technically speaking a Poriruite but who is counting?) I was lucky enough to be offered a temporary place to stay by a friend of mine who I knew had had awesome house right on the coast in Plimmeton, so of course I accepted straight away. When I actually came to make the drive from Auckland I was perturbed to find that he had moved into a unit since I was last down. I shouldn’t have worried, this is the view from the “unit”:

viewfromunit

It turns out to be a 3 story town house on a cliff overlooking Porirua Harbour. It is a little out of the way, but since I am working from home this suits me fine, so I am now officially paying rent as a long-term flatmate.

My furniture arrived today. Trying to fit a house-load of stuff into two rooms is proving difficult, but it is great to actually have a real bed to sleep in for a change.

Being the capital, Wellington has capital features such as Landscape (with a capital L) which makes the Auckland volcanic cones look like molehills – it is a very pretty city. Unfortunately Wellington also has Weather (with a capital W) – the city does tend to get in the way when the atmosphere decides it needs to be somewhere else. I think I have seen more wind in 2 weeks than I ever saw in Auckland, but the fine days are fantastic and it is certainly dryer in general down here.

It takes time to adjust to a new city, I am still finding out where the useful shops (P.B.Tech has a branch down here!) and facilities are. But so far everything has gone amazingly smoothly.

I think I am going to enjoy Wellington.

Film Review : Star Trek

Once again Hollywood dredges up the corpse of a much-loved TV show to desecrate with a pointless remake that misses the whole point of wha….Hey wait a minute! My brain just typed that automatically. Even now I have trouble gathering my wits to write the truth, so shocking and unbelievable it is! Give me a minute and I will try again…

startrek

The new Star Trek film is actually pretty good.
Continue reading

Longest Word You Can Type (QWERTY Edition)

My previous blog entry on TXTing provoked this response from my friend Lloyd:

…[I] figured out that longest word typed with only the upper letters in the QWERTY keyboard is not only TYPEWRITER but also includes several 3 other words: PERPETUITY, PROPRIETOR and REPERTOIRE. The longest in the middle line is: GALAHADS and nothing from the bottom line but 2 character element symbols like: Zn

Obviously this is some sort of geek challenge. I accept!

Using Python I replicated Lloyd’s results for the top row of the QWERTY keyboard:
PERPETUITY, PROPRIETOR, REPERTOIRE, and TYPEWRITER

Lloyd’s result for the middle row is highly suspect – GALAHADS is the plural of a proper noun. www.thefreedictionary.com does cite a couple of references, but it certainly isn’t in the dictionary I am using. My results are:
ALFALFA and HALALAS (a unit of currency in Saudi Arabia)

There is nothing of note on the vowel-forsaken bottom row.

The longest words that can be typed using only your left hand are:
AFTEREFFECTS, DESEGREGATED, DESEGREGATES, RESEGREGATED, RESEGREGATES, REVERBERATED, REVERBERATES, and STEWARDESSES

For the right hand I get:
HYPOLIMNION (the bottom layer of water in a deep lake)

It seems that Lloyd and I are not the only ones to try this experiment, Wikipedia has completely different (and even more obscure) words listed.

Book Review : Three Books

Jonathan Strange & Mr. Norrell: A Novel by Susanna Clarke

jonathanstange

Possibly going for the title of “Most English Book Ever Written”, Jonathan Strange & Mr Norrell tells the unlikely story of two magicians in the early 1800s, a time when magic is all-but forgotten. The two title characters have very different approaches to magic and life in general, and it their alliance/rivalry that drives the story.

As historical fantasy goes, this is pretty good stuff. It is written in a pastiche of Dickens and Austen, and draws a lot from the English folk-tales that I read a lot of as a kid, with fairies and witches behind every tree. The only criticism I can think of is that it is quite long and does go on a bit. But if you can stand the deliberately baroque style then you will enjoy reading this.

Highly recommended if you like this sort of thing

The Complete Chronicles of Conan By Robert E. Howard

conan

I am not sure how, but up until now I have managed to avoid reading any of the thirty thousand Conan stories Howard wrote during his short lifetime. Set during a vanished age of savage heroics and ancient cities reclaimed vast deserts, Conan wanders around getting involved in various plots. Almost all of these stories contain two or more of the following elements: an ancient cult, a god-like being from another world, a princess whose clothes fall off, pirates, and giant snakes. Also, Conan beats up an awful lot of random people he happens to meet.

Despite the fact that all the stories are very similar, I enjoyed reading this collection (actually I am not sure that this is the same book, but they are essentially interchangeable). Howard, the original fantasy dweeb, had a straightforward way of telling a story that makes for easy, undemanding reading, and who doesn’t enjoy a musclebound barbarian slicing up a huge bat to rescue a naked chick? The casual racism is less easy to overlook, but this is not uncommon in books this old.

Recommended only if you like this sort of thing

Measuring The World By Daniel Kehlmann
measuringtheworld

More historical fiction stuff, this time featuring the real historic figures of Gauss and Alexander von Humboldt in early 1800s Germany. Both men are obsessed with measurements. Gauss, a super-genius, needs only has flashes of insight to encompass in his mind a world he does not feel a part of. von Humboldt is an explorer who becomes legendary for his globe trotting exploits and careful observations. The book contrasts their different approaches in the face of the difficulties of the time.

I am in two minds about this book, it is written in a very conversational style that perhaps does not do the story justice. It may have lost something from being translated from German, but it just didn’t grab me. The story is fascinating though, especially von Humboldt’s part. I hadn’t heard of him before but he certainly lived a rich life.

I think what really lets the book down is that just about everyone mentioned comes across as extremely unlikable, as if 19th century Germany was filled with complete bastards. This may or may not have been true but it makes for hard reading.

Interesting but not really recommended