The SHOUTcast Streaming Standard [Technical]

This forum will contain various articles contributed by the team and other invited guest.
BruceH.
Stream Host
Posts: 0
Joined: Sun Nov 12, 2006 6:46 am

Re: The SHOUTcast Streaming Standard [Technical]

Post by BruceH. » Wed Jul 22, 2009 4:34 am

Hello,

Once the source has correctly opened connection to the server, how should the broadcasting be done ?

Should the mp3 file be decoded first (with a mpg123 lib for example)? how much data to write on the remote port (byte per byte or doesn't matter )?

Thank you !

Flyte
Posts: 0
Joined: Tue Aug 25, 2009 2:27 pm

Re: The SHOUTcast Streaming Standard [Technical]

Post by Flyte » Tue Aug 25, 2009 2:37 pm

Firstly, thanks for the excellent info on the source connection protocol.

I've been using it in my project, but wasn't sure I'd understood the OP correctly.

I did my own data capturing and found that yes, I had understood correctly, and the steps that the source client takes to connect to the Shoutcast server are exactly how the OP had written out.

In case anyone else is wondering the same as me, this is the capture I took:

Client:
mypassword\n

Server:
OK2\n
\n
icy-caps:11\n
\n

Client:
icy-name:Unnamed Server\n
icy-genre:\n
icy-url:http://www.shoutcast.com\n
icy-irc:#shoutcast\n
icy-icq:0\n
icy-aim:N/A\n
icy-pub:1\n
icy-br:192\n
content-type:audio/mpeg\n
\n

<Client starts sending MP3 data>

Hope that clarifies it for someone else.

Edit: Actually, on a second look, Winamp Shoutcast DSP Plugin only sends \n instead of \r\n. I've updated the data accordingly.

thiagorod
Posts: 0
Joined: Mon Sep 21, 2009 5:33 pm

Re: The SHOUTcast Streaming Standard [Technical]

Post by thiagorod » Mon Sep 21, 2009 6:08 pm

I have been trying this command on HyperTerminal :

get / HTTP/1.1

Connected to a Shoutcast radio, IP address 88.191.102.29:7204

I get the reply


ICY 200 OK
icy-notice1:<BR>This stream requires <a href="http://www.winamp.com/">Winamp</a><BR>
icy-notice2:SHOUTcast Distributed Network Audio Server/win32 v1.9.8<BR>
icy-name:Techno - D I G I T A L L Y - I M P O R T E D - From Minimal to Detroit to Schranz & all in between!
icy-genre:Electronic Techno EDM
icy-url:http://www.di.fm
content-type:audio/mpeg
icy-pub:1
icy-br:96

And then endless data like this

i¬CC€›‚-¤ <£ˆÌ{=;'°y;ƒ!ãZ^÷Éàà0ï”w8ˆZ8p1nâÏ•ìDN"_“‘½!û»½èp0ï?âñ¯]"ÏПýߎçÉù8–-¸®ØQDº—‹Œóæ ƒµ4¡€ÂcÖÿÛõWfŸ®†|Õ2›nÇ@&)åœ A]Ãp¤Œ¨UƨQÀ  HfL°e0fY£¶.!µASC€n,›G2†ð–¿mËÏ;_Ú~™ï)ôò=pñ ÇE2Gõqy”ÒÈzXM&Ê‹<²‚Û,Kdp &X2_>q+›5$*8 …”lhµ»B²lAI ÆÐ (¢ –&rÖ”S±z1‚èdï ©_XK#4r3àÛ #....


I guess this is the MP3 stream... is that correct? Can I send this to a decoder?
Regards,

User avatar
Jay
Will work for food (Administrator)
Posts: 2783
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Re: The SHOUTcast Streaming Standard [Technical]

Post by Jay » Mon Sep 21, 2009 6:10 pm

thiagorod wrote:I have been trying this command on HyperTerminal :

get / HTTP/1.1

Connected to a Shoutcast radio, IP address 88.191.102.29:7204

I get the reply


ICY 200 OK
icy-notice1:<BR>This stream requires <a href="http://www.winamp.com/">Winamp</a><BR>
icy-notice2:SHOUTcast Distributed Network Audio Server/win32 v1.9.8<BR>
icy-name:Techno - D I G I T A L L Y - I M P O R T E D - From Minimal to Detroit to Schranz & all in between!
icy-genre:Electronic Techno EDM
icy-url:http://www.di.fm
content-type:audio/mpeg
icy-pub:1
icy-br:96

And then endless data like this

i¬CC€›‚-¤ <£ˆÌ{=;'°y;ƒ!ãZ^÷Éàà0ï”w8ˆZ8p1nâÏ•ìDN"_“‘½!û»½èp0ï?âñ¯]"ÏПýߎçÉù8–-¸®ØQDº—‹Œóæ ƒµ4¡€ÂcÖÿÛõWfŸ®†|Õ2›nÇ@&)åœ A]Ãp¤Œ¨UƨQÀ  HfL°e0fY£¶.!µASC€n,›G2†ð–¿mËÏ;_Ú~™ï)ôò=pñ ÇE2Gõqy”ÒÈzXM&Ê‹<²‚Û,Kdp &X2_>q+›5$*8 …”lhµ»B²lAI ÆÐ (¢ –&rÖ”S±z1‚èdï ©_XK#4r3àÛ #....


I guess this is the MP3 stream... is that correct? Can I send this to a decoder?
Regards,
Yes everything after the ICY Header is media, in this case mp3 data.
- Jay

thiagorod
Posts: 0
Joined: Mon Sep 21, 2009 5:33 pm

Re: The SHOUTcast Streaming Standard [Technical]

Post by thiagorod » Mon Sep 21, 2009 6:39 pm

Thanks... that´s great. But I couldn´t find the name of the music that is playing... in the header there is only the name of the radio. Where is the rest of the info?

Regards,

User avatar
Jay
Will work for food (Administrator)
Posts: 2783
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Re: The SHOUTcast Streaming Standard [Technical]

Post by Jay » Mon Sep 21, 2009 7:31 pm

You need to specify that you want it with the meta request header when your client makes a connection to the server. Check the article for details.
- Jay

thiagorod
Posts: 0
Joined: Mon Sep 21, 2009 5:33 pm

Re: The SHOUTcast Streaming Standard [Technical]

Post by thiagorod » Mon Sep 21, 2009 9:35 pm

Hello Jay,

I couldn´t find it... can you please post an example? I have tried several different strings with GET command...

Regards,

thiagorod
Posts: 0
Joined: Mon Sep 21, 2009 5:33 pm

Re: The SHOUTcast Streaming Standard [Technical]

Post by thiagorod » Tue Sep 22, 2009 1:06 pm

It seems right, but it won´t work... I grabbed this picture with an HTTP Sniffer when Winamp opens the connection. Tried to replicate on HyperTerminal, and nothing... maybe there is something missing on HyperTerminal...
Attachments
request.JPG
(12.68 KiB) Downloaded 72 times

User avatar
Jay
Will work for food (Administrator)
Posts: 2783
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Re: The SHOUTcast Streaming Standard [Technical]

Post by Jay » Fri Sep 25, 2009 2:54 pm

Does the server supply meta data? Have you tried testing with an actual SHOUTcast server other then DI?
- Jay

thiagorod
Posts: 0
Joined: Mon Sep 21, 2009 5:33 pm

Re: The SHOUTcast Streaming Standard [Technical]

Post by thiagorod » Fri Sep 25, 2009 3:52 pm

I guess it supports, because it is listed at Shoucast, and Winamp shows full info about the music.
I am gonna try with another server.

Thanks

rudelyn
Posts: 0
Joined: Wed Dec 09, 2009 5:14 am

Re: The SHOUTcast Streaming Standard [Technical]

Post by rudelyn » Wed Dec 09, 2009 5:16 am

Thanks for the info and the guide! This will be very helpful for a newbie like me.

broadcastcat
Posts: 4
Joined: Tue Aug 02, 2011 2:52 pm

Re: The SHOUTcast Streaming Standard [Technical]

Post by broadcastcat » Mon Sep 05, 2011 8:15 pm

Still helpful to the noobs even a couple years later . I just ran a [url=http://www.datanumen.com/aor/index2.htm]inbox repair tool[/url] on my computer to fix some stuff and I was lost when I had to come back to the audio side of things. Turned out the tool moved some things around, but we are ready to rock and roll now.

cheenu
Posts: 0
Joined: Wed Sep 09, 2015 11:09 pm

Re: The SHOUTcast Streaming Standard [Technical]

Post by cheenu » Thu Sep 10, 2015 7:58 am

Hi,

Is there a way to configure shoutcast "Stream Title" setting to put Album Name in the mp3 stream?
My hope is to see this Album Name in metadata when I use "Icy-MetaData:1" in client.

Thx.

User avatar
Jay
Will work for food (Administrator)
Posts: 2783
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Re: The SHOUTcast Streaming Standard [Technical]

Post by Jay » Wed Oct 14, 2015 5:06 pm

It's a single string field, a user can put anything they like in it. Usually it is 'Artist Name - Track Name'

More complex data structures could be put into the meta data field but no player would understand it. Frankly I believe ICY is dead, with the rich web taking over in HTML5 stations should be looking to web players and web capable codecs along with AJAX to create a simple easy way for users to listen to their stations.
- Jay

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests