[MPlayer-users] Re: Question about bitrate when encoding with mencoder

Rémi Guyomarch rguyom at pobox.com
Sat May 4 21:36:02 CEST 2002


On Sat, May 04, 2002 at 12:17:12PM -0400, jasonrc at gomdoli.com wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> I'm just learning how to encode dvds to divx using mplayer. I am doing
> this with the 3 pass method for divx4. At the end of the first pass,
> mencoder tells me the recomended bitrate for various cd sizes. For
> example, it may say for an 800MB cd, use 700, and for a 650MB cd, use
> 850. 

Reading the 3 lines of code which prints those recommended bitrates, I
think what you describe is impossible.

> However, I thought that a higher birate was used to create larger
> files with higher quiality, but from the output from the first pass, it
> seems to imply that a lower bitrate makes a larger file. Have I got the
> deffinition of bit rate all backwards? I thought that bitrate ment the
> number of bits used to encode each frame, thus the more bits, the higher
> the quality of the image. Someone please set me straight, I serached in
> both the online documentation, and in the mencoder man page, but didn't
> find what I was looking for.

Higher bitrates will gives you a larger file. At the end of the first
pass in 3-pass mode, mencoder will give you the average bitrate of the
audio track. You can do the math yourself, it's easy :

abrate = audio bitrate in kbits
size = desired file size in megabytes (650, 700, 800)
len = length of the movie in seconds
vbrate = video bitrate in kbits

vbrate = size*1024*1024*8 / len / 1000 - abrate

Note that this formula doesn't take into account the various headers
and indexes found in .avi files (mencoder does). But you can store a
bit more than 700 MB on a 80min CD anyway.


PS: don't reply to a thread if you want to start a new one.

-- 
Rémi




More information about the MPlayer-users mailing list