Conrad Parker
2006-Feb-20 14:33 UTC
[Speex-dev] How to use Speex Cross-Browser, Cross-Platform on Web Pages
On Tue, Feb 21, 2006 at 09:21:32AM +1100, Jean-Marc Valin wrote:> Have you thought of using jspeex (http://jspeex.sourceforge.net/)? The > other way I can think of is to do the same as the Annodex Firefox plugin > (http://www.annodex.net) and use VLC. Conrad Parker might have some more > info on how to do that. Conrad?Hi, AFE currently has a bug where it can't handle audio-only files. Hopefully we'll fix that soon. Nevertheless, something like jspeex sounds better for this at the moment. Cooler would be a way of doing timed images + speex in ogg ... Conrad.> Jean-Marc > > Le lundi 20 f?vrier 2006 ? 14:50 -0500, Alex S. Brown a ?crit : > > My apologies if this request is a little outside the scope of the normal track > > of this discussion group. My question is more about the use of speex as a web > > developer than about the internals of the codec. I searched all over the web > > for this information, though, and am trying here as a last resort. > > > > I am trying to develop a way to offer slide shows with a voice-over. I would > > like to offer speex as a low-bandwidth option in addition to MP3 and possibly > > WAV formats. I am struggling to figure out how to support the "audio/x-speex" > > mime type across browsers effectively. > > > > Ironically, the one where I have had best success is with Windows Media Player. > > Once the DirectShow filters are installed on a PC, I use the <object> tag to > > invoke Windows Media Player, and it happily plays the speex file. (Ironic that > > this is the least-standard-compliant, least-open-source combination of web > > browser and OS, and the only one where I can get speex working!) > > > > I would like to be able to bring up a player with the correct, HTML 4.01 > > approach, that should support any browser that recognizes the MIME type and the > > correct use of the object tag. The tag looks like this: > > > > <object type="audio/x-speex" data="myaudio.spx"> > > If your browser does not support a player object, <a href="myaudio.spx">download > > the speech</a> and play it separately. > > </object> > > > > (The main object tag gives the mime type and file location. The text between it > > and the close is an alternate rendering, for browsers that cannot display the > > object tag.) > > > > My problem is that I am not sure which speex players will properly register the > > MIME type with the web browser and operating system, so that a ".spx" file will > > play and so that the "audio/x-speex" MIME type creates a player object. > > > > I have tried using Firefox under MS Windows, and Firefox does not even recognize > > the MIME type at all, even after installing DirectShow filters. It does not > > even know what to offer to download. > > > > I am happy to give separate tech support instructions for different browsers and > > operating systems, because my hope is that people will keep coming back to my > > site for educational information. I may offer WAV or MP3 formats for more > > casual users, or perhaps just short "teasers" to get them to download the > > decoders for the more efficient speex format. > > > > My hope is by getting an answer to this question, I can help promote the use of > > speex on the web. I certainly plan to send any solutions to the Firefox team, > > so that they recognize and offer to download players for the speex MIME type in > > the future. > > > > ---------------------- > > Alex S. Brown, PMP > > alexsbrown@alexsbrown.com > > http://www.alexsbrown.com/ > > _______________________________________________ > > Speex-dev mailing list > > Speex-dev@xiph.org > > http://lists.xiph.org/mailman/listinfo/speex-dev > > > _______________________________________________ > Speex-dev mailing list > Speex-dev@xiph.org > http://lists.xiph.org/mailman/listinfo/speex-dev
Alex S. Brown
2006-Feb-20 15:46 UTC
[Speex-dev] How to use Speex Cross-Browser, Cross-Platform on Web Pages
Thanks for the two suggestions. I tried VLC, and that did help with Firefox support. Unfortunately, VLC registers itself as a player only for the "application/ogg" type, not for "audio/x-speex". If I change my object code to request an application/ogg MIME type, it plays. I wish that it also showed player controls like QuickTime and other players do, but I am not complaining! VLC is Javascript capable, so I can drive the audio from the web page. Let me know if there are any potential problems with using application/ogg as the MIME type, since it may be better recognized. I downloaded the jspeex package. I am not so familiar with Java, so it will take a bit longer for me to figure out how to work this in. I looked at the ogg multimedia container, and I do think that images+audio could work well. Most other multimedia formats (besides flash) are very inefficient about the images, treating them as video even if they rarely change. I am trying to stay with HTML-based methods, so I can use hyperlinks and other techniques. The W3C Slidy approach also allows you to fall back gracefully for users who do not have a fancy browser with full plug-in support. Player support is so uneven in this area that it becomes very hard to support most users most of the time. Microsoft has its HTML+time that would be OK, SMIL (synchronized multimedia) would be great, and OGG could also do the trick. My main trouble is trying to stitch something together that I can maintain easily and that most users need few plug-ins for! Thanks for the quick replies. Hopefully my experiments will help other speex users. --Alex Quoting Conrad Parker <conrad@metadecks.org>:> On Tue, Feb 21, 2006 at 09:21:32AM +1100, Jean-Marc Valin wrote: > > Have you thought of using jspeex (http://jspeex.sourceforge.net/)? The > > other way I can think of is to do the same as the Annodex Firefox plugin > > (http://www.annodex.net) and use VLC. Conrad Parker might have some more > > info on how to do that. Conrad? > > Hi, > > AFE currently has a bug where it can't handle audio-only files. > Hopefully we'll fix that soon. > > Nevertheless, something like jspeex sounds better for this at the > moment. Cooler would be a way of doing timed images + speex in ogg ... > > Conrad. > > > Jean-Marc > > > > Le lundi 20 f?vrier 2006 ? 14:50 -0500, Alex S. Brown a ?crit : > > > My apologies if this request is a little outside the scope of the normal > track > > > of this discussion group. My question is more about the use of speex as a > web > > > developer than about the internals of the codec. I searched all over the > web > > > for this information, though, and am trying here as a last resort. > > > > > > I am trying to develop a way to offer slide shows with a voice-over. I > would > > > like to offer speex as a low-bandwidth option in addition to MP3 and > possibly > > > WAV formats. I am struggling to figure out how to support the > "audio/x-speex" > > > mime type across browsers effectively. > > > > > > Ironically, the one where I have had best success is with Windows Media > Player. > > > Once the DirectShow filters are installed on a PC, I use the <object> tag > to > > > invoke Windows Media Player, and it happily plays the speex file. (Ironic > that > > > this is the least-standard-compliant, least-open-source combination of > web > > > browser and OS, and the only one where I can get speex working!) > > > > > > I would like to be able to bring up a player with the correct, HTML 4.01 > > > approach, that should support any browser that recognizes the MIME type > and the > > > correct use of the object tag. The tag looks like this: > > > > > > <object type="audio/x-speex" data="myaudio.spx"> > > > If your browser does not support a player object, <a > href="myaudio.spx">download > > > the speech</a> and play it separately. > > > </object> > > > > > > (The main object tag gives the mime type and file location. The text > between it > > > and the close is an alternate rendering, for browsers that cannot display > the > > > object tag.) > > > > > > My problem is that I am not sure which speex players will properly > register the > > > MIME type with the web browser and operating system, so that a ".spx" > file will > > > play and so that the "audio/x-speex" MIME type creates a player object. > > > > > > I have tried using Firefox under MS Windows, and Firefox does not even > recognize > > > the MIME type at all, even after installing DirectShow filters. It does > not > > > even know what to offer to download. > > > > > > I am happy to give separate tech support instructions for different > browsers and > > > operating systems, because my hope is that people will keep coming back > to my > > > site for educational information. I may offer WAV or MP3 formats for > more > > > casual users, or perhaps just short "teasers" to get them to download > the > > > decoders for the more efficient speex format. > > > > > > My hope is by getting an answer to this question, I can help promote the > use of > > > speex on the web. I certainly plan to send any solutions to the Firefox > team, > > > so that they recognize and offer to download players for the speex MIME > type in > > > the future.---------------------- Alex S. Brown, PMP alexsbrown@alexsbrown.com http://www.alexsbrown.com/
Alex S. Brown
2006-Feb-21 17:44 UTC
[Speex-dev] How to use Speex Cross-Browser, Cross-Platform on Web Pages
I spent some more time with the Ogg and Speex format specs, and I realized that using the "application/ogg" MIME type is technically sound, since Speex is contained in an Ogg wrapper. To get full browser support, though, it is best to rename it so its file extension is "ogg". Some browsers do not support files where the MIME type and file extension are different, based on security concerns. I also posted a request to the VLC forum to have their browser plug-in and player support the "audio/x-speex" MIME type and the "spx" file extension. I am hoping they can do that quickly, since they can already play the format properly. If anyone wants to see the request, it is at: http://forum.videolan.org/viewtopic.php?p=54393#54393 I also looked into jspeex, and I think the best solution for me is a Java-based player that uses jspeex codecs. It is jlGui, and it comes in standalone and applet versions. It runs under any Java 1.3 or higher environment, so it is a great cross-platform solution for any users who cannot download a native player or plug-in for their browser. Here is a link to the player and applet: http://www.javazoom.net/jlgui/jlgui.html http://www.javazoom.net/applets/jlguiapplet/jlguiapplet.html The applet supports Javascript automation, which is one of my requirements. Both will play Ogg, Speex, and a wide variety of other formats. I hope this helps. If anyone knows of other Ogg-capable browser plug-ins that have not registered their support for the "audio/x-speex" MIME type, let me know. I am happy to log more feature requests! In the meantime, for other web developers, using the "application/ogg" MIME type and renaming files to an "ogg" extension seems like a reasonable approach. Once more plug-ins recognize the Speex MIME type, we can start using it instead. --Alex Quoting "Alex S. Brown" <alexsbrown@alexsbrown.com>:> Thanks for the two suggestions. I tried VLC, and that did help with Firefox > support. Unfortunately, VLC registers itself as a player only for the > "application/ogg" type, not for "audio/x-speex". If I change my object code > to > request an application/ogg MIME type, it plays. I wish that it also showed > player controls like QuickTime and other players do, but I am not > complaining! > VLC is Javascript capable, so I can drive the audio from the web page. Let > me > know if there are any potential problems with using application/ogg as the > MIME > type, since it may be better recognized. > > Quoting Conrad Parker <conrad@metadecks.org>: > > > On Tue, Feb 21, 2006 at 09:21:32AM +1100, Jean-Marc Valin wrote: > > > Have you thought of using jspeex (http://jspeex.sourceforge.net/)? The > > > other way I can think of is to do the same as the Annodex Firefox plugin > > > (http://www.annodex.net) and use VLC. Conrad Parker might have some more > > > info on how to do that. Conrad? > > > > Hi, > > > > AFE currently has a bug where it can't handle audio-only files. > > Hopefully we'll fix that soon. > > > > Nevertheless, something like jspeex sounds better for this at the > > moment. Cooler would be a way of doing timed images + speex in ogg ... > > > > Conrad. > > > > > Jean-Marc > > > > > > Le lundi 20 f?vrier 2006 ? 14:50 -0500, Alex S. Brown a ?crit : > > > > My apologies if this request is a little outside the scope of the > normal > > track > > > > of this discussion group. My question is more about the use of speex as > a > > web > > > > developer than about the internals of the codec. I searched all over > the > > web > > > > for this information, though, and am trying here as a last resort. > > > > > > > > I am trying to develop a way to offer slide shows with a voice-over. I > > would > > > > like to offer speex as a low-bandwidth option in addition to MP3 and > > possibly > > > > WAV formats. I am struggling to figure out how to support the > > "audio/x-speex" > > > > mime type across browsers effectively. > > > > > > > > Ironically, the one where I have had best success is with Windows > Media > > Player. > > > > Once the DirectShow filters are installed on a PC, I use the <object> > tag > > to > > > > invoke Windows Media Player, and it happily plays the speex file. > (Ironic > > that > > > > this is the least-standard-compliant, least-open-source combination of > > web > > > > browser and OS, and the only one where I can get speex working!) > > > > > > > > I would like to be able to bring up a player with the correct, HTML > 4.01 > > > > approach, that should support any browser that recognizes the MIME > type > > and the > > > > correct use of the object tag. The tag looks like this: > > > > > > > > <object type="audio/x-speex" data="myaudio.spx"> > > > > If your browser does not support a player object, <a > > href="myaudio.spx">download > > > > the speech</a> and play it separately. > > > > </object> > > > > > > > > (The main object tag gives the mime type and file location. The text > > between it > > > > and the close is an alternate rendering, for browsers that cannot > display > > the > > > > object tag.) > > > > > > > > My problem is that I am not sure which speex players will properly > > register the > > > > MIME type with the web browser and operating system, so that a ".spx" > > file will > > > > play and so that the "audio/x-speex" MIME type creates a player > object. > > > > > > > > I have tried using Firefox under MS Windows, and Firefox does not even > > recognize > > > > the MIME type at all, even after installing DirectShow filters. It > does > > not > > > > even know what to offer to download. > > > > > > > > I am happy to give separate tech support instructions for different > > browsers and > > > > operating systems, because my hope is that people will keep coming > back > > to my > > > > site for educational information. I may offer WAV or MP3 formats for > > more > > > > casual users, or perhaps just short "teasers" to get them to download > > the > > > > decoders for the more efficient speex format. > > > > > > > > My hope is by getting an answer to this question, I can help promote > the > > use of > > > > speex on the web. I certainly plan to send any solutions to the > Firefox > > team, > > > > so that they recognize and offer to download players for the speex > MIME > > type in > > > > the future.---------------------- Alex S. Brown, PMP alexsbrown@alexsbrown.com http://www.alexsbrown.com/