[Libav-user] Audio encoding: more samples than frame size (avcodec_encode_audio2)

Yu Ang Tan yuang86 at gmail.com
Wed Sep 21 03:53:12 EEST 2016


>
> >     [libvorbis @ 028b1520] more samples than frame size
> > (avcodec_encode_audio2)
>
> Are you sure that you are encoding to flac?
>
>
You were spot on. I was using "test.ogg" instead of "test.flac".

I made the following changes and now it works fine.
-        audio_decode_example("test.ogg", "test.sdp");
+        audio_decode_example("test.flac", "test.sdp");

-        outCodecCtx->sample_fmt = AV_SAMPLE_FMT_FLTP;
+        outCodecCtx->sample_fmt = AV_SAMPLE_FMT_S16;   // FLAC uses fixed
point samples

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20160921/05275d79/attachment.html>


More information about the Libav-user mailing list