Skip to content
Eric Richardson edited this page Jul 6, 2013 · 1 revision

StreamMachine includes several output options, triggered by the arguments used in the client connection.

Streaming Outputs

Streaming outputs are designed for clients that will be staying connected and receiving new audio as source data continues to come in.

Shoutcast

Traditional streaming radio listening uses the Shoutcast/Icecast "protocol" of injecting metadata at regular intervals inside the audio content. This output is triggered if the client provides the icy-metadata header in its request.

An offset query option can be used to specify where to start streaming inside the RewindBuffer. For instance, /stream?offset=300 would start streaming from what was live five minutes ago (300 seconds ago). If no offset is specified, the user will be started 30 seconds before live in order to create a buffer that can help the listener survive temporary connection issues.

Raw Audio

Raw Audio does exactly what it says on the tin... It sends out raw audio content without injected metadata.

The offset query option is supported in the exact same way as it is in the Shoutcast output.

Download Outputs

Pumper

The Pumper output sends a chunk of audio out as quickly as the client can download it. It is intended for situations where the client is grabbing audio and then disconnecting.

The output is triggered by use of the pump query option, which specifies a number of seconds of audio that should be downloaded. Additionally, the offset option can be used to specify how many seconds away from live the end of the pumped audio should be. For instance, querying /stream?pump=600 would pump ten minutes of audio, with the end of that ten minutes being whatever is currently live. Querying /stream?pump=600&offset=300 would give ten minutes of audio, ending five minutes ago.

Clone this wiki locally