view TOOLS/mp.pl @ 18650:587abd8f3dab

Except for missing cd-dvd.xml and codecs.xml, German xml docs should be complete, synced and corrected :) Here we go: bugreports.xml: * r18600: xml docs: CVS --> Subversion * r18552: URL fix bugs.xml, audio.xml, usage.xml, faq.xml, tvinput.xml, documentation.xml: * fix "in sync with" tag skin.xml: * review * r18600: xml docs: CVS --> Subversion * r17975: Rename the default GUI skins directory from 'Skin' to 'skins' install.xml: * r17975: Rename the default GUI skins directory from 'Skin' to 'skins' * r17707: New website structure, the /homepage subdirectory is gone. * r17462: s/LIVE.COM/LIVE555/ + URL update video.xml: * tiny wording fix mail-lists.xml: * r18606: Fix mailing list name. * r18600: xml docs: CVS --> Subversion
author kraymer
date Thu, 08 Jun 2006 16:20:01 +0000
parents 493cbec56a14
children
line wrap: on
line source

#!/usr/bin/perl -w
use strict;
# Filename: mp.pl
# Date    : created 2001-07-24
# Author  : Felix Buenemann <atmosfear at users.sourceforge.net>
# Idea by : David Chan <prometheus at theendofthetunnel.org>
# License : GNU General Public License (GPL)
#           (refer to: http://www.fsf.org/licenses/gpl.txt)
#
# Description:
# Small Perl helper script that allows to play multiple files with MPlayer.
# Wildcards are supported (eg. "mp.pl -vo x11 /data/*.avi").
#
# Configuration:
# If MPlayer is not in your path, give the full
# path to mplayer binary in the line below.
# (example: "/usr/local/bin/mplayer")
use constant MPLAYER => "mplayer";

my (@parms, @files);

die
"mp.pl: No parameters given!

MPlayer multifile playback helper script 0.9
Copyleft 2001 by Felix Buenemann

Syntax: mp.pl <parameters> <files>

Where <parameters> are all possible commandline switches for mplayer and
<files> can be either a list of files, like file1 file2 file3 and/or a
wildcard definition, like *.avi.

Example: mp.pl -vo x11 /dvd/VIDEO_TS/VTS_05_*.VOB movie.asf
\n"
if ($#ARGV < 0) || ($ARGV[0] =~ m/^--*(h|help)/);

foreach (@ARGV) {
	if(m/^-\w+/) { push @parms, $_ }
	elsif(-f $_ && -r _ && -B _) { push @files, $_ }
	else { push @parms, $_ }
}
die "No valid files to process!\n" unless @files;
foreach (@files) {
	print "Invoking MPlayer for '$_'...\n";
	system(MPLAYER, @parms, $_)
		or die "Couldn't execute MPlayer: $!\n";
	($? >> 8) != 1
		and die "Couldn't properly execute MPlayer, aborting!\n";
}
# EOF