GNOME Bugzilla – Bug 680487
avenc_wmav1: errors out with default bitrate - output buffer size is too small
Last modified: 2012-12-05 18:41:40 UTC
:00:02.951002477 5026 0x254c940 ERROR libav :0:: bitrate too low: got 0, need 24000 or higher
$ gst-launch-1.0 audiotestsrc ! avenc_wmav1 ! fakesink -v Setting pipeline to PAUSED ... Pipeline is PREROLLING ... /GstPipeline:pipeline0/GstAudioTestSrc:audiotestsrc0.GstPad:src: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)44100, channels=(int)1 0:00:02.265072799 24070 0xac1ca0 ERROR libav :0:: bitrate too low: got 0, need 24000 or higher 0:00:02.265920045 24070 0xac1ca0 ERROR libav :0:: bitrate too low: got 0, need 24000 or higher 0:00:02.292144673 24070 0xac1ca0 ERROR libav :0:: bitrate too low: got 0, need 24000 or higher 0:00:02.292843228 24070 0xac1ca0 ERROR libav :0:: bitrate too low: got 0, need 24000 or higher 0:00:02.293520411 24070 0xac1ca0 ERROR libav :0:: bitrate too low: got 0, need 24000 or higher ERROR: from element /GstPipeline:pipeline0/GstAudioTestSrc:audiotestsrc0: Internal data flow error. Additional debug info: gstbasesrc.c(2742): gst_base_src_loop (): /GstPipeline:pipeline0/GstAudioTestSrc:audiotestsrc0: streaming task paused, reason not-negotiated (-4) ERROR: pipeline doesn't want to preroll. Setting pipeline to NULL ... Freeing pipeline ...
Latest twist: ERROR libav :0:: output buffer size is too small ERROR libav gstavenc.c:386:gst_ffmpegaudenc_encode_audio:<avenc_wmav1-0> Failed to encode buffer: -22
> ERROR libav gstavenc.c:386:gst_ffmpegaudenc_encode_audio:<avenc_wmav1-0> Failed > to encode buffer: -22 This *appears* to be caused by: if (buf_size < 2 * MAX_CODED_SUPERFRAME_SIZE) { av_log(avctx, AV_LOG_ERROR, "output buffer size is too small\n"); return AVERROR(EINVAL); } in wmaenc.c, with wma.h:#define MAX_CODED_SUPERFRAME_SIZE 16384 frame. Since context->frame_size in set_format() is 2048, and we deliver that many samples, it looks like it might be a bug in liibav. It works fine when forcing the input to channels=2, in which case context->frame_size is 8192 and it all works fine.
This is now fixed in latest GIT master.