[FFmpeg-devel] [PATCH] Speex decoding via libspeex

Michael Niedermayer michaelni
Thu Oct 23 14:32:19 CEST 2008


On Tue, Oct 21, 2008 at 11:17:48PM -0400, David Conrad wrote:
> On Oct 21, 2008, at 3:17 PM, Art Clarke wrote:
>
>> On Mon, Oct 20, 2008 at 11:45 PM, David Conrad <lessen42 at gmail.com> wrote:
>>> On Oct 21, 2008, at 2:36 AM, Diego Biurrun wrote:
>>>
>>>> On Tue, Oct 21, 2008 at 02:30:01AM -0400, David Conrad wrote:
>>>>>
>>>>> This adds decode support for Speex using libspeex. Tested with
>>>>> talk109-
>>>>> q5.spx and speexaudio.flv
>>>>>
>>>>> I'm not sure the best way to handle Speex in flv;
>>>>
>>>> Since when does Speex exist in flv?  Isn't Ogg the preferred
>>>> container?
>>>
>>> Since Flash 10 just recently came out; I'd say see issue 605 if
>>> roundup wasn't down.
>>>
>>>> Build system part of the patch is OK.
>>>>
>>>> Diego
>
>> Hi David,
>>
>> It looks like (from the investigation we've done on Red5) that Adobe
>> always passed 16khz audio in the FLV under Flash Player 10.  It sends
>> a audio-rate ID of "0" in that case, so you're save hardcoding
>> avctx->sample_rate to 16000 if the codec is speex.  That should fix
>> the ffmpeg -i problem.
>>
>> Patch attached.
>>
>> See here for background:
>> http://jira.red5.org/confluence/display/codecs/Speex+Codec
>
> It looks like the sample rate is now the only real issue with decoding 
> Speex without a setup header, assuming the default mode is used for a given 
> sample rate. I've reworked the decoding loop to not rely on knowing 
> frames_per_packet so that issue is irrelevant with flv.
>
> Also, stereo speex is now supported. As a side note, libspeex 1.0.5 can 
> encode stereo fine but completely fails at decoding it.

patch looks ok

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081023/dcdfe47c/attachment.pgp>



More information about the ffmpeg-devel mailing list