Today I had a pleasant surprise when I was able to get a H.264/AVC encoded MP4 video to play on Chrome (34.0.1847.131), Firefox (28.0) and Safari (5.1.7) using the native HTML5 video element. I’m also told that Internet Explorer 11 works, and has apparently had partial support since version 9.

I also had some luck getting this to work with videos hosted Google Drive: HTML5 Video Streaming from Google Drive.

Here is the video:

Please note that MP4 doesn't work out-of-the box on Chrome or Firefox because of software patents, so you will need to have a thrid-party H.264 decoder installed. See this page on MDN for more information.

And the source code in all its simplicity, as it should have been years ago:

<video controls="controls">
    <source src="" type='video/mp4'/>

This is exactly what us developers wanted from HTML5 video since the beginning; a ubiquitous video format that works across all major browsers with no more having to store multiple encodings of each damn video just to cater for different browser vendors and their ridiculous licensing schemes. Well, now we have it (mostly), and it seems that H.264 MP4 has won the race.

Remember that Chrome and Firefox people still have to have a H.264 decoder installed on their system, but they are mostly likely going to be tech people anyway who will already have it installed. It would be interesting to see some statistics on this, but thats a job for another time or person.

Unfortunately the prevailing video codec (H.264) is about as patent encumbered as a NASA spaceship, which begs the next question; what’s left for Theora and WebM? I’m a massive advocate for both Theora and WebM, mainly since I like to be able to encode videos without having to pay royalties to MPEG LA … I know, crazy right? At this stage though, these codec’s “openness” may not be enough to shift the balance.

Drop a comment with your browser version and weather or not it works for you, or if have any other thoughts to add.