I want to play *.spx files which encoded by Speex on the Web.
But I have no knowledge of Flash/Flex or any Flash Audio codec. After Google search for a whole day, I got some solutions, that is:
Do something wrapping Speex files with a FLV container because that the Speex is only playable as the audio codec in a FLV container.
Now I can play a SPX-Audio-Only FLV file in Flex, I use netStream.play("audio-only-speex.flv")
, But I donot know how to wrap a Spx file with FLV container using ActionScript.
Any example project?
Decode Spx using AS.
I checked out the fllowing pages that they all decoded OGG Vorbis but no Speex :(
http://barelyfocused.net/blog/2008/10/03/flash-vorbis-player
http://www.exswap.com/?p=132
http://mauft.com/2010/11/ogg-vorbis-in-flash
Adobe also provides a AS3 OggVorbis Library which ported by Alchemy:
http://labs.adobe.com/wiki/index.php/Alchemy:Libraries
FMS: do a server streaming using FMS or Red/Xuggle. I have never heard FMS stuffs before, as well as I'm not sure whether my virtual host can support or not...
Convert every Spx files to MP3.
I think the best solution is decoding Spx in AS3, Yes, I'd like to make a Spx Flash Player.
So, I downloaded Speex Library from speex.org, installed Adobe Alchemy. After ./configure;make
the libspeex, build libspeex/speex.c out a libspeex.swc via Alchemy. then, I donot know how to do next. How can I decode the speex audio with AS3?
My libspeex.swc: http://demo.0x123.com/libspeex.swc
In addtion, should I rewrite the libspeex using Alchemy API before build the libspeex.swc?
Although I am not professional in AS, but I have a strong ability to learn. Any advice will be greatly appreciated, Thanks very much.
Adobe says specifically not to rely on Alchemy yet, so there's no official way to do it on the client side (as far as I know.) It's absurd given that there is clearly a speex decoder being used.
Can you use Xuggle's tricked-out version of ffmpeg (http://code.google.com/p/xuggle-ffmpeg/) to embed the speex in FLVs? If you can run xuggle in batch or on the fly, then regardless of the original audio format, you can serve a speex encoded FLV, playable from netStream.play
.
ffmpeg -i test.wav -acodec libspeex -f flv -y speex.flv
For basic playing, you wouldn't even need a flash media server.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With