How can I create an MPlayer playlist with a shell script?

RoundRobin picture RoundRobin · Apr 8, 2012 · Viewed 11.6k times · Source

I am trying to create a shell script in Linux that when executed searches a directory for all media files then creates a playlist and plays it with MPlayer.

Answer

mah454 picture mah454 · Apr 9, 2012

Use this command :

find /PATH/TO/MUSIC/DIRECTORY/ -type f -iname "*.mp3" > playlist.m3u

Now play with mplayer :

mplayer -playlist playlist.m3u