[MPlayer-users] Encoding bitrate calculation?

Mark Williams (MWP) mwp at internode.on.net
Fri Jan 16 14:27:58 CET 2004


Hi all,

It seems every OGM encoding i produce is always way under the target size i specify.
AFAIK the calculation im using is correct.

For example, i specify a total movie size of 1.4GB, i end up with a final OGM of 950Mb.

Can anyone see a problem in the following?

Thanks.

AUDIO=`ls -l audio.ogg | awk '{printf $5}'`
RBITRATE=$((($TARGET - $AUDIO)/$LENGTH/1028*8))

echo "BITRATE: $RBITRATE"

#VIDEO PASS1
cat $VOBS | nice -+19 mencoder -o movie-p1.avi -nosound -oac copy -ovc lavc -lavcopts \
 vcodec=mpeg4:vbitrate=$RBITRATE:trell:mbd=2:v4mv:vb_strategy=0:vlelim=0:vcelim=7:cmp=2:subcmp=2:precmp=2:predia=1:dia=1:vme=4:vpass=1 \
 -vop denoise3d,pp=lb/tn:64:128:256/dr/h1/v1,scale=$SCALEXY,crop=$CROPXY -

#PASS2
cat $VOBS | nice -+19 mencoder -o movie-p2.avi -nosound -oac copy -ovc lavc -lavcopts \
 vcodec=mpeg4:vbitrate=$RBITRATE:trell:mbd=2:v4mv:vb_strategy=0:vlelim=0:vcelim=7:cmp=2:subcmp=2:precmp=2:predia=1:dia=1:vme=4:vpass=2 \
 -vop denoise3d,pp=lb/tn:64:128:256/dr/h1/v1,scale=$SCALEXY,crop=$CROPXY -




More information about the MPlayer-users mailing list