Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
Write an article for LinuxForums Today! Win Great Prizes!
There are various programs that will allow you to create playlists for your favorite media device, and some of them may even have the option to edit it. If you have such a program and are happy with it, then this article is not for you. I "discovered" this little trick while trying to get a playlist to work on my Sansa Clip. The following instructions will work (I think) on any Sansa device, and it should be pretty easy to adopt it to any other device (including your computer). Nothing in this article is new but stems from a collection of stuff I found out while trying to get my own playlist to work. I just wrote it out in a simple, easy to follow, step by step format. I will not take any responsibility if you brick your device or any other mishap befalls you, your computer or your device (software included) as a result of this HOWTO. I also cannot guarantee that it will work. All I know is that it worked for me, and it should work for you too. Enjoy!
Step 1 Assuming you have already connected your media device to your computer and have mounted it, browse to the root directory of the device. Note: The placement of the playlist may be different for your device. I suggest that you find out (somehow) where the playlists for your device are stored.
Step 2 Create a new text file with a m3u extension. The name of the file will be the name of the playlist. Now, this assumes that your device supports m3u files. If it doesn't, well, read the title of the article again.
Step 3 Open the m3u file in your favorite text editor. m3u files have a few rules: 1. Every song is on a new line. 2. Use the # character to comment a line. 3. Caps sensitive. The first line of the file should be #EXTM3U This just tells it that there will be extra info as well as the song.
Step 4 For every song, you will need 2 lines of code:
MUSICBONDBond - Bond8-Duel.mp3
Line 1 is the extra info for the song. The number is the length of the song in seconds. After that comes the title of the song, usually this is the same as the file name. This information will be displayed when the song plays. Pay attention to the spaces and punctuation marks, they're important!
Line 2 is the absolute path to the song. In the root of my device is a folder MUSIC which stores all the music files. From there I organized it in folders by band and then by album. In purist terms it would be pathtosongName of Song.mp3. Please note, this assumes that the m3u is in fact in the root of the device. If it is somewhere else, then you will need to provide the path from where the m3u file is to the song. If the m3u file and the song belong to different parent directories I think (I'm not sure) that you can provide the path to the song from the root.
At the end of the file (after the last song) leave a blank line. This way the device knows that that is the end of the file.
Step 5 Save the file and you're done! Depending on your distro/desktop/text editor you might get a temporary autosave copy of the m3u file you were working on. Just delete it. Otherwise you'll end up with two playlists with the same name. (And one of them might not have all of the songs you added).
Well, that's all folks! I hope this is helpful, and works for you too. Good luck!
This will generate a file with purely paths to the music itself, and is very fast and easy to use.
RE: Little bit easier way to create the playlist written by rsatd:
Thanks for useful article
writen by: halfconscious on 2010-07-14 10:15:54
Thanks for that article - particularly useful was tip about changing the forward slash in paths to back slashes - until this was done my playlist always reported as empty.
Also , with my sansa clip I did not need the #EXTINF lines to get it to work.
RE: Thanks for useful article written by halfconscious:
Comment title: * please do not put your response text here