Friday, March 12, 2010

how-to: m3u file with relative path

I figured out how to create an m3u file for a Playlist/tracklist, which is a simple text file, that by using relative file paths, works for both

1 playing mp3 files on my PC

2 playing mp3 files on my Sansa Sandisk Clip mp3 player, by merely copying/pasting the m3u & the relative album/folders of tracks the m3u references.  NOTE - you must pick "MSC" in Settings>USB Mode. The other modes: "Auto Detect", or "MTP" mode will not work. 

Note, I've tested this using "standard English" characters 0-9 & A-Z.  This happens to work for me, given the nature of the mp3 files I have.  You might find a bug if you have "non-English" characters, such as the Spanish ñ, or even worse the Asian language "Unicode" type characters.  Personally I just rename the tracks with Non-English characters, aka I "anglicize" it, eg I retitle"Nariño" to "Narino".

Here's an example m3u file, which happens to be an Artist playlist of Dilated Peoples m3u .  Either download that link, or just copy/paste this text in between the ---- in a blank text file & save that file as .m3u:


D\Dilated Peoples 2000 The Platform\03 No Retreat.mp3
D\Dilated Peoples 2006 20-20\03 You Can't Hide You Can't Run.mp3
D\Dilated Peoples 2000 The Platform\14 The Shape Of Things To Come.mp3
D\Dilated Peoples 2001 Expansion Team\11 Pay Attention.mp3
D\Dilated Peoples 2004 Neighborhood Watch\01 Marathon.mp3


You can use this as a template, just keep/reuse the 1st line "#EXTM3U  " & the final blank line.  Delete off the middle lines that reference Dilated tracks; replace these with similar lines referencing your tracks.  Note that your tracks do not need to be in subfolders.  If your tracks are in the same top folder which contains your m3u, you would just refer to the track itself.  Eg you would just reference "03 No Retreat.mp3" instead of "D\Dilated Peoples 2000 The Platform\03 No Retreat.mp3".  I do recall reading there is an upper limit of 200 or so characters.  For me, this is not a problem.  If you have a ridiculously large number of nested folders, or a long track name, you might need to shorten it to ensure you don't hit this character limit.

BTW big ups to Sansa for making such a great functionality.  My Creative Technologies 60 GB player does not have this functionality; 1 must manually define Playlists in their proprietary app.  I've never owned an Apple mp3, but I heard one must do a similarly define their playlist in iTunes.

If u try this out, pls comment on how it works for you, or if you have questions.  Hope this helps.

No comments: