Slashdot Mirror


Mixed MP3/Ogg Streaming

haplo21112 writes "I am working on coding a web front end to choose music from the collections stored on my web servers hard drive, and then stream this music to machine connected to my stereo. Like many people I would think, my music collection is mixed between .ogg/.mp3 formats since I started ripping before .ogg(which I now use) was available. The problem I have run up against is I can find no utility for streaming, that supports both formats, specifically both in a mixed playlist. Mod_MP3 came close, but it turns out that it can handle only one at a time either all .mp3's or all .oggs, the playlist can't be mixed. I looked into the Icecast streaming utilities, but they seem to be mp3 bound at least till the icecast 2.0 release. Has anyone run into this same problem of mixed media, did you come up with a solution that didn't require redoing half your collection in the other format." Ah, if only the problem was that simple...

This is the problem, when a client, like XMMS, connects it negotiates the stream type. After this it just assumes all data after this point is of the same type. At no point can it switch content types. You can use something like a play list which lists multiple connections to simulate playing different formats in a row, the thing is this requires a reconnection to the server each time.

You can blame the two dominant protocols, SHOUT and ICY. One was created for the Shoutcast server and the other was created by the Icecast folks. Neither of them really considered the issue of carrying any other payload then MP3, or more to the point, changing content type in midstream.

At some point it would be great if Vorbis/Ogg became dominant because of the silly copyright restriction with MP3 that make the use of the lame encoder pretty questionable. It still has a way to go though since the code for bit peeling has yet to be finished and until that is completed, to down bitgrade an Ogg stream you have to decode it to some format like PCM and then reencode to Ogg (which is certainly not optimial for real time demands).

2 of 19 comments (clear)

  1. An Update by haplo21112 · · Score: 3, Informative

    Last night while toying with ideas on how to proceed, while waiting to see if Question would make Ask Slashdot, I discovered something that does work after a fashion anyway. I setup shoutcast on the server(Linux). I am feeding shoutcast with Winamp's(NT) streaming component, from a playlist of all the MP3's and OGG's on the server. Winamp seems to be able to make the change back an forth between the two formats as it sends the data to Shoutcast(and presumably Icecast.) I can then pick up the stream on another winamp session(or freeamp or XMMS) on another machine. So it is possible in a way to do what I want if there existed a program that could do what winamp does, and have its playlist populated by a web interface while it is running.

    --
    Power Corrupts,Absolute Power Corrupts Absolutely, leaving one person(group)in charge is absolutely corrupt.
    1. Re:An Update by krow · · Score: 3, Informative

      Its now in the TODO. I have thought about it a bit and have a couple of ideas about it. Use default content type to determine what is played and allow file directives to get you to the other stream.

      --
      You can't grep a dead tree.