SHOUTcast YP 1.0 Protocol Details

From Winamp Developer Wiki

Jump to: navigation, search

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

  1. Unable to check stream connection - Cannot see your station/computer (URL: "+streamUrl+") from the Internet, disable Internet Sharing/NAT/firewall/ISP cache.
  2. If we find ‘Location:’ string in the stream content - Terms of Service violator. You are being reported.
  3. If we find ‘SlamCast’ string in the stream content - Incompatible protocol.
  4. If we find ‘HTTP/1.0 401 Unauthorized’ string in the stream content - Streams requiring authorization are not public and cannot list here.
  5. 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.
  6. If we found ‘icecast’ string in the stream content - Icecast too easy to hack YP, use SHOUTcast instead.
  7. IP ban - This network has been permanently banned due to a previous violation of the SHOUTcast directory terms of service.
  8. If website contains ‘hTtP’ - We no longer list stations utilizing the auto-popup url option
  9. Improper version - Upgrade to SHOUTcast 1.8 or newer.
  10. No station name validation - Please give your station a name (in the dsp plugin YP tab).
  11. No Genre - Please identify this station's genre (in the dsp plugin YP tab).
  12. Capacity 0 - You must have at least 1 maxuser.
  13. Improper bitrate - Invalid bitrate.
  14. Port cannot be zero.
  15. If station name contains either ‘mp3pro’ or ‘mp3 pro’ - Mp3pro format must be nsv-encapsulated to list here.
  16. Content type - We do not currently list servers not streaming AAC+, MP3, or NSV.
  17. Video streams must be at least 64kbps to list here.
  18. If bitrate > 1024 - Bitrate too large.
  19. If bitrate < 8 - Bitrate too small.
  20. touch host, id, port, listeners, alt validation error – 3
  21. listeners > 5000, host not set in the request – 99
  22. if touch filed to update DB – 100 if update count is 0, else 100 + count of updated records.
  23. 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.
Personal tools
Winamp
AOL Developer Network

Download Winamp, The #1 Free Media Player. Play your MP3, AAC, MPEG, AVI files, and more. Get free MP3 songs, videos, skins and plug-ins. Sync your iPod or Creative Zen, and get mobile music with Winamp Remote.

Copyright © 1999 - 2013 Nullsoft. All Rights Reserved.