Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Create a universal MP3 playlist UNIX
I found this trick out a while back while running a program named Music 0.1.app. It was the first attempt at skinning mpg123 for OS X ... enough history though. Basically by typing in this command:
find ~/Music/* -type f -name '*.mp3' > ~/Music/Playlist.m3u
a playlist is created in your music directory that contains every single music file in your music directory. Play this file via mpg123 by typing:
mpg123 -@ ~/Playlist.m3u
This is a standard MP3 playlist, so basically any MP3 program can read it. Obviously you can alter this command to list other files such as .mov, .jpeg, etc. Thought this would be helpful for some people...

[Editor's note: See previous hints on mpg123 and other uses for the find command.]
    •    
  • Currently 1.60 / 5
  You rated: 3 / 5 (5 votes cast)
 
[15,527 views]  

Create a universal MP3 playlist | 5 comments | Create New Account
Click here to return to the 'Create a universal MP3 playlist' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
an extra tweak
Authored by: see on May 09, '02 08:20:58AM

find ~/Music/* -type f -name *.mp3 > ~/Music/Playlist.m3u
id personally use the following:
find ~/Music -type f -name *.[mM][pP]3 > ~/Music/Playlist.m3u
then u get all mp3-files even if they are named *.Mp3 or *.mP3 or *.MP3
hope this helps for people wodering why not all mp3-files get in the list...
also remeber not to have any files ening with .mp3 (or other cases) in the directory where you run this command since it then will do this:
we have foo.mp3 in the dir we do search from (say homedir)
then it will only look for foo.mp3 in your ~/Music dir...



[ Reply to This | # ]
simple correction
Authored by: klez23 on May 10, '02 03:47:25AM

of course your "play" command should read:
mpg123 -@ ~/Music/Playlist.m3u

since that's where you put the playlist file.

peter



[ Reply to This | # ]
simple correction
Authored by: c.i.t on May 29, '02 11:11:50PM

whoops...I would try to say something funny right now, but there is no need to...I simply made a mistake :-)



[ Reply to This | # ]
random play
Authored by: klez23 on May 10, '02 04:09:23AM

oh yeah, if you add "-z" or "-Z" to the command line, it will shuffle the playlist. (not sure what the difference is between these two options.)

eg mpg123 -z -@ ~/Music/Playlist.m3u

if you want to skip to the next song, hit control-c. control-c twice quickly will quit playback altogether.

nice thing about mpg123 is it uses about 1/3 the cpu power that itunes does.

peter



[ Reply to This | # ]
Create a universal MP3 playlist
Authored by: parterburn on Oct 24, '09 03:12:05PM

Is there any chance an actionscript could be made for this? So that I can select some files, run the script and it spits out a Playlist.m3u file?



[ Reply to This | # ]