[Red5devs] [Red5] Speex Test

Daniel Rossi electroteque at gmail.com
Sat Oct 18 23:41:51 PDT 2008


I updated the docs again with a comment with the code I used for the  
sample file.  Steven already had a look into it and its referenced  
above yours, it can only do 16khz so ignored the 44khz setting. I dont  
understand what t5he framesperpacket setting does but i had set it to 2.

http://jira.red5.org/confluence/display/codecs/Speex+Codec


On 19/10/2008, at 5:20 PM, Art Clarke wrote:

> No problem.
>
> By the way folks, I felt just awful about giving people hope that
> Ffmpeg handled Speex so I did a little more poking.  Check out the
> Wiki for a, um, patch to Ffmpeg that adds speex:
>
> http://jira.red5.org/confluence/display/codecs/Speex+Codec
>
> Dan, just so you know, I'll be expecting a cookie from you for this if
> I make it to Australia any time.
>
> Enjoy,
>
> - Art
>
> On Fri, Oct 17, 2008 at 11:44 AM, Daniel Rossi  
> <electroteque at gmail.com> wrote:
>> LOL seems like you got to the wiki first thanks :)
>>
>> On 18/10/2008, at 5:28 AM, Art Clarke wrote:
>>
>>> And yup, count it as dumb error; my speex encoded file was actually
>>> nellymoser.  My bad folks.
>>>
>>> On Fri, Oct 17, 2008 at 10:55 AM, Art Clarke <aclarke at vlideshow.com>
>>> wrote:
>>>> Oh I forgot, just post the file to a server and make it really  
>>>> short
>>>> (say 10 seconds).  I'll d/l it once you send the link.
>>>>
>>>> Thanks,
>>>>
>>>> - Art
>>>>
>>>> On Fri, Oct 17, 2008 at 10:55 AM, Art Clarke
>>>> <aclarke at vlideshow.com> wrote:
>>>>> Hi folks,
>>>>>
>>>>> Sorry, but I only browse this list about once a week at this point
>>>>> so
>>>>> I missed this.
>>>>>
>>>>> I think I got ffmpeg to correctly decode a Speex file, but I might
>>>>> have made a mistake with my flash 10 client.  To help me test  
>>>>> this,
>>>>> can someone upload a flv file that they think has audio encoded as
>>>>> Speex (preferrably recorded directly from fp10).  I'll turn  
>>>>> through
>>>>> some stuff on my end.
>>>>>
>>>>> What do you get out of it?  If it works, I'll document what I  
>>>>> did :)
>>>>>
>>>>> - Art
>>>>>
>>>>> On Thu, Oct 16, 2008 at 10:18 PM, Daniel Rossi <electroteque at gmail.com
>>>>>> wrote:
>>>>>> Hi Steve ive updated it with your information, so you can confirm
>>>>>> the latest
>>>>>> trunk of ffmpeg still cannot do it ?
>>>>>> http://jira.red5.org/confluence/display/codecs/Speex+Codec
>>>>>> I find this interesting but depressing at the same time
>>>>>> "rate is 16kHz for all speex in flash"
>>>>>> So 16kHz mono is the only choice you have for Speex regardless of
>>>>>> the
>>>>>> settings, no wonder why I found it scratchy instead of artifacty
>>>>>> when I was
>>>>>> trying to boost it to the highest setting. I cannot understand
>>>>>> why there is
>>>>>> no mp3 or even ogg support yet :)
>>>>>>
>>>>>>
>>>>>> On 16/10/2008, at 4:24 PM, Steven Woolley wrote:
>>>>>>>
>>>>>>> in case folks are curious, r15028 in ffmpeg appears to have been
>>>>>>> when
>>>>>>> speex was added to the flv container (For decoding); that change
>>>>>>> was
>>>>>>> committed on 8/29.
>>>>>>
>>>>>>
>>>>>> Yeah, that was in response to my first bug report.  It wouldn't
>>>>>> even read
>>>>>> the file at all before that.  However, the problem remains that
>>>>>> the audio
>>>>>> can't be transcoded or decoded, it is simply "recognized" as
>>>>>> speex based on
>>>>>> the codec id.  They need more information before it can be
>>>>>> decoded or played
>>>>>> (from the more recent bug
>>>>>> report https://roundup.mplayerhq.hu/roundup/ffmpeg/issue608).  I
>>>>>> think our
>>>>>> best bet is to compile this info as best we can, and then push to
>>>>>> get it
>>>>>> implemented in ffmpeg (although, there are java decoders for
>>>>>> speex: http://jspeex.sourceforge.net/doc/org/xiph/speex/spi/Speex2PcmAudioInputStream.html
>>>>>> ,
>>>>>> so maybe it's be worth adding right to red5?)  Here's what's
>>>>>> needed to do
>>>>>> the decoding:
>>>>>> rate is 16kHz for all speex in
>>>>>> flash: http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7d0d.html
>>>>>> bitrate is given based on the quality (the adobe documentation
>>>>>> now has a
>>>>>> table to show the bitrate given the quality setting)
>>>>>> nb_channels is 1 (I think it's mono only?)
>>>>>> frames_per_packet is settable in the microphone class.
>>>>>> Anything else?
>>>>>>
>>>>>> ogg/speex requires a header per the spec:
>>>>>>         Field        Type   Size
>>>>>> ---------------------------------------
>>>>>>     speex_string     char[]   8
>>>>>>    speex_version     char[]  20
>>>>>>  speex_version_id     int     4
>>>>>>     header_size       int     4
>>>>>>          rate         int     4
>>>>>>         mode          int     4
>>>>>> mode_bitstream_version  int     4
>>>>>>     nb_channels       int     4
>>>>>>         bitrate       int     4
>>>>>>      frame_size       int     4
>>>>>>          vbr          int     4
>>>>>> frames_per_packet     int     4
>>>>>>    extra_headers      int     4
>>>>>>       reserved1       int     4
>>>>>>       reserved2       int     4
>>>>>>
>>>>>> I'm sure not all of that is needed, and some of it will be
>>>>>> constant (not
>>>>>> stream dependent, at least from flash player).
>>>>>> I'd put that all on the wiki page, but saw nowhere to actually
>>>>>> get an
>>>>>> account?  It looks good though, thanks for starting it!
>>>>>> Steve
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Red5 mailing list
>>>>>> Red5 at osflash.org
>>>>>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Red5 mailing list
>>>>>> Red5 at osflash.org
>>>>>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>> _______________________________________________
>>> Red5 mailing list
>>> Red5 at osflash.org
>>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>
>>
>> _______________________________________________
>> Red5 mailing list
>> Red5 at osflash.org
>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>
>
> _______________________________________________
> Red5 mailing list
> Red5 at osflash.org
> http://osflash.org/mailman/listinfo/red5_osflash.org




More information about the Red5devs mailing list