streaming a playlist with metadata

Dear Lazyweb, I seek software that does the following:

  • I give it an ordered list of MP3 files.
  • When a user loads some URL in (e.g.) iTunes, those files are streamed out, one after another, with appropriate metadata (extracted from underlying ID3 tags) sent just as each file starts.
  • When the user connects, it starts playing at the beginning of file #1 for each user. (As opposed to multicast-style, where all users get whatever's-on-right-now at the same time.)
  • The underlying individual files themselves should not be accessible.

I don't think I can make Icecast2 do this, nor Apache::MP3. But maybe I'm wrong.

Failing that, can someone explain to me what asynchronous streaming metadata format iTunes actually understands, and what headers/protocol it requires? It doesn't appear to do the "icy-metaint" thing; does that mean it does the UDP thing? I don't see headers being exchanged for either; and yet, it seems to update metadata somehow. Please don't make me run a packet sniffer. I hate that.

Update: Nevermind, I wrote my own.

Tags: , , , , , ,

9 Responses:

  1. handyman5 says:

    The SlimServer software can do some of the things you want:
    - It can load playlists
    - The streams have appropriate metadata
    - I think each stream exists in its own timeframe; I am not absolutely sure of this, never having tested it explicitly, but I know that it can send separate streams to the hardware Squeezebox and to a streaming client simultaneously.
    - It is controlled through a web interface, and it would be easy to either a) remove the code that generates links from the web skin, or b) lock down the interface with a password and "noauth" the stream URL.

    However, it is probably not designed for what you have in mind; it's targeted mostly as a library management and playlist creation tool for a small number of users on a local network. It may have some ideas that you can use, though, and it is all written in Perl.

    Hope this helps.

  2. xtttg says:

    I don't know about iTunes (I have only Linux boxes around me), but I just cat'd two MP3 files together, uploaded the result to an HTTP server and added a link to that MP3 file to Rhythmbox's Radio section. I don't know if I should be surprised or not, but it plays the tracks gaplessly and shows the right metadata when the tracks change. I don't have iTunes users to test this. Very interesting.

  3. jcheshire says:

    I found the documentation where we did precisely this. It was with Helix Universal Server -- out of the box, basic version -- and the accompanying "Simulated Live Transfer Agent" (SLTA). For each request of the stream from an end user, we fired off another instance of the SLTA process for that particular user. The config file simply grabbed the MP3's we gave it, reading the ID3 tags from the file.

  4. netik says:

    Isn't this exactly what .m3u files were made for?

    You make an ordered playlist of http:// urls, and each file is played in order as subsequent streams.

    iTunes will understand .m3u files.

    A sample m3u format is:

    #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

  5. mjog says:

    I could explain the format to you, but there wouldn't be any point. Apple formats are like quantum waves: As soon as you document them they collapse at the next software update.

    • jwz says:

      Apple didn't invent this particular bullshit; we have Shoutcast to thank for Braindamage A, and Icecast to thank for Braindamage B.

  6. stu_hacking says:

    a question if I may:

    OK, so, offering copyright MP3s for free download is generally considered illegal - we all know this from the past decade of internet. How much different is offering a single MP3 comprising of a number of different songs?

    Is this just something weird about the broadcasting licence?

    The reason I ask is that the mixtape .m3u seems to point to an mp3 file which seems to copy over using curl (though I didn't pull down the entire file to test it)

    • jwz says:

      It's not being offered for download, it's a realtime stream. You know, like radio. Hope taping is killing the music industry.