[MPlayer-dev-eng] mencoder.c (1.94) bug: "-lavcopts vbitrate=XXX"

Krister Lagerstrom krister at kmlager.com
Thu Feb 28 05:33:30 CET 2002


The man-page for mencoder states that the FFMPEG (or libavcodec) 
vbitrate parameter kan be in kbits (1000 bits) or bits. There is code 
for autodetecting kbit/bit for divx4:

996:     if(!divx4_param.bitrate) divx4_param.bitrate=800000;
997:     else if(divx4_param.bitrate<=16000) divx4_param.bitrate*=1000;

but not for FFMPEG:

1085:     if (lavc_param_vbitrate >= 0) /* != -1 */
1086:        lavc_venc_context.bit_rate = lavc_param_vbitrate;
1087:     else
1088:        lavc_venc_context.bit_rate = 800000; /* default */

It should be easy to copy-paste the divx4 solution. Also, shouldn't the 
if-statement on line 1085 be similar to the one on line 996? I assume 
that the parameter will be set to zero (not -1) by the parameter 
decoding process.

		/ Krister




More information about the MPlayer-dev-eng mailing list