[vlc-devel] [PATCH 1/3] x264: in crf mode, set stream bitrate to be maxrate, so in muxer we have some idea about bitrate
Ilkka Ollakka
ileoo at videolan.org
Sat Oct 6 13:15:06 CEST 2012
---
modules/codec/x264.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/modules/codec/x264.c b/modules/codec/x264.c
index 00df228..7074dc0 100644
--- a/modules/codec/x264.c
+++ b/modules/codec/x264.c
@@ -939,6 +939,8 @@ static int Open ( vlc_object_t *p_this )
/* max bitrate = average bitrate -> CBR */
p_sys->param.rc.i_vbv_max_bitrate = var_GetInteger( p_enc, SOUT_CFG_PREFIX "vbv-maxrate" );
+ if( p_sys->param.rc.i_vbv_max_bitrate && p_sys->param.rc.i_rc_method != X264_RC_ABR )
+ p_enc->fmt_out.i_bitrate = p_sys->param.rc.i_vbv_max_bitrate * 1000;
if( !var_GetBool( p_enc, SOUT_CFG_PREFIX "mbtree" ) )
--
1.7.12.1
More information about the vlc-devel
mailing list