[MPlayer-users] where is the extra information file created for

Vijay gill vj at vijayg.homelinux.net
Mon Jun 30 19:12:42 CEST 2003


Hi Hans,

    Sorry for being so naive on giving information. I am using following script to do the job of encoding for me

***************************************************************************
# file name is enc2divx and a link to the same file is made with the name enc2divx.final

function conf()
{
  conf="`dirname $0`/enc2divx.conf"
  x=`cat $conf | grep -v "#" | grep $1 | cut -d "=" -f2`
  if [ "$x" == "" ]
   then x=$2
  fi
  echo $x
}

bitrate=`conf "bitrate" 1200`
scale=`conf "scale" 80`
scalefactor=`conf "scale" 80`


crop="-vop cropdetect=16"
crop=`mencoder -nosound -ss 01:00 -endpos 1 $crop -ovc lavc "$1" 2>err | grep "area" | tail -n 1`
crop="crop=`echo "$crop" | cut -d "(" -f3 | cut -d ")" -f1 | cut -d "=" -f2`"
crop=`echo "$crop" | cut -d "=" -f2`
w=`echo $crop | cut -d ":" -f1`
h=`echo $crop | cut -d ":" -f2`
nw=`expr $w \* $scale / 100`
nh=`expr $h \* $scale / 100`
# use internal computation by mencoder by just giving one dimension
scale="scale=$nw:-3"

crop="-vop $scale,crop=$crop"

vopts=" $crop -noskip -ovc lavc vcodec=mpeg4:vhq:vbitrate=$bitrate:vhq:vqmin=2:vqmax=31:keyint=250:qpel:vme=1:v4mv"
vopts1="$vopts:vpass=1"
vopts2="$vopts:vpass=2"
aopts=" -oac mp3lame -lameopts cbr=128"
#aopts=" -oac copy"
extopts=" -sws 2 -passlogfile /tmp/menc.log"
if [ "`basename $0`" != "enc2divx.final" ]
 then
   stime=" -ss 3:00"
   dur=" -endpos 00:05"
   dur=" -frames 200"
   echo "<<< Preview mode >>>"
 else
   echo "<<< Final mode >>>"
fi

echo "Original resolution  : $w(w) X $h(h)"
echo "Scaling factor       : $scalefactor"
echo "Scaling              : $w X $h => $nw X $nh"
echo "Bitrate              : $bitrate"
#echo "Crop options        : $crop"

fname="$1"
echo "Encoding started at  : `date`"
if [ "`basename $0`" != "enc2divx.final" ]
 then
   mencoder $fname $extopts $stime $dur $aopts $vopts1 1>log 2>err
   #mencoder $fname $extopts $stime $dur $aopts $vopts2 1>log 2>err
 else
   cat $* | mencoder - $extopts $aopts $vopts1 - 1>log 2>err
   #cat $* | mencoder - $extopts $aopts $vopts2 - 1>log 2>err
fi
echo "Encoding finished at : `date`"
*********************************************************************************

I am writing this script to allow me to do various things i want in encoding divx's(like spanning across various CD's also in future, making iso's etc).

You see that I have given passlog parameter to allow mencoder to save 1st pass information there. But I do not see anything in that file later on. If you see anything silly I am doing here kindly tell me so. I am so much impressed by this software(mencoder) that I want to get best out of it.


Regards from
Vijay Gill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-users/attachments/20030630/25738079/attachment.htm>


More information about the MPlayer-users mailing list