[MPlayer-users] Script update

Martin Collins martin at mkcollins.org
Mon Jul 19 22:10:57 CEST 2004


On Mon, 19 Jul 2004 15:37:29 +0200 (CEST)
Meino Christian Cramer <Meino.Cramer at gmx.de> wrote:

> Hi,
> 
> here is an updated version of the script
> 
> Have fun!

OK, here we go.

> # Size of target media: Uncomment the wanted size
> # export TARGETSIZE=650    # 1 CD
> export TARGETSIZE=700    # 1 CD

I would use a command line parameter for this. It allows any value and
means you don't have to edit the script every time.

> # Your general options to mencoder
> export OPTS="-vfm ffmpeg -vf
> denoise3d=0:0:0:hqdn3d=0:255:0:crop=696:576:14:0 -mc 0 -noskip
> -skiplimit 0"

As I mentioned before hqdn3d is supposed to be a better version of
denoise3d. You don't need both. Also you need to separate hqdn3d and
crop options with a comma not a colon. And 696 isn't divisible by 16
either.

> # Your general options to ffmpeg/lavc, Bitrate settings anf vpass
> # informations will be added later automagically
> # color
> export LAVOPTS=cbp:psnr:mbd=2:vcodec=mpeg4:autoaspect:trell:qpel   
> # grayscaled
> #export
> #LAVOPTS=cbp:psnr:mbd=2:gray:vcodec=mpeg4:autoaspect:trell:qpel   

I believe the consensus is that qpel is not that useful. I also use
naq, v4mv, and vratetol=32000 which allows bits to be used where they
are most needed rather than spreading them evenly.

> case $PASS in
>     0 ) PASS0=true; PASS1=false PASS2=false ;;
...
> export BITRATE=`grep "$TARGET" PASS0.log | sed 
> 's#.*\([0-9]\{4\}\)$#\1#'` echo $BITRATE > bitrate.log

Pass 0 is deprecated and said to be broken. IIRC it can lead to
desync. It is better to encode the audio separately and calculate the
video bitrate from the size of the encoded audio file and target size.
Unless you are using vqscale you really should always use 2 pass so
this pass selection gubbins is all a bit unnecessary.

> rxvt -title "### EXTRACTION VIDEO: PASS 1 ###" -e tail --follow=name
> PASScur1.log &(( cat $VOBDIR/*.vob | \
>     mencoder $OPTS $TS -oac copy \
>     -ovc lavc \
>     -lavcopts ${PASS1LAVOPTS} - ) >> PASScur1.log 2>&1)
>     mv PASScur1.log PASS1.log

This is why I like to see people's scripts; there's always something
in them that strikes me as bizarre :-) I see now why you export all
your variables.
People seem to complain a lot that cat *.vob | mencoder doesn't work
but I guess YMMV.

Martin




More information about the MPlayer-users mailing list