### Example POST Data for mount_add Event Source: https://icecast.org/docs/icecast-2.4.1/auth.html This is an example of the POST data sent to the URL specified in the `mount_add` option when a stream starts. It includes the action, mountpoint, server name, and port. ```url action=mount_add&mount=/live&server=icecast.example.org&port=8000 ``` -------------------------------- ### Example POST Data for listener_add Event Source: https://icecast.org/docs/icecast-2.4.1/auth.html This example shows the POST data sent to the `listener_add` URL when a listener connects. It includes details about the connection such as server, port, client ID, mountpoint, user/pass (if any), IP address, and user agent. ```url action=listener_add&server=icecast.example.org&port=8000&client=1&mount=/live&user=&pass=&ip=127.0.0.1&agent=My%20player ``` -------------------------------- ### Example POST Data for mount_remove Event Source: https://icecast.org/docs/icecast-2.4.1/auth.html This is an example of the POST data sent to the URL specified in the `mount_remove` option when a stream finishes. It includes the action, mountpoint, server name, and port. ```url action=mount_remove&mount=/live&server=icecast.example.org&port=8000 ``` -------------------------------- ### Example POST Data for listener_remove Event Source: https://icecast.org/docs/icecast-2.4.1/auth.html This example demonstrates the POST data sent to the `listener_remove` URL when a listener disconnects. It includes connection details and the duration the listener was connected. ```url action=listener_remove&server=icecast.example.org&port=8000&client=1&mount=/live&user=&pass=&duration=3600&ip=127.0.0.1&agent=My%20player ``` -------------------------------- ### POST /mount_add Source: https://icecast.org/docs/icecast-2.4.1/auth.html Informs the authentication server that a stream is starting. ```APIDOC ## POST /mount_add ### Description Informs the auth server of a stream starting. Used to initialize details on the auth server. ### Request Body - **action** (string) - Required - Value: mount_add - **mount** (string) - Required - The mountpoint starting up - **server** (string) - Required - The server name - **port** (integer) - Required - The server port ### Request Example action=mount_add&mount=/live&server=icecast.example.org&port=8000 ``` -------------------------------- ### Verify Server Startup Log Source: https://icecast.org/docs/icecast-2.4.1/basic-setup.html Example of the log output confirming the server has successfully initialized. ```text [2003-10-31 13:04:49] INFO main/main.c Icecast 2.3.0 server started ``` -------------------------------- ### Start Icecast Server Source: https://icecast.org/docs/icecast-2.4.1/basic-setup.html Command to launch the Icecast server using a specific configuration file path. ```bash icecast -c /path/to/icecast.xml ``` -------------------------------- ### Configure Icecast Mount Settings Source: https://icecast.org/docs/icecast-2.4.1/config-file.html Example XML configuration block for a specific mountpoint, including authentication, listener limits, and custom HTTP headers. ```xml /example-complex.ogg othersource hackmemore 1 3600 /tmp/dump-example1.ogg /intro.ogg /example2.ogg 1 1 ISO8859-1 1 My audio stream My audio description http://some.place.com classical 64 application/ogg vorbis 1 65536 4096
/home/icecast/bin/source-start /home/icecast/bin/source-end ``` -------------------------------- ### GET /admin/listmounts Source: https://icecast.org/docs/icecast-2.4.1/admin-interface.html Lists all currently connected mountpoints. ```APIDOC ## GET /admin/listmounts ### Description Views all currently connected mountpoints. ### Method GET ### Endpoint /admin/listmounts ``` -------------------------------- ### GET /admin/moveclients Source: https://icecast.org/docs/icecast-2.4.1/admin-interface.html Migrates listeners from one mountpoint to another. ```APIDOC ## GET /admin/moveclients ### Description Migrates currently connected listeners from one mountpoint to another. ### Method GET ### Endpoint /admin/moveclients ### Parameters #### Query Parameters - **mount** (string) - Required - The source mountpoint - **destination** (string) - Required - The destination mountpoint ``` -------------------------------- ### Configure Icecast Security Settings Source: https://icecast.org/docs/icecast-2.4.1/config-file.html Sets up security configurations such as chroot and user/group changes for the Icecast process. Icecast must be started as root for user/group changes to function. ```xml 0 nobody nogroup ``` -------------------------------- ### GET /admin/listclients Source: https://icecast.org/docs/icecast-2.4.1/admin-interface.html Lists all clients currently connected to a specific mountpoint. ```APIDOC ## GET /admin/listclients ### Description Lists all clients currently connected to a specific mountpoint in XML format. ### Method GET ### Endpoint /admin/listclients ### Parameters #### Query Parameters - **mount** (string) - Required - The mountpoint to query ``` -------------------------------- ### Validate Icecast XML Configuration Source: https://icecast.org/docs/icecast-2.4.1/config-file.html Use xmllint to check for XML syntax errors in your icecast.xml configuration file. This is a crucial step before starting Icecast to ensure the configuration is well-formed. ```bash xmllint icecast.xml ``` -------------------------------- ### GET /admin/killsource Source: https://icecast.org/docs/icecast-2.4.1/admin-interface.html Disconnects a specific mountpoint from the server. ```APIDOC ## GET /admin/killsource ### Description Disconnects a specific mountpoint from the server. ### Method GET ### Endpoint /admin/killsource ### Parameters #### Query Parameters - **mount** (string) - Required - The mountpoint to disconnect ``` -------------------------------- ### GET /admin/killclient Source: https://icecast.org/docs/icecast-2.4.1/admin-interface.html Disconnects a specific listener from a mountpoint. ```APIDOC ## GET /admin/killclient ### Description Disconnects a specific listener identified by ID from a mountpoint. ### Method GET ### Endpoint /admin/killclient ### Parameters #### Query Parameters - **mount** (string) - Required - The mountpoint - **id** (integer) - Required - The unique listener ID ``` -------------------------------- ### GET /admin/stats Source: https://icecast.org/docs/icecast-2.4.1/admin-interface.html Queries internal statistics of the Icecast server. ```APIDOC ## GET /admin/stats ### Description Retrieves internal server statistics including mountpoints and listener counts. ### Method GET ### Endpoint /admin/stats ``` -------------------------------- ### GET /admin/fallbacks Source: https://icecast.org/docs/icecast-2.4.1/admin-interface.html Updates the fallback mountpoint for a specific mountpoint. ```APIDOC ## GET /admin/fallbacks ### Description Updates the fallback mountpoint used when a source client disconnects. ### Method GET ### Endpoint /admin/fallbacks ### Parameters #### Query Parameters - **mount** (string) - Required - The mountpoint to configure - **fallback** (string) - Required - The fallback mountpoint path ``` -------------------------------- ### GET /admin/metadata Source: https://icecast.org/docs/icecast-2.4.1/admin-interface.html Updates the metadata information for a specific mountpoint. ```APIDOC ## GET /admin/metadata ### Description Updates the metadata information for a particular mountpoint. ### Method GET ### Endpoint /admin/metadata ### Parameters #### Query Parameters - **mount** (string) - Required - The mountpoint to update - **mode** (string) - Required - Set to 'updinfo' - **song** (string) - Required - The song metadata string ``` -------------------------------- ### Configure Master Server Relay Source: https://icecast.org/docs/icecast-2.4.1/config-file.html Sets up a slave server to pull mountpoints from a master Icecast server. The master server requires no specific configuration changes. ```xml 127.0.0.1 8001 120 relay hackme 0 ``` -------------------------------- ### Configure Server Metadata and Identity Source: https://icecast.org/docs/icecast-2.4.1/config-file.html Sets global server information including hostname, location, admin contact, and file serving capabilities. ```xml localhost earth icemaster@localhost 1 icecast 2.4.1 ``` -------------------------------- ### Configure Icecast Server Limits Source: https://icecast.org/docs/icecast-2.4.1/config-file.html Define server-wide limits for concurrent clients, sources, queue size, and various timeouts within the section. These settings generally do not require modification unless specific tuning is needed. ```xml 100 2 102400 30 15 10 1 65536 ``` -------------------------------- ### Configure Shoutcast compatibility with shoutcast-mount Source: https://icecast.org/docs/icecast-2.4.1/config-file.html Use the shoutcast-mount tag within a listen-socket to implicitly define a secondary port for Shoutcast source clients. ```xml 8000 /live.mp3 ``` -------------------------------- ### Configure Master-Slave Relay Source: https://icecast.org/docs/icecast-2.4.1/relaying.html Add these settings to the slave server configuration to mirror all mountpoints from a master Icecast 2 server. ```xml 192.168.1.11 8001 120 hackme ``` -------------------------------- ### List Clients for a Mountpoint Source: https://icecast.org/docs/icecast-2.4.1/admin-interface.html Retrieves a list of all clients connected to a specific mountpoint. Results are returned in XML format. ```http http://192.168.1.10:8000/admin/listclients?mount=/mystream.ogg ``` -------------------------------- ### Configure Icecast Logging Settings Source: https://icecast.org/docs/icecast-2.4.1/config-file.html Defines the log files for access, errors, and playlists, along with the log level. Set filenames to '-' to direct output to STDERR. Log rotation is not implemented. ```xml access.log error.log playlist.log 4 ``` -------------------------------- ### Configure Authentication Credentials Source: https://icecast.org/docs/icecast-2.4.1/config-file.html Defines passwords and usernames for sources, relays, and administrative access within the block. ```xml hackme relay hackme admin hackme ``` -------------------------------- ### Configure Listening Socket Source: https://icecast.org/docs/icecast-2.4.1/config-file.html Defines the port for the server to listen on. Can be extended with bind-address or SSL settings. ```xml 8000 ``` -------------------------------- ### Configure Icecast YP Directory Settings Source: https://icecast.org/docs/icecast-2.4.1/yp.html These XML elements within the Icecast configuration file control YP directory settings. Ensure Icecast is built with YP support, which requires libcurl. ```xml 15 http://dir.xiph.org/cgi-bin/yp-cgi ``` -------------------------------- ### Move Clients Between Mountpoints Source: https://icecast.org/docs/icecast-2.4.1/admin-interface.html Migrates connected listeners from one mountpoint to another. The destination mountpoint must exist and be active. ```http http://192.168.1.10:8000/admin/moveclients?mount=/mystream.ogg&destination=/mynewstream.ogg ``` -------------------------------- ### Configure legacy Shoutcast compatibility Source: https://icecast.org/docs/icecast-2.4.1/config-file.html The deprecated approach requires manually defining two separate listen-socket blocks, one of which must have the shoutcast-compat flag set. ```xml /live.nsv 8000 8001 1 ``` -------------------------------- ### Configure htpasswd authentication for a mountpoint Source: https://icecast.org/docs/icecast-2.4.1/auth.html Define the authentication type and options within the section of the Icecast configuration file. The filename option specifies the storage file, and allow_duplicate_users controls concurrent session limits. ```xml /example.ogg ``` -------------------------------- ### Icecast Mount Configuration for URL Authentication Source: https://icecast.org/docs/icecast-2.4.1/auth.html This configuration block must be added to the main Icecast config file for a specific mount point to enable URL-based authentication. It specifies the URLs for different authentication events and credentials. ```xml /example.ogg ``` -------------------------------- ### List Connected Mountpoints Source: https://icecast.org/docs/icecast-2.4.1/admin-interface.html Retrieves a list of all currently connected mountpoints on the Icecast server. ```http http://192.168.1.10:8000/admin/listmounts ``` -------------------------------- ### Configure Specific Mountpoint Relay in Icecast Source: https://icecast.org/docs/icecast-2.4.1/config-file.html Use this XML configuration within your Icecast server's config file to specify which mountpoints to relay from a remote server. The 'on-demand' option can limit bandwidth usage by only fetching streams when listeners are present. ```xml 127.0.0.1 8001 /example.ogg /different.ogg joe soap 0 1 ``` -------------------------------- ### Configure Global HTTP Headers Source: https://icecast.org/docs/icecast-2.4.1/config-file.html Defines custom HTTP headers to be sent by the Icecast server. Avoid placing comments within the http-headers block to ensure proper parsing. ```xml
``` -------------------------------- ### POST /listener_add Source: https://icecast.org/docs/icecast-2.4.1/auth.html Authenticates a listener when they connect to a stream. ```APIDOC ## POST /listener_add ### Description Processed when a listener connects. The default action is to reject unless the auth server returns an allowed response header. ### Request Body - **action** (string) - Required - Value: listener_add - **mount** (string) - Required - The mountpoint including query parameters - **server** (string) - Required - The server name - **port** (integer) - Required - The server port - **user** (string) - Optional - HTTP basic auth user - **pass** (string) - Optional - HTTP basic auth password - **client** (string) - Required - Unique ID for the client - **ip** (string) - Required - Listener IP address - **agent** (string) - Required - Useragent from the listener's player ### Request Example action=listener_add&server=icecast.example.org&port=8000&client=1&mount=/live&user=&pass=&ip=127.0.0.1&agent=My%20player ``` -------------------------------- ### POST /mount_remove Source: https://icecast.org/docs/icecast-2.4.1/auth.html Informs the authentication server that a stream has finished. ```APIDOC ## POST /mount_remove ### Description Informs the auth server of a stream finishing. ### Request Body - **action** (string) - Required - Value: mount_remove - **mount** (string) - Required - The mountpoint being removed - **server** (string) - Required - The server name - **port** (integer) - Required - The server port ### Request Example action=mount_remove&mount=/live&server=icecast.example.org&port=8000 ``` -------------------------------- ### Configure Single-Broadcast Relay Source: https://icecast.org/docs/icecast-2.4.1/relaying.html Use this configuration block to relay a specific mountpoint from a remote server. Set relay-shoutcast-metadata to 1 if relaying Shoutcast streams with embedded metadata. ```xml 192.168.1.11 8001 /example.ogg /different.ogg 0 ``` -------------------------------- ### POST stream_auth Source: https://icecast.org/docs/icecast-2.4.1/auth.html This endpoint is triggered when a source client attempts to connect to a mountpoint. The authentication server must validate the credentials and return the appropriate headers to allow the connection. ```APIDOC ## POST stream_auth ### Description Processes source client authentication requests when a source attempts to connect to a mountpoint. ### Method POST ### Parameters #### Request Body - **action** (string) - Required - Must be 'stream_auth' - **mount** (string) - Required - The mountpoint being accessed - **server** (string) - Required - Hostname of the Icecast server - **port** (integer) - Required - Port of the Icecast server - **user** (string) - Required - Username provided by the source client - **pass** (string) - Required - Password provided by the source client - **admin** (integer) - Optional - Set to 1 if the request is an admin action (e.g., metadata update) ### Request Example action=stream_auth&mount=/stream.ogg&ip=192.0.2.0&server=icecast.example.org&port=8000&user=source&pass=password&admin=1 ``` -------------------------------- ### Retrieve Server Statistics Source: https://icecast.org/docs/icecast-2.4.1/admin-interface.html Queries the Icecast server for internal statistics, including mountpoints, client requests, and listener counts. Avoid using the .xml syntax as it may be deprecated. ```http http://192.168.1.10:8000/admin/stats ``` -------------------------------- ### Update Fallback Mountpoint Source: https://icecast.org/docs/icecast-2.4.1/admin-interface.html Assigns a fallback mountpoint for a given mountpoint. This is used when the primary source disconnects. ```http http://192.168.1.10:8000/admin/fallbacks?mount=/mystream.ogg&fallback=/myfallback.ogg ``` -------------------------------- ### POST /listener_remove Source: https://icecast.org/docs/icecast-2.4.1/auth.html Notifies the authentication server when a listener disconnects. ```APIDOC ## POST /listener_remove ### Description Notifies the auth server when a listener connection closes. ### Request Body - **action** (string) - Required - Value: listener_remove - **mount** (string) - Required - The mountpoint - **server** (string) - Required - The server name - **port** (integer) - Required - The server port - **user** (string) - Optional - HTTP basic auth user - **pass** (string) - Optional - HTTP basic auth password - **client** (string) - Required - Unique ID for the client - **ip** (string) - Required - Listener IP address - **agent** (string) - Required - Useragent from the listener's player - **duration** (integer) - Required - Seconds the listener was connected ### Request Example action=listener_remove&server=icecast.example.org&port=8000&client=1&mount=/live&user=&pass=&duration=3600&ip=127.0.0.1&agent=My%20player ``` -------------------------------- ### Update Mountpoint Metadata Source: https://icecast.org/docs/icecast-2.4.1/admin-interface.html Use this function to update the metadata for a specific mountpoint. Requires HTTP authentication. ```http http://192.168.1.10:8000/admin/metadata?mount=/mystream&mode=updinfo&song=ACDC+Back+In+Black ``` -------------------------------- ### Disconnect a Mountpoint Source Source: https://icecast.org/docs/icecast-2.4.1/admin-interface.html Disconnects a specific mountpoint from the Icecast server. ```http http://192.168.1.10:8000/admin/killsource?mount=/mystream.ogg ``` -------------------------------- ### Disconnect a Specific Listener Source: https://icecast.org/docs/icecast-2.4.1/admin-interface.html Disconnects a specific listener from a mountpoint using their unique ID. The ID can be obtained from the 'List Clients' function. ```http http://192.168.1.10:8000/admin/killclient?mount=/mystream.ogg&id=21 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.