[Libav-user] Changing frame size for audio encoding
Taha Ansari
mtaha.ansari at gmail.com
Mon Feb 24 11:12:49 CET 2014
Hi,
Using muxing sample that comes with documentation, inside open_audio()
function, this is called:
/* open it */
ret = avcodec_open2(c, codec, NULL) ;
if ( ret < 0)
{
fprintf(stderr, "could not open codec\n");
return -1;
//exit(1);
}
if (c->codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE)
audio_output_frame_size = 10000;
else
audio_output_frame_size = c->frame_size;
For an encoder like Vorbis, according to their docs (
http://www.xiph.org/vorbis/doc/Vorbis_I_spec.html):
" legal frame sizes are powers of two from 64 to 8192 samples", but after
avcodec_open2() function returns, I get c->frame_size equal to 64.
How can I increase codec's frame size to a higher value as allowed by it's
documentation?
Thanks in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20140224/1a54686d/attachment.html>
More information about the Libav-user
mailing list