Results 1 to 7 of 7

Thread: Question about m3u format

  1. #1
    Newbie
    Join Date
    Nov 2001
    Location
    Raleigh, NC
    Posts
    55

    Question Question about m3u format

    Was going to post this here or in Charles corner.... Bump it elswhere if its out of place....

    Hey guys.. I ran a search on m3u format and came up with nothing. It seems quite easy and standard(extremely simple after looking at in notepad).... but my question is... what are these lines and what do they do... Take for example a m3u for one of my cds...

    #EXTM3U
    #EXTINF:383,Creed - Torn
    Creed - Torn.mp3
    #EXTINF:297,Creed - Ode
    Creed - Ode.mp3
    #EXTINF:298,Creed - My Own Prison
    Creed - My Own Prison.mp3
    #EXTINF:329,Creed - Pity for a Dime
    Creed - Pity for a Dime.mp3
    #EXTINF:298,Creed - In America
    Creed - In America.mp3
    #EXTINF:277,Creed - Illusion
    Creed - Illusion.mp3
    #EXTINF:218,Creed - Unforgiven
    Creed - Unforgiven.mp3
    Creed - Sister.mp3
    Creed - What's This Life For.mp3
    Creed - One.mp3


    Now, if I take off all lines with the #EXTINF + soung title... still works as it should. Are these numbers coming from it being from a bigger playlist?(my global playlist) Or what. I don't quite understand how these are/would be important. Any light anyone could shed or a linky to some doc or faq that explains this i'd greatly appreciate it. Thanks in advance!!!!

    ~DD
    Brent Parsons
    Raleigh, NC
    Just purchased '01 Loaded Accord
    that is begging for a computer
    :)

  2. #2
    FLAC
    Join Date
    Apr 2001
    Location
    Here, There, Everywhere
    Posts
    1,436

    Re: Question about m3u format

    quite simple, nutted this out myself for my application....

    #EXTM3U - just a header line to tell you to expect a m3u playlist.
    #EXTINF:xxx,Song Name - The [xxx] is the track time in seconds, [song name] is the mp3 song name (not the filename - remember this could be the song title after getting the ID3 tag info).

    and then the next line is the filename/location of the mp3 file.... easy aint it? and so on so forth.......

    the main reason for the m3u file is to aviod re-calcs of track times and reading of ID3 tags everytime a playlist is loaded..... this can be good on a large playlist of mp3's.... remember that track time is variable on the filesize/bitrate of the file...... (and VBR makes that harder too!)
    Project - GAME OVER :(

  3. #3
    Newbie
    Join Date
    Nov 2001
    Location
    Raleigh, NC
    Posts
    55
    Thanks a lot bud!!! I thought it would be something simple... just never found it anywhere.... I appreciate your help very much... now i can sleep and let my wheels continue to turn.... I'm so excited.. can't wait till i have time to program....




    Well... i'm editing this... Now that i see how that works. WHat about the creation of a m3u? Is there more to a m3u than what i see in this text file? See I assumed that the filename, was the actual filename with the ".mp3" suffix whacked off(which it is) and not just the title.(from an ID tag)

    Is there more to a m3u than what i see in the text file? Because if it actually was just the title, and not the filename, then it means that there has to be something hidden somewhere with the filename... right??? I'm in no hurry on this one... going to bed. Thanks again guys...

    ~DD

    PS- Mag... I've been laughing SOOOO damn hard at your avatar.... hilarious...
    Brent Parsons
    Raleigh, NC
    Just purchased '01 Loaded Accord
    that is begging for a computer
    :)

  4. #4
    FLAC
    Join Date
    Apr 2001
    Location
    Here, There, Everywhere
    Posts
    1,436
    thanks dude, yeah Im a HUGE simpsons nut, the new season has just started here in Australia and im loving that!

    there is no more to a m3u, period.... if you understand that you will have not trubble making em.... I make them with my mp3car player. I have a util that scans for mp3s in directories and spits out m3us..... check my website on the software page for details of that...

    i think you may be missing something reading your assumption....... take this for example (from your m3u example...)

    #EXTINF:298,Creed - In America
    Creed - In America.mp3

    okay the #EXTINF line is the TITLE of the mp3 that the player/playlister program has decided to call it. How did it come to this conclusion? thats entirely upto the program.... in the case of winamp 2.7x it is either gonna be ID3v1/v2 tags, or failing that just the filename. but its totally independent to the m3u itself....

    there is nothing else 'hidden'...... take this for example...

    #EXTINF:298,Creed - In America
    c:\mymusic\crap\temps\sortthis\foobar_backup.mp3

    that is TOTALLY valid, as long as 'foobar_backup.mp3' is found in that long winded path specified it is fine...... and when it plays the title will be 'Creed - In America'..... once again the filename and the title is totally independent...... try it yourself and you will see...

    writing software to work/make .m3u's is TOTALLY easy. in VB6 i wrote some functions for my mp3car player that takes a subdirecotory, opens each .m3u it finds.... and then reads each file and from that creates a 3 element * [number of mp3s] array storing the data.... for example.... to get track number 1's info...


    mp3_array[1,0] = Creed - In America
    mp3_array[1,1] = d:\mp3\top40\Creed - In America.mp3
    mp3_array[1,2] = 298

    make sense? its very easy to do if you have some VB skills..... if you do need a hand drop me a line and I can give you some code snippets that will be of use to ya.....
    Project - GAME OVER :(

  5. #5
    Newbie
    Join Date
    Nov 2001
    Location
    Raleigh, NC
    Posts
    55
    I gotcha dude. I thought that you meant that.... oh well.. nevermind... I undertstand what your saying. I have no VB skills.... c++ though

    Thanks for clearing it up!!!!

    ~DD
    Brent Parsons
    Raleigh, NC
    Just purchased '01 Loaded Accord
    that is begging for a computer
    :)

  6. #6
    FLAC
    Join Date
    Aug 1999
    Location
    Upper Marlboro, MD 20772
    Posts
    1,311
    if you are depending on winamp to create that playlist for i will strongly suggest u create it ur self, cuz as u can see from your original post, winamp DOES not 100% of the time DO the whole playlist.....it caching things... long story
    abcd-1
    Author of CobraI,II,III and now CobraIV.
    You can contact me on AOL instant messenger....nick is cenwesi or cenwesi3

  7. #7
    FLAC
    Join Date
    Apr 2001
    Location
    Here, There, Everywhere
    Posts
    1,436
    Originally posted by cenwesi
    if you are depending on winamp to create that playlist for i will strongly suggest u create it ur self, cuz as u can see from your original post, winamp DOES not 100% of the time DO the whole playlist.....it caching things... long story
    agreed...... I have never noticted that behaviour before tho? weird.... hmph.... oh and BTW, you need to fix up your sig charles...
    Project - GAME OVER :(

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •