Re: bash scripting: mplayer command line playlist

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Craig White
Date:  
To: plug-discuss
Subject: Re: bash scripting: mplayer command line playlist
On Thu, 2005-02-17 at 21:42 -0700, Mike Hoy wrote:
> assuming i want to use mplayer in command line only how can i make a
> shell script that plays all of my music files in my music/ directory
> w/out having to specify each sub directory?
>
> So far I got this working:
>
> a file called playlist.sh:
> mplayer -shuffle band1/*.mp3 band2/*mp3 band3/*.mp3
>
> this playlist would be fine, but often i add or remove sub dirs from
> w/in my music/ directory
>
> and I specify *.mp3 so mplayer doesn't try to play anything buy mp3's
>
> or is there a better way to tell mplayer to loop thru all the music in
> music/ and it's sub directories?
>
> i realize this isn't exactly Mission Critical, but it took me awhile
> just to get it to work as is, now that i've spent all of my energy
> trying to figure this out maybe one of you can show me what would have
> worked so much more easily. Seems I learn the hard way these days...

----
how much mplayer did you get installed?

# rpm -qa|grep mplayer
mplayer-1.0-36_pre5.rhfc3.at
mplayer-fonts-1.0-6.at
mplayer-skins-1.0-pre3_12.at
mplayer-skin-mini-0.1-11.1.at
mplayerplug-in-2.75-18.rhfc3.at

If you have the 'skins' installed, then it is a fully 'faced' media
player with which you can create playlists in a full gui.

if you want to drive it from command line...

mplayer --help will show you -playlist option to play a list from a file

but I suspect that you might be able to just 'pipe' a list from standard
in (see, those who taught me last week will realize that I wasn't
sleeping through the lesson)...

echo "band1/file.mp3 band2/file.mp3" | mplayer -shuffle (but I don't see
shuffle as an option)

Note that my packages have 'at' which tells me they came from Axel
Thimms repository.

Good time to make a pitch for smartpm.org ;-)

Lastly, Movie Player (mplayer) is probably a little overweight for
playing list of mp3's

if you have xmms-mp3 installed (yum install xmms-mp3 if not installed),
then you might find more versatility for playing mp3's

Craig

---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss