[Mplayer-dev-eng] Fwd: mplayer contrib.

Arpi arpi at thot.banki.hu
Sun Jul 22 23:59:51 CEST 2001


is it usable?
i don't understand perl, but it seems to simple.

--------- Forwarded message ---------
From: David Chan <prometheus at theendofthetunnel.org>
To: arpi at thot.banki.hu
Subject: mplayer contrib.

This is a multi-part message in MIME format.

Hello,
    I am very impressed with Mplayer.  I love the lack of
a GUI and am amazed at how efficently it plays a wide
variety of codecs.

    I am writing because I felt that Mplayer lacks a cool
feature, which is the ability to play multiple files in
succession.  ie:
    `mplayer file1.mpg file2.avi file3.mpeg`
but dont worry  cause i'm  not about to whine and plead
for features, i just wrote a perl wrapper program to use
with Mplayer.  I felt this would be the easiest way.

I have attached my program for you to review, i cant
say much for the code, but it works.  you can even
pass Mplayer  flags to it, though you may have to
put quotes around it.   I would be honored if you would
distribute it with Mplayer.

Thanks
David Chan.
<david at spinster.org>

PS- You may consider mp GPL'd  and the standard
disclaimer applies. :)


#!/usr/bin/perl

# A simple wrapper for Mplayer 
# mp (c) 2001 David Chan <david at spinster.org>
# This code is distributed under the terms of the GPL 
#
# MPlayer Info:
# MPlayer 0.17a-IdegCounter  (C) 2000-2001 Arpad Gereoffy <arpi at thot.banki.hu>

# set your default flags here...
# $D_FLAGS = "-vo x11 -abs 1000";

$EXE = `which mplayer`;
chomp($EXE);
$EXE .= ' '.$D_FLAGS;

if ($#ARGV <= 0) {
	print "\nUsage: mp ['-Mplayer Flags'] file1 file2 ...\n\n";
}

for ($i=0;$i<= $#ARGV ;$i++) { 
	if ($ARGV[$i] =~ /^-/ ) {
		$EXE .= ' '.$ARGV[$i]." ";
		print "adjusting to $EXE\n";
	}else{
		$tEXE = $EXE." \"".$ARGV[$i]."\"";
		print "\tNow playing $tEXE\n";
		print `$tEXE`;
	}
}




_______________________________________________
Mplayer-dev-eng mailing list
Mplayer-dev-eng at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-dev-eng



More information about the MPlayer-dev-eng mailing list