[Libav-user] filtering_audio.c problems

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Libav-user] filtering_audio.c problems

Marcelo Emmerich
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" 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
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user
Reply | Threaded
Open this post in threaded view
|

Re: filtering_audio.c problems

Ratin-2
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 <[hidden email]> 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" 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
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user



_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user
Reply | Threaded
Open this post in threaded view
|

Re: filtering_audio.c problems

Marcelo Emmerich
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?

Thanks,
Marcelo


2017-02-16 1:33 GMT+01:00 Ratin Rahman <[hidden email]>:
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 <[hidden email]> 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" 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
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user



_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user



_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user