[FFmpeg-devel] [PATCH]Higher default mpeg muxrate for large dimensions
Carl Eugen Hoyos
cehoyos at ag.or.at
Wed Jan 18 00:16:52 CET 2012
Hi!
I don't know what negative effects attached patch may have, but it is
currently not possible to specify a -bufsize for constant (low) quantiser -
specifying a bufsize automatically increases the quantiser to max - and for
high resolution, the current default bufsize is too low.
See "mpeg2 bufsize question" on -user.
Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c
index dce1786..f3bae32 100644
--- a/libavformat/mpegenc.c
+++ b/libavformat/mpegenc.c
@@ -374,7 +374,7 @@ static int mpeg_mux_init(AVFormatContext *ctx)
stream->max_buffer_size = 6*1024 + st->codec->rc_buffer_size/8;
else {
av_log(ctx, AV_LOG_WARNING, "VBV buffer size not set, muxing may fail\n");
- stream->max_buffer_size = 230*1024; //FIXME this is probably too small as default
+ stream->max_buffer_size = FFMAX(st->codec->width * st->codec->height, 230*1024);
}
#if 0
/* see VCD standard, p. IV-7*/
More information about the ffmpeg-devel
mailing list