Sampled by Sam Samshuijzen. Studio Denkraam 2008. From Wiki: ========= Here is an example of an extended M3U file. Sample.mp3 and Example.ogg are the mediafiles. 123 and 321 are the lengths by seconds. A length of -1 may be used when the media file is a streaming file, as there is no predefined actual length value possible. The value after the length is the title to be shown, which is generally the same as the location of the file which is on the second line. #EXTM3U #EXTINF:123,Sample title C:\Documents and Settings\I\My Music\Sample.mp3 #EXTINF:321,Example title C:\Documents and Settings\I\My Music\Greatest Hits\Example.ogg This example shows how to create an m3u file linking to a specified folder (Flash drive, CD-ROM, for example). The m3u file should contain only one string - the path to your folder. After starting up, Winamp will play all contents of the folder: C:\Music ============== http://hanna.pyxidis.org/tech/m3u.html The M3U (.m3u) Playlist File Format (December 2001, Revised June 2007 ) Preface: Since this page became the biggest reference to the M3U playlist on the internet I thought it was about time to expand on it and answer some of the questions that I get asked regularly. This page used to be very short and just gave the basic mechanics when I wrote it in 2001, but here is a more fleshed-out version with more than just a format. Q & A * What is an "M3U File"? M3U is a media queue format, also generally known to humans as a playlist. It is the default playlist save format of WinAMP and most other media programs. It allows multiple files to be queued in a program in a specific format. In plain english it is exactly as it sounds -- a list of what will be played, like a set list at a concert. * Did you invent the M3U playlist? No. I think it was invented by Justin Frankel of Winamp fame, but I have no confirmation about this. * What is the format (syntax) of an M3U playlist? The actual format is really simple, though; not complicated at all. A sample M3U list could be: #EXTM3U #EXTINF:111,3rd Bass - Al z A-B-Cee z mp3/3rd Bass/3rd bass - Al z A-B-Cee z.mp3 #EXTINF:462,Apoptygma Berzerk - Kathy?s song (VNV Nation rmx) mp3/Apoptygma Berzerk/Apoptygma Berzerk - Kathy's Song (Victoria Mix by VNV Nation).mp3 #EXTINF:394,Apoptygma Berzerk - Kathy's Song mp3/Apoptygma Berzerk/Apoptygma Berzerk - Kathy's Song.mp3 #EXTINF:307,Apoptygma Bezerk - Starsign mp3/Apoptygma Berzerk/Apoptygma Berzerk - Starsign.mp3 #EXTINF:282,Various_Artists - Butthole Surfers: They Came In mp3/Butthole_Surfers-They_Came_In.mp3 The First line, "#EXTM3U" is the format descriptor, in this case M3U (or Extended M3U as it can be called). It does not change, it's always this. The second and third operate in a pair. The second begins "#EXTINF:" which serves as the record marker. The "#EXTINF" is unchanging. After the colon is a number: this number is the length of the track in whole seconds (not minutes:seconds or anything else. Then comes a comma and the name of the tune (not the FILE NAME). A good list generator will suck this data from the ID3 tag if there is one, and if not it will take the file name with the extension chopped off. The second line of this pair (the third line) is the actual file name of the media in question. In my example they aren't fully qualified because I run this list by typing "noatun foo.m3u" in my home directory and my music is in ~/mp3, so it just follows the paths as relative from the path of invocation. * I want to pull the music out of an M3U file, how do I do it? You really can't, not out of the file itself. The M3U file is just a list of other files and doesn't store any of the music or sound information inside itself. You can read the M3U file and then see which files are listed and get the music from those, however -- if you can find those files that is. * The M3U file is so small, how can all that music fit? The M3U file is a list of MP3 files, "pointers" to use the programmers term, but doesn't contain any of the sound data itself. * Can I see what files are listen in an M3U file without opening it with my MP3 playing program? Yes. M3U files are really just "text" files which means that they can be viewed by people as well as computers. To see what an M3U file contains you can open it with a text editing program like "Notepad" in Windows or "textedit" in Macintosh. Some of the information may not make sense, but the list of MP3 files will be easy to spot. * I moved an M3U to another place on my computer and now it won't play. A lot of times the paths to the MP3 files in an M3U are "relative", that means they look for the MP3 files in relation to where the M3U file lives. Example: If I had an M3U in the following location on my hard drive: c:\mp3s ...and it contained path to an MP3 like: Abba\Annoying_abba_song_1.mp3 ... my MP3 playing program is really looking for that file in: c:\mp3s\Abba\Annoying_abba_song_1.mp3 ... so if I move the M3U file to: c:\other ... all of the sudden my MP3 program will be looking for the MP3 file in: c:\other\Abba\Annoying_abba_song_1.mp3 ... which probably doesn't exist and so it won't play. This is not always the reason a file won't play, but if the file is there and all of the sudden the M3u won't play it it is likely the reason. ============================= http://forums.winamp.com/showthread.php?threadid=65772 Author : Sawg The Unofficial M3U and PLS Specification Winamp playlists are just a text file containing links to the location of the proper file. You can crate or edit a playlist in any text editor. It could be anything to MP3, WMA, or even another playlist. Just because something is in a playlist, doesn't mean Winamp can play it though. Winamp will just skip over unknown file formats. This document will hopefully try to clarify the differences of the playlist formats available. Generic M3U/PLS A list of links to files makes a valid generic playlist. The entry can be relative (i.e. \files\song.mp3) or specific (i.e. c:\media\files\son.mp3). Also, URLs can he inserted to point to a stream or a file on the Internet. Here are a few sample generic MP3/PLS files: A Simple M3U sample.m3u code: Alternative\Band - Song.mp3 Classical\Other Band - New Song.mp3 crap.mp3 F:\more music\foo - bar.mp3 http://www.site.com:8000/listen.pls http://www.site.com/~user/mine.mp3 - Alternative and Classical are sub-directories of the directory that this playlist is stored in. - "Song" and "New Song" are in sub-directories that this playlist is stored in. - "Crap" is in the same directory that the playlist is stored in. - "Foo - Bar" is in the specified directory, which may or may not be the same directory the playlist is in. - URL submitted by user. is a Shoutcast stream. - "Mine" is a MP3 stored on a web server somewhere. These path options hold true of the extended playlists described below. Extended M3U Let's first look at an extended M3U file then I will describe everything below sample2.m3u code: #EXTM3U #EXTINF:233,Everclear - So Much For The Afterglow Alternative\everclear - SMFTA.mp3 #EXTINF:227,Weird Al - Everything You Know Is Wrong Comedy\Weird Al - Everything You Know Is Wrong.mp3 #EXTINF:187,Weird Al Yankovic - This is the Life Weird Al - This Is The Life.mp3 #EXTINF:129,Weird Al: Bad Hair Day - Gump URL submitted by user. #EXTINF:-1,My Cool Stream URL submitted by user. Explanation of entries: #EXTM3U At the VERY top of the Extended M3U file is this header, which signifies this is an extended M3U file. '#EXTM3U" must be all capital letters. #EXTINF:233,Everclear - So Much For The Afterglow: This is the line that tends to confuse people. Let's break it up into parts - #EXTINF:: This signifies this is an Extended Information field. It ends with a colon (:). - 233,: This is the time of the file in seconds followed by a comma. (233 seconds = 3:53). On the last entry there is a negative one, this is usually seen on streams, it tells the program to ignore the time entry. - Everclear - So Much For The Afterglow: Title to display. This is usually the title read from the file name or ID3 tags. This also can be the name of a stream. No characters follow the title. Alternative\everclear - SMFTA.mp3: File location as described above with basic playlists. Extended PLS (PLSv2) Same playlist from the M3U section in PLS format. code: [playlist] File1=Alternative\everclear - SMFTA.mp3 Title1=Everclear - So Much For The Afterglow Length1=233 File2=Comedy\Weird Al - Everything You Know Is Wrong.mp3 Title2=Weird Al - Everything You Know Is Wrong Length2=227 File3=Weird Al - This Is The Life.mp3 Title3=Weird Al Yankovic - This is the Life Length3=187 File4=http://www.site.com/~user/gump.mp3 Title4=Weird Al: Bad Hair Day - Gump Length4=129 File5=http://www.site.com:8000/listen.pls Title5=My Cool Stream Length5=-1 NumberOfEntries=5 Version=2 Explanation of entries: [playlist]: Signifies that this is a playlist. This is case sensitive. File#=: Location of the file in any of the formats described above. This is also case sensitive. Also the # sign after "File" signifies what file number it is. The first file in the playlist is "File1", the second is "File2" and so on. Title#=: Title to display. This is usually the title read from the file name or ID3 tags. Like the other fields, this is case sensitive. This also can be the name of a stream. Like "File#" the pound sign (#) is replaced by the entry number that is in the playlist. Length#=": Length in seconds, this is also case sensitive. On the last entry there is a negative one, this is usually seen on streams, it tells the program to ignore the time entry. Like "File#" the pound sign (#) is replaced by the entry number that is in the playlist. NumberOfEntries=#: The total number of entries in the playlist. This should match the last number on the "File#", "Title#", and "Length#" fields. Also case sensitive. Version=2: This required entry near the bottom tells the player what format the PLS is in. Older versions of the PLS format did not include this. Like everything else, it is case sensitive.