Go Back   Winamp Forums > Developer Center > Winamp Development

Reply
Thread Tools Search this Thread Display Modes
Old 25th March 2002, 23:29   #1
ekkis
Junior Member
 
Join Date: Mar 2002
Posts: 5
Send a message via Yahoo to ekkis
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?
ekkis is offline   Reply With Quote
Old 26th March 2002, 11:28   #2
Gourou
Senior Member
 
Gourou's Avatar
 
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
Gourou is offline   Reply With Quote
Old 26th March 2002, 13:43   #3
ekkis
Junior Member
 
Join Date: Mar 2002
Posts: 5
Send a message via Yahoo to ekkis
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.
ekkis is offline   Reply With Quote
Old 27th March 2002, 23:21   #4
Gourou
Senior Member
 
Gourou's Avatar
 
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
Gourou is offline   Reply With Quote
Old 28th March 2002, 03:26   #5
ekkis
Junior Member
 
Join Date: Mar 2002
Posts: 5
Send a message via Yahoo to ekkis
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.
ekkis is offline   Reply With Quote
Old 28th March 2002, 10:46   #6
Gourou
Senior Member
 
Gourou's Avatar
 
Join Date: Feb 2002
Location: The backside of the universe on the trailing edge of eternity
Posts: 238
Quote:
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
Gourou is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > Winamp Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump