Firefox Video Element Patch Version 4
Version 4 of the Firefox Video Element Patch is up. It has a number of bug fixes and contains changes suggested by the reviewers.
Before applying the patch to the Mozilla Firefox CVS trunk, you should first apply the third party modules patch. Another option is to just use the git repository I've been maintaining.
One major change is I'm no longer using PortAudio. Instead I'm using the Sydney Audio library included with liboggplay. This works well and now sound works across Windows, Linux and Mac OS X for both debug and optimized builds. I abstracted out the sound library implementation behind an interface. If it is decided to go to another library it's fairly simple to implement that interface.
I've done binary builds for Windows, Linux (x86) and Mac OS X (Intel). They are available at the test page. I put together. Remember this is alpha code from the CVS trunk with the patch applied - it may crash or do nasty things so run it in a Firefox profile specific for testing this (using the -P or -ProfileManager command line option for example).
If you try it out, let me know of any bugs you come across, or if the Git repository doesn't build on your platform. I'm off to the Mozilla All Hands meeting in Mountain View next week, so if you're in the area and want to meet up, let me know.
Categories: firefox, ogg
Before applying the patch to the Mozilla Firefox CVS trunk, you should first apply the third party modules patch. Another option is to just use the git repository I've been maintaining.
One major change is I'm no longer using PortAudio. Instead I'm using the Sydney Audio library included with liboggplay. This works well and now sound works across Windows, Linux and Mac OS X for both debug and optimized builds. I abstracted out the sound library implementation behind an interface. If it is decided to go to another library it's fairly simple to implement that interface.
I've done binary builds for Windows, Linux (x86) and Mac OS X (Intel). They are available at the test page. I put together. Remember this is alpha code from the CVS trunk with the patch applied - it may crash or do nasty things so run it in a Firefox profile specific for testing this (using the -P or -ProfileManager command line option for example).
If you try it out, let me know of any bugs you come across, or if the Git repository doesn't build on your platform. I'm off to the Mozilla All Hands meeting in Mountain View next week, so if you're in the area and want to meet up, let me know.
Categories: firefox, ogg
Labels: mozilla

14 Comments:
Are you going to include the Ogg Speex-codec in your work?
It would enable native VoIP applications in Firefox without Flash or Java!
Regards
Martin
Even if Speex playback wouldbe included (which is easy to do thanks to the oggplay library used) this wouldn't give a native VoIP solution.
You'd need...
- a Speex encoder, not just an encoder
- cross-platform audio-capture support
- a low-latency data transfer protocol (e.g. something UDP based)
- some JavaScript interface to glue it all together
Of course if your VoIP application would be simple consumption of precompressed audio files then adding Speex would indeed fulfill your use case.
Maik Merten
I am actually working on a Firefox extension which has components coded in C++. I am interested in adding audio encoder. Has Sydney Audio capture support ? (PortAudio had ...) I would prefer to user the same family of libraries in the extension.
About speex, I would appreciate if it would be included, the filesize of speex is very, very small and that would be great for podcasts, presentations and other voice-mostly stuff.
Btw. I am currently building firefox from the git clone, cross-platform, from same source tree and have just documented the required steps in my blog: http://rsaccon.com
From my post above: "a Speex encoder, not just an encoder" should of course read as "a Speex encoder, not just decoder".
I prepared another demo of Ogg Theora video embedded into a webpage:
Superman episode
(it uses the video-tag if support is detected, otherwise it tries some media plugins or a Java player applet).
Wikipedia also uses Ogg Theora. The "Play in browser" functionality uses a variant of the code used in my example.
Wikipedia videos
By the way, Ogg Theora currently has no really simple Win32 tool for converting content (most simple tools is VLC, but it creates buggy files).
If somebody knows how to mess with DirectShow and Win32 GUI programming an easy to use encoding application e.g. using http://www.illiminable.com/ogg/ would be a highly welcome contribution.
(of course this could also be implemented as Firefox plugin using XUL or without using the Ogg DShow filters but directly interfacing to libvorbis and libtheora)
Maik Merten
Video is getting into FF3 ?
I tried to cross-plattform-build firefox, it worked on mac but on windows, when I try to start the fresh build browser, I get:
$ ./obj-i686-pc-mingw32/dist/bin/firefox.exe
WARNING: NS_ENSURE_TRUE(compMgr) failed: file Z:/code/video/mozilla/obj-i686-pc-mingw32/xpcom/build/nsComponentManagerUtils.cpp, line 9
I used the .mozonfig as suggested in http://www.bluishcoder.co.nz/2007/07/building-video-element-enabled-firefox.html
any ideas what is wrong ?
It actually worked to start windows firefox, just took extremly long to start (guess becauese of the Parallels network drive). The error message I posted before just showed up during the startup.
Jigar, I'm working very hard to make sure it gets included in FF3. The intention is for it to be included but whether it makes the final cut depends on a number of things (review of the code, getting it completed, the third party libraries used being accepted, etc)
Roberto, on Windows I used the following .mozconfig:
. $topsrcdir/browser/config/mozconfig
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-@CONFIG_GUESS@
mk_add_options MOZ_CO_PROJECT=browser
ac_add_options --disable-tests
ac_add_options --enable-debug
ac_add_options --disable-libxul
ac_add_options --enable-ogg
Note the enable-ogg, which is needed to enable to the video support. I use disable-libxul for testing but you could try removing that line and see if it makes a difference. For the binary build on Windows I had that line removed and --enable-optimize added. But I also tested with disable-libxul and enable-debug.
Let me know if it works ok, there's the possibility something else may be wrong.
Roberto, great! Glad it's working now. And thanks for posting about how to do the build.
Anonymous, the speex codec is included as Maik mentioned due to the oggplay library usage.
Regarding the VoIP idea, one possible approach is to use something like Movino.
This is an open source system for streaming video and audio from a cellphone.
Using it I can use the camera in my phone to stream to a server, which then provides an Ogg theora stream of that data. You can use the video element in Firefox to view this. Multiple people can view the stream. In my tests it worked fairly well.
Perhaps something could be built on this.
I'm not sure embedding audio/video capture in the browser will be too popular - some people might be concerned about privacy issues if a web site can see and hear them! I think it would be pretty cool though. Maybe something to play around with if I get some time.
Hi Chris, I'm another antipodean Mozilla hacker. I'm working at Songbird these days. It would be great to talk to you about media in Mozilla while you're out in the Bay Area if you've got some time. I know your goals are different from ours but there might be some places we can collaborate and some work we can share.
Ian
Sweet :).
If you are looking at xul based VOiP things have a look at http://www.openwengo.com/.
Ian, sure I'd be keen to catch up while I'm there. My email is chris.double@double.co.nz if you want to get in touch.
hi. Just a quick question, and apologies if this has been covered elsewhere, will Firefox's audio support include the FLAC codec?
Post a Comment
<< Home