[MPlayer-users] Encoding bitrate calculation?

Martin Collins martin at mkcollins.org
Fri Jan 16 15:02:43 CET 2004


On Fri, 16 Jan 2004 23:57:58 +1030
"Mark Williams (MWP)" <mwp at internode.on.net> wrote:

> 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))

That should be 1000*8
You may be getting some rounding errors, shell only does integer maths.
You are using the size of the ogg file which includes the ogg container
overhead, on the other hand you are making no allowance for the ogm
overhead.
You may not need all that bitrate, what does mplayer say the final
file's bitrate is? Does it match the calculation?

Martin




More information about the MPlayer-users mailing list