annotate TOOLS/menc2pass @ 22637:1a24a78f7474

Mark phony targets as such.
author diego
date Sat, 17 Mar 2007 00:19:41 +0000
parents 9733351ea3e5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3024
7a5021d0a2de Small two pass mencoder helper script in perl.
atmos4
parents:
diff changeset
1 #!/usr/bin/perl -w
7a5021d0a2de Small two pass mencoder helper script in perl.
atmos4
parents:
diff changeset
2 # Helper script to ease MEncoder two pass encoding
7a5021d0a2de Small two pass mencoder helper script in perl.
atmos4
parents:
diff changeset
3 # Copyleft 2001 by Felix Buenemann <atmosfear@users.sourceforge.net>
9159
6b1bdda5ab76 0.0357l
atmos4
parents: 9158
diff changeset
4 # This file comes under GPL, see http://www.gnu.org/copyleft/gpl.html for more
3024
7a5021d0a2de Small two pass mencoder helper script in perl.
atmos4
parents:
diff changeset
5 # information on it's licensing.
7a5021d0a2de Small two pass mencoder helper script in perl.
atmos4
parents:
diff changeset
6 use strict;
7a5021d0a2de Small two pass mencoder helper script in perl.
atmos4
parents:
diff changeset
7 my $mencoder="mencoder"; # Path to MEncoder (including binary name)
7a5021d0a2de Small two pass mencoder helper script in perl.
atmos4
parents:
diff changeset
8
7a5021d0a2de Small two pass mencoder helper script in perl.
atmos4
parents:
diff changeset
9 die <<"EOF" unless @ARGV;
7a5021d0a2de Small two pass mencoder helper script in perl.
atmos4
parents:
diff changeset
10 Menc2Pass: No arguments given!
7a5021d0a2de Small two pass mencoder helper script in perl.
atmos4
parents:
diff changeset
11 Please give all usual encoding parameters you would give to mencoder, but leave
9251
9733351ea3e5 update to use lavc, xvid, divx4
atmos4
parents: 9159
diff changeset
12 away the pass=<n> suboption.
3024
7a5021d0a2de Small two pass mencoder helper script in perl.
atmos4
parents:
diff changeset
13 EOF
7a5021d0a2de Small two pass mencoder helper script in perl.
atmos4
parents:
diff changeset
14
7a5021d0a2de Small two pass mencoder helper script in perl.
atmos4
parents:
diff changeset
15 for(my $i=1; $i<=2; $i++) {
9251
9733351ea3e5 update to use lavc, xvid, divx4
atmos4
parents: 9159
diff changeset
16 my $parm="";
9733351ea3e5 update to use lavc, xvid, divx4
atmos4
parents: 9159
diff changeset
17 foreach my $val (@ARGV) {
9733351ea3e5 update to use lavc, xvid, divx4
atmos4
parents: 9159
diff changeset
18 if($val =~ /-lavcopts/) {
9733351ea3e5 update to use lavc, xvid, divx4
atmos4
parents: 9159
diff changeset
19 $parm.="$val vpass=$i:";
9733351ea3e5 update to use lavc, xvid, divx4
atmos4
parents: 9159
diff changeset
20 } elsif($val =~ /-(divx4)|(xvid)opts/) {
9733351ea3e5 update to use lavc, xvid, divx4
atmos4
parents: 9159
diff changeset
21 $parm.="$val pass=$i:";
9733351ea3e5 update to use lavc, xvid, divx4
atmos4
parents: 9159
diff changeset
22 } else {
9733351ea3e5 update to use lavc, xvid, divx4
atmos4
parents: 9159
diff changeset
23 $parm.="$val ";
9733351ea3e5 update to use lavc, xvid, divx4
atmos4
parents: 9159
diff changeset
24 }
9733351ea3e5 update to use lavc, xvid, divx4
atmos4
parents: 9159
diff changeset
25 }
9733351ea3e5 update to use lavc, xvid, divx4
atmos4
parents: 9159
diff changeset
26 print "Running $mencoder $parm\n";
9733351ea3e5 update to use lavc, xvid, divx4
atmos4
parents: 9159
diff changeset
27 system($mencoder,$parm)
9733351ea3e5 update to use lavc, xvid, divx4
atmos4
parents: 9159
diff changeset
28 and die "MEncoder pass $i failed!\n"
3024
7a5021d0a2de Small two pass mencoder helper script in perl.
atmos4
parents:
diff changeset
29 }
7a5021d0a2de Small two pass mencoder helper script in perl.
atmos4
parents:
diff changeset
30