[Libav-user] Converting audio sample buffer format

Paul B Mahol onemda at gmail.com
Mon Feb 25 10:50:33 CET 2013


On 2/25/13, Rene J.V. Bertin <rjvbertin at gmail.com> wrote:
>
>
> Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
>
>>Brad O'Hearne <brado at ...> writes:
>>
>>> On Feb 18, 2013, at 3:50 PM, Carl Eugen Hoyos <cehoyos at ...> wrote:
>>>
>>> > While I have _no_ idea what the "flv audio codec" could
>>> > be, please use either the aconvert filter or libswresample
>>> > directly to convert from one audio format to another.
>>>
>>> This has turned out to be much more difficult than expected.
>>
>>Before you start debugging (the cast to sourceData looks
>>suspicious): Did you look at doc/examples/filtering_audio.c
>>and doc/examples/resampling_audio.c ?
>>I suspect using the aconvert filter has the advantage that
>>you can do other changes to the audio without additional
>>code (and bugs).
>>
>>In any case, using gdb should quickly show you were the
>>problem lies.
>>
>>Carl Eugen
>>
>>_______________________________________________
>>Libav-user mailing list
>>Libav-user at ffmpeg.org
>>http://ffmpeg.org/mailman/listinfo/libav-user
>
>
> Exactly, but you'd need to build the libav libs yourself, with debugging
> info.
>
> There's another thing that's nagging me. IIUC, the goal here is to convert a
> buffer of (C) floats into signed shorts. I have some difficulty believing
> that doing this through a generic workhouse function can be more efficient
> than writing a simple loop and let a good optimising compiler create the
> best assembly out of it ...

Why not do it? And than compare speed. You will learn a lot.

>
> R.
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>


More information about the Libav-user mailing list