Old 3rd January 2014, 12:02   #1
wenn32
Junior Member
 
Join Date: Jan 2014
Posts: 5
want to make a SC client

Hello, i am trying to make a shoutcast client for internal purpose(so no 3rd party SC clients are allowed!) I am trying to gather as much information as possible to achieve this task but i have a doubt.

SC sends ICY OK 200 message to client and after the ICY header the audio data follows. Now what is the format of the audio format is it mp3 encoded or mp3/TS?? so lets say i have a mp3 file. Now the server removes all the ID3 header and passes only the audio data or am i missing something??

Thanks
wenn32 is offline   Reply With Quote
Old 3rd January 2014, 12:12   #2
jaromanda
Forum King
 
Join Date: Jun 2007
Location: Under the bridge
Posts: 2,289
Quote:
Originally Posted by wenn32 View Post
no 3rd party SC clients are allowed!
so, technically, you have to use winamp

Is it just me or are shoutcast users getting dumber?
jaromanda is offline   Reply With Quote
Old 3rd January 2014, 13:43   #3
Jay
Moderator Alumni
 
Jay's Avatar
 
Join Date: May 2000
Location: Next Door
Posts: 8,942
Pretty basic write up a did years ago but it still applies.

http://forums.radiotoolbox.com/viewtopic.php?f=8&t=74
Jay is offline   Reply With Quote
Old 3rd January 2014, 14:41   #4
wenn32
Junior Member
 
Join Date: Jan 2014
Posts: 5
@jaromanda basically i want to connect to shoutcast server but using a custom client.

@Jay yeah already saw the article. helped me a lot

My question is since we don't sent ID3 tags to the client how does the streaming work??

if server removes the ID3 tags(header's) from an mp3 file and start sending to lets say a VLC player(just example) will it work?? or do we need to decode the mp3 and send the raw audio file??

BTW thanks for the quick reply's. Appreciate you guys helping me
wenn32 is offline   Reply With Quote
Old 3rd January 2014, 15:54   #5
jaromanda
Forum King
 
Join Date: Jun 2007
Location: Under the bridge
Posts: 2,289
Quote:
Originally Posted by wenn32 View Post
My question is since we don't sent ID3 tags to the client how does the streaming work??
ID3 tags are part of an MP3 file that is NOT audio
Quote:
Originally Posted by wenn32 View Post
if server removes the ID3 tags(header's) from an mp3 file and start sending to lets say a VLC player(just example) will it work??
Yes, because ID3 tags are the part of an MP3 file that is NOT audio
Quote:
Originally Posted by wenn32 View Post
or do we need to decode the mp3 and send the raw audio file??
If you are receiving an mp3 stream, you need to decode it before sending to your audio device

Is it just me or are shoutcast users getting dumber?
jaromanda is offline   Reply With Quote
Old 3rd January 2014, 16:28   #6
Jay
Moderator Alumni
 
Jay's Avatar
 
Join Date: May 2000
Location: Next Door
Posts: 8,942
So long as you do not pass Icy-MetaData in the request you will just get plain MP3 or aacPlus data, look at the Content-Type for a clue on which one. There will be nothing but frames of audio. Meta data is only triggered when you request with the Icy-MetaData: 1 header.
Jay is offline   Reply With Quote
Old 3rd January 2014, 17:23   #7
wenn32
Junior Member
 
Join Date: Jan 2014
Posts: 5
ok so basically the streamer "stripes" the header from mp3 file and passes it to client.

for example
Time 1: song starts streamer sends 0-1024 bytes to client 1
Time 2: song starts streamer sends 1025-2048 bytes to client 1 and client 2(who just requested)

so in the above example does streamer send any special data to client 2(who missed the first 1024 bytes)??
wenn32 is offline   Reply With Quote
Old 3rd January 2014, 17:25   #8
wenn32
Junior Member
 
Join Date: Jan 2014
Posts: 5
yeah i know we have to decode the data before sending it to audio device but i am trying to understand the server to client requested data.

Thanks for the answers
wenn32 is offline   Reply With Quote
Old 3rd January 2014, 18:12   #9
Jay
Moderator Alumni
 
Jay's Avatar
 
Join Date: May 2000
Location: Next Door
Posts: 8,942
It's a live signal so every listener's experience is going to be unique to the time they tuned in.

You could look at it like this

Source Connects and sends a constant stream of data to the server with no one ever hearing the data.
30 minutes later a listener tune in, everything that happened for the past 30 minutes is never heard by this listener.
15 minutes later another listeners tunes in and everything that happened for the past 45 minutes he never hears but he now hears roughly the same things as the first listener at roughly the same time.

The servers buffer is circular so it constantly is getting overwritten by new data.
Jay is offline   Reply With Quote
Old 3rd January 2014, 18:17   #10
wenn32
Junior Member
 
Join Date: Jan 2014
Posts: 5
to be honest i feel as if i am not expressing my doubt properly i will create an example with the mp3 file i have..

Thanks for bearing with me
wenn32 is offline   Reply With Quote
Old 4th January 2014, 13:10   #11
Jkey
Forum King
 
Join Date: Jul 2004
Location: E*arth
Posts: 3,031
I do not know how relevant this is because the legacy v1 protocol is
being discussed and I am not up to date on where DrO has taken this protocol !


When I worked on the first version of the dsp v2 I used these docs.
SHOUTcast_2-Protocol_Details

And for metadata.
Metadata


I am a fan of the v1 legacy protocol but (at the time I left it) v2 was the way forward.
Writing a MetaPuller or general internal client was easy in v2.

So Long, and Thanks for All the Fish.
Jkey is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Technical Support

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