|
|
#1 |
|
Junior Member
|
Linux client?
I'm interested in finding code or a patch to mpg123 that will allow it to play from a shoutCast broadcast... anyone know of such a thing?
|
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Feb 2002
Location: The backside of the universe on the trailing edge of eternity
Posts: 238
|
you should be asking the other way around, go ask the ppl that make that program if they have an update or a patch for it, it might be open source, if it is, then a patch is likely to be around somewhere
|
|
|
|
|
|
#3 |
|
Junior Member
|
thanks for the suggestion. Actually I found out that mpg123 does support playing a live stream (both ShoutCast and IceCast) but one important thing it doesn't do is pick up (or at least display) the name of the track it's currently playing... I've probably looked through the code sufficiently that I could patch it but I need to understand more about the streaming thing... here's one thing that puzzles me: if I look at the output of a ShoutCast playlist e.g.:
http://www.shoutcast.com/sbin/shoutc...e=filename.pls I get (along with other data) a list of url's like this: File1=http://206.98.167.99:8100 File2=http://205.188.234.66:8004 File3=http://212.115.192.196:8000 ...now, the curious thing is that if I start listening to the first url, it will play a song and when that song ends, it continues with another song! so the obvious question is why is there more than one url in the playlist? Another odd thing is that the Length attribute for each entry in the playlist (see below) is -1... so how does my player know when to stop listening to that url and start listening to the next? alternatively, if the player doesn't ever need to quit listening to the 1st url, then how does it know the length of the song so it can tell when the sream no longer contains raw music data but headers for the next song? [playlist] numberofentries=14 File1=http://206.98.167.99:8100 Title1=(#1 - 4/5) D I G I T A L L Y - I M P O R T E D - European Trance, Techno, Hi-NRG... we can`t define it! Length1=-1 I know these are a lot of questions but any answers that can lead me to a better understanding would be greatly appreciated. |
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Feb 2002
Location: The backside of the universe on the trailing edge of eternity
Posts: 238
|
you ask some major questions..so..
1.) it has more than one url, because it will go to the next, if the first one doesnt connect, it will go down the list till it finds one that sends back some music.. 2.)the player NEVER stops listening to a url, because it doesnt need to, the length is set so that it DOESNT go to the next one in the playlist, if you sit there and watch the time, it never resets, it just keeps on going up... 3.) the song title data is called Meta data..it is sent outside of the song packets that contain the music, if the song sends 8096 bytes of data, or 8k, then it assumes that when it gets the next section, then what it gets should contain a header saying that this is music, if the header doesnt say that, then it assumes that it is meta data |
|
|
|
|
|
#5 |
|
Junior Member
|
thank you for the clarifications. curiously, I've found that there is no metadata in the streams I've been listening to... so I gather that it is optional data.
however, it seems that connecting to the host doing the streaming on port 80 will yield that information! so all I have to do is figure out how to tell when one song ended and the next began so I can go query that page. problem is I don't get length from the pls and the info doesn't seem to be in the stream itself either... so if anyone's got any ideas I'd be greatful. |
|
|
|
|
|
#6 | |
|
Senior Member
Join Date: Feb 2002
Location: The backside of the universe on the trailing edge of eternity
Posts: 238
|
Quote:
|
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|