[Libav-user] resampling audio and then encoding

JULIAN GARDNER joolzg at btinternet.com
Thu Apr 28 15:00:37 CEST 2016


I am trying to get my code to work and failing miserably.
I have a file opened which has an audio stream in AC3, 48k, Stereo, fltp, 192kb/s
I am trying to output this as MP2, 64k, Stereo, S16, 32 kb/s
Now my code goes through the svr_convert and gives me a 1040 sample buffer from the 1536 input sample buffer.
When I go to convert it using avcodec_encode_audio2, this this frame i get the following
[mp2 @ xxxxxxxxxxx] nb_samples (1040) != frame_size (1536) (avencode_encoder_audio2)
So my question is do I have to split the input to be the correct size or am i missing something in the audio encoding setup to allow it to do the buffering correctly?
 Joolz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20160428/8bd56c25/attachment.html>


More information about the Libav-user mailing list