From 8a3ed7643312207df3ac9c4db39114a93599ff01 Mon Sep 17 00:00:00 2001 From: atmos4 Date: Mon, 3 Feb 2003 13:04:24 +0000 Subject: update to use lavc, xvid, divx4 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9252 b3059339-0415-0410-9bf9-f77b7e298cf2 --- TOOLS/menc2pass | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'TOOLS') diff --git a/TOOLS/menc2pass b/TOOLS/menc2pass index d6b4bd138f..c52533fef3 100755 --- a/TOOLS/menc2pass +++ b/TOOLS/menc2pass @@ -9,11 +9,22 @@ my $mencoder="mencoder"; # Path to MEncoder (including binary name) die <<"EOF" unless @ARGV; Menc2Pass: No arguments given! Please give all usual encoding parameters you would give to mencoder, but leave -away the -pass switch. +away the pass= suboption. EOF for(my $i=1; $i<=2; $i++) { - system($mencoder,@ARGV," -pass $i") - and die "MEncoder pass $i failed!\n" + my $parm=""; + foreach my $val (@ARGV) { + if($val =~ /-lavcopts/) { + $parm.="$val vpass=$i:"; + } elsif($val =~ /-(divx4)|(xvid)opts/) { + $parm.="$val pass=$i:"; + } else { + $parm.="$val "; + } + } + print "Running $mencoder $parm\n"; + system($mencoder,$parm) + and die "MEncoder pass $i failed!\n" } -- cgit v1.2.3