JavaScript H.264 decoder
Written by Ian Elliot   
Tuesday, 01 November 2011

Under the codename Broadway, a JavaScript-based H.264 decoder that is intended to run naively in Web browsers has been made available on GitHub. JavaScript slow? Think again.

The decoder, which can display video at 30 frames per second on conventional hardware has been developed at Mozilla Labs by Michael Bebenita who explains how he achieved this compelling demonstration of JavaScript’s performance potential on his blog.

Alon Zakai and I managed to take an existing H.264 decoder, simplify it, and compile it with Alon's awesome Emscripten compiler, which translates LLVM bitcode to JavaScript. The result is quite remarkable, we can reach a rate of nearly 30 fps decoding video purely in JavaScript, with no real optimizations other than what Emscripten already performs. There are lots of improvements ahead, such as hardware acceleration using WebGL, parallel processing, etc.

 

H264logo

Broadway was included a presentation at the ACM’s annual OOPSLA conference by Brendan Eich. The enthusiastic response to this demonstration, a shaky video of which can be seen on yfrog,  attracted some interest and has led to the source code being published on GitHub.

As Bebenita points out in his post, this project is at an early stage and the Broadway H.264 decoder will only perform as expected in recent Firefox nightly builds, which incorporate the latest JavaScript performance improvements—particularly a new type inference mechanism that gives JavaScript execution speed a considerable boost.

According to Ars Technica the Broadway project offers useful insight into JavaScript performance characteristics, but it's not really intended for real-world usage. Mozilla’s objections to H.264 on the basis of patent encumbrances still stand and make it unlikely that users will see the video codec supported out of the box in Firefox.

But a video decoder in JavaScript - who would have predicted that and its isn't Chrome but Firefox runing it!

 

H264logo

To download:

https://github.com/mbebenita/Broadway

 

To be informed about new articles on I Programmer, subscribe to the RSS feed, follow us on Twitter or Facebook or sign up for our weekly newsletter.

Banner


Cirque du Soleil Puts The Spark Into Drones
05/10/2014

With a little help from ETH Zurich and its quadcopter flying algorithms. 



Windows Not 9 But 10
01/10/2014

The next version of Windows has just been presented to the world and  the biggest surprise is that it is to be called Windows 10 rather than the more logical Windows 9.


More News

Last Updated ( Tuesday, 01 November 2011 )
 
 

   
RSS feed of news items only
I Programmer News
Copyright © 2014 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.