On Wed, Nov 19, 2008 at 12:30 AM, Erik Moeller erik@wikimedia.org wrote:
You may have already seen the FVorbis implementation of Vorbis in Flash 10: http://people.xiph.org/~arek/pg/hx/test.html
This is a more integrated demo of the same approach: http://www.omtk.org/js/demo-mod.html
The FVorbis implementation uses lower CPU on my system, but in any case, this definitely seems like a viable approach to bring at least Vorbis to many more people - especially when combined with native support in Firefox 3.1 and the existing Java player.
Along these lines participants may be interested in Adobe Alchemy: http://labs.adobe.com/wiki/index.php/Alchemy:Libraries
Alchemy is a C -> AS3 bytecode compiler. It allows developers to take arbitrary C code and compile it so that it runs in the Flash 10 virtual machine. Adobe is distributing a couple examples, including the Vorbis library and some encryption code (presumably useful for creating Flash media DRM).
The Vorbis in Flash (10) examples that Erik linked to above were created by reimplementing Vorbis decoding in other programming languages specifically targeted at flash. While that approach is likely to produce higher performance results it takes a large amount of developer resources to create and maintain. With Alchemy Flash can make use of the existing reference code.
This also means that a port of other codecs such as Theora, Speex, and Flac should be more straight forward. It should also make things like a flash DJVU browser much easier to create.
A similar c->bytecode process is also possible for Java, through a project called NestedVM (http://nestedvm.ibex.org/), although I'm not aware of any codecs using it yet as it's a bit difficult to interface NestedVM software with regular Java code.
The performance of these VM solutions will never be as good as native support, if for no other reason than the software will have to be transferred to every user. But more compatibility and more options are always good.