SHOUTcast YP 1.0 Protocol Details
From Winamp Developer Wiki
Contents |
SHOUTcast YP 1.0 Protocol
This is now a legacy feature and has been replaced by the YP 2.0 infrastructure.
Overview
The YP protocol provides a way for shoutcast servers and relays to register themselves so they are searchable on the shoutcast.com web page and directory. The API is a collection of HTTP GET requests, which provide the necessary functionality.
Functions
addsrv
Adds a new server to the database. Servers should make this call when they start up.
Parameters
- v version. Should be set to one.
- br bitrate. Bitrate in kbs
- p IP port for client connections
- m maximum client connections
- r This parameter is only provided if this server is relaying another server. If so, the value is <addr>:<port> of the relayed server.
- t Name or title of stream
- g Station genre
- url URL of broadcaster
- content Mime-type for content (audio/mpeg or audio/aacp)
- irc IRC address of broadcaster
- icq ICQ address of broadcaster
- aim AIM id of broadcaster
- sid Stream id if relevant
An HTTP response of 200 indicates the possibility of success. Further information is available in the response headers.
- icy-response Will have the value 'ack' if successful, otherwise it will contain an error message.
- icy-id ID assigned to the server. Value should be checked for zero, which is invalid.
- icy-error Extended error information.
- icy-tchfrq Touch frequency in minutes. The server should call the YP function tchsrv at this interval.
remsrv
Removes a server from the database. Servers should make this call when they shut down.
Parameters
- id ID provided in response to addsrv function
- p IP port for client connections
An HTTP response of 200 indicates the possibility of success. Further information is available in the response headers.
- icy-response Will have the value 'ack' if successful, otherwise it will contain an error message
- icy-error Extended error information
tchsrv
Periodic "touch" function that updates various information about the server. This function should be called at an interval as indicated by the icy-tchfrq response field to addsrv
Parameters
- id Server ID as provided by the addsrv function
- p IP port for client connections
- li Number of listeners currently connected.
- alt Average user listen time in seconds
- ct Current song title
- cm Number of clients connected more than 5 minutes since last tchsrv
- ht Number of client connects since last tchsrv
An HTTP response of 200 indicates the possibility of success. Further information is available in the response headers.
- icy-response Will have the value 'ack' if succesful, otherwise it will contain an error message.
- icy-error Extended error information.
- icy-tchfrq New touch frequency
- icy-backup If the server becomes full, clients should be redirected here.
YP1 Error List
- Unable to check stream connection - Cannot see your station/computer (URL: "+streamUrl+") from the Internet, disable Internet Sharing/NAT/firewall/ISP cache.
- If we find ‘Location:’ string in the stream content - Terms of Service violator. You are being reported.
- If we find ‘SlamCast’ string in the stream content - Incompatible protocol.
- If we find ‘HTTP/1.0 401 Unauthorized’ string in the stream content - Streams requiring authorization are not public and cannot list here.
- If we found ‘ICY 400 Server Full’ or ‘HTTP/1.0 400 Server Full’ string in the stream content - Cannot verify server since all listener slots are full. Please wait.
- If we found ‘icecast’ string in the stream content - Icecast too easy to hack YP, use SHOUTcast instead.
- IP ban - This network has been permanently banned due to a previous violation of the SHOUTcast directory terms of service.
- If website contains ‘hTtP’ - We no longer list stations utilizing the auto-popup url option
- Improper version - Upgrade to SHOUTcast 1.8 or newer.
- No station name validation - Please give your station a name (in the dsp plugin YP tab).
- No Genre - Please identify this station's genre (in the dsp plugin YP tab).
- Capacity 0 - You must have at least 1 maxuser.
- Improper bitrate - Invalid bitrate.
- Port cannot be zero.
- If station name contains either ‘mp3pro’ or ‘mp3 pro’ - Mp3pro format must be nsv-encapsulated to list here.
- Content type - We do not currently list servers not streaming AAC+, MP3, or NSV.
- Video streams must be at least 64kbps to list here.
- If bitrate > 1024 - Bitrate too large.
- If bitrate < 8 - Bitrate too small.
- touch host, id, port, listeners, alt validation error – 3
- listeners > 5000, host not set in the request – 99
- if touch filed to update DB – 100 if update count is 0, else 100 + count of updated records.
- If primary is not public or relay could not register for some reason - Relay url could not register. Try by making primary source public or wait till primary registers.


