[MPlayer-users] Re: Problem with mencoder

rcooley rcooley at spamcop.net
Thu Aug 14 07:28:32 CEST 2003



Stefan Seyfried wrote:
> It's time to remove 3pass encoding and instead provide a
> bitrate.pl skript to predict the bitrates for encoding ;-)


It's pretty easy to get rather close to the right bitrate using just a 
little math and the official movie length.

However, you lose the advantage of not having to re-encode the audio in 
the second pass.

Simple bitrate calculator for anyone that wants it:

#!/bin/sh
if [ "$1" == "" ]; then
   echo "$0 <movie size in minutes>"
   exit 1
fi

MAXSIZE=727040
SECONDS=$(($1*60))

#Audio rate is 64bits/s which is 8kbytes/s
AUDIOSIZE=$((8*$SECONDS))
VIDEOSIZE=$(($MAXSIZE - $AUDIOSIZE))
RATE=$((($VIDEOSIZE*8) / $SECONDS))

echo "Estimated VIDEO size: $VIDEOSIZE"
echo "Estimated AUDIO size: $AUDIOSIZE"
echo "Estimated video bitrate: $RATE"




More information about the MPlayer-users mailing list