[MPlayer-users] Re: Mencoder: are the displayed bitrates accurate?

Levente Novák lnovak at dragon.unideb.hu
Wed Oct 29 08:53:18 CET 2003


Tobias Diedrich wrote:

> If vrc_buf_size is not set, libavcodec calculates
> vbv_buffer_size as follows:
> 
> /* VBV calculation: Scaled so that a VCD has the proper VBV size of 40
>  * kilobytes */
> vbv_buffer_size = (( 20 * s->bit_rate) / (1151929 / 2)) * 8 * 1024;
> vbv_buffer_size = (vbv_buffer_size + 16383) / 16384;
> 
> AFAICS s->bit_rate maps to mplayer's vbitrate option (But is in bits per
> second).
> 
> So for 1151929bps we get 40KB, for 3225401.2bps we get 112KB and for
> 6450802.4bps we get 224KB.

Do I understand correctly that in this case (vrc_buf_size is not set) 
mencoder sets it from the actual bitrate to have the recommended buffer 
size for the type of media to be mastered? But then why this stream is 
not playable by standalone players than, even if vrc_maxrate is set 
correctly?

I tried bitrate viewer on one of my files where vrc_maxrate was set to 
2500, and there were _a lot_ of frames where bitrate was higher than 
3500! These frames were adjacent to each other, meaning that these were 
no isolated peaks, but a whole scene had much higher bitrate.

I'll do a try with explicitly set vrc_buf_size.

Levente

PS: are you informed that on Oct. 23 Erik Slagter had announced a bug on 
ffmpeg-devel in connection with the ratecontrol code? See:

http://sourceforge.net/mailarchive/forum.php?thread_id=3336357&forum_id=1506

He wrote "transcode" in his mail but the transcode maintainer told him 
this portion of code was directly copied from "mplayers 
libmpcodecs/ve_lavc.c".



More information about the MPlayer-users mailing list