View Full Version : Linux client?
25th March 2002, 23:29
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?
26th March 2002, 11:28
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
26th March 2002, 13:43
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.:
I get (along with other data) a list of url's like this:
...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?
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!
I know these are a lot of questions but any answers that can lead me to a better understanding would be greatly appreciated.
27th March 2002, 23:21
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
28th March 2002, 03:26
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.
28th March 2002, 10:46
problem is I don't get length from the pls and the info doesn't seem to be in the stream itself either...
sorry dude, this is something I noticed myself, something that is very lacking in fact. Unless the title changes, I've never been able to find a way to tell when the song changes because your recieving a stream, and that stream has no breaks or anything like a normal song, it doesnt need to, so the meta data is used to tell you when the song changes, if you have no meta data, then your sol
vBulletin® v3.8.6, Copyright ©2000-2013, Jelsoft Enterprises Ltd.