[Libav-user] filtering_audio.c problems

Marcelo Emmerich marcelo.emmerich at gmail.com
Thu Feb 16 12:04:22 EET 2017

the source has

Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s

and the output has

Audio: aac (LC), 44100 Hz, stereo, fltp, 64 kb/s

I thought the whole point of using filters os to not have to resampling and
fifo manually... What should I do now?


2017-02-16 1:33 GMT+01:00 Ratin Rahman <ratin3 at gmail.com>:

> I have seen this kind of issues while rendering audio to ALSA but just
> re-sampled myself, not using filters. I think what you need to keep an eye
> on is how many bytes of raw data you are getting out of the decoder, and
> does that makes sense for the number of channels that you specified. If the
> filter is expecting n number of samples as inputs and the decoded buffer
> size is less, then obviously you will see this error. Just print all the
> values and see if they match.
> On Wed, Feb 15, 2017 at 2:24 AM, Marcelo Emmerich <
> marcelo.emmerich at gmail.com> wrote:
>> Hi All,
>> I am refactoring a streaming application from manually resampling and
>> FIFO buffering audio to using filters. For testing I run the "
>> filtering_audio.c
>> <https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/filtering_audio.c>"
>> example, however it does not work, I always get the error
>> more samples than frame size (avcodec_encode_audio2)
>> In my previous implementation I had this working by manually filling a
>> FIFO and handling the resampling myself, however I need to switch to using
>> filters. The current filtergraph in filtering_audio.c actually has an
>> auto-inserted fifo filter, but I still get the error.
>> What am I doing wrong?
>> Thanks,
>> Marcelo
>> _______________________________________________
>> Libav-user mailing list
>> Libav-user at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/libav-user
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20170216/8efe690f/attachment.html>

More information about the Libav-user mailing list