[MPlayer-users] Script update

Meino Christian Cramer Meino.Cramer at gmx.de
Tue Jul 20 13:32:23 CEST 2004


From: Martin Collins <martin at mkcollins.org>
Subject: Re: [MPlayer-users] Script update
Date: Mon, 19 Jul 2004 21:10:57 +0100

Hi Martin,

 ***THANK YOU FOR YOUR REVIEW*

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

  OK, accepted.
  But how can I use "any value"? 
  When you will follow the script, you will see, that these settings
  are used to extract the recommended bitrate, which is given at the
  end of the audio extraction process. Unfortunately, "only" a few
  bitrates for certain fixed CD sizes are presented.

  Or is a linear approximation "valid enough" to be used ???

> > # 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. 

  Ooopss...Error from my side:

  Should be read as "denoise3d=0:0:0:hqdn3d=0:0:0:"...

  As discussed previously that setting both denoiser to zero would
  lead to nothing but slower performance. I for myself noticed a
  slightly better PSNR when switching those explicitely to zero. But
  YMMV, because I have encoded b/w video...

  You are free to remove it ;)

> Also you need to separate hqdn3d and
> crop options with a comma not a colon. And 696 isn't divisible by 16
> either.

  Why all this "divided by 16". I have no problems watching the
  results with mplayer. Or is there another trick I dont know yet?

  

> > # 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.

   Exactly this is done by the script....

   "PASS0.log" was only a name I gave to the very first log file,
   nothing more. Look at the script...it does exactly what you wnat it
   to do...:)

   First task:
   Extract audio and mp3 it. Getch the recommended bitrate via sed
   magic.
   Second task:
   Extract video the first time, copy audio write divx2pass.log.
   Third and final task:
   Extract video the second time, copy audio again and take
   divx2pass.log as recommendation for the encoding.

   Voila.

   (or did I misunderstood you completly...)

> Unless you are using vqscale you really should always use 2 pass so
> this pass selection gubbins is all a bit unnecessary.

  See above

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

  Yes...äh...why?

> People seem to complain a lot that cat *.vob | mencoder doesn't work
> but I guess YMMV.

  Until now I havent noticed any problems by catting video into
  mencoder.
  But If you another smooth way to feed more than one file into
  mencoder seemlessly I am open for any improvement!

  Thanks again for your review, Martin!

  Meino

> Martin
> 
> _______________________________________________
> MPlayer-users mailing list
> MPlayer-users at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-users
> 



More information about the MPlayer-users mailing list