Skip to content

Plugins: Input

John Regan edited this page Dec 30, 2022 · 4 revisions

This is a listing of the available input plugins.

stdin

The stdin plugin reads a data stream from standard input.

There can only be a single source defined using the standard input plugin - defining multiple sources will make the program exit with a failure message.

Options

No options.

Example

[source.demo]
input = stdin
decoder = miniflac

file

The file plugin reads a data stream from a named file.

Options

file (default: none)

The file path to read from. This is required.

Example

[source.demo]
input = file
file = /path/to/file.flac
decoder = miniflac

curl

The curl plugin reads a data stream from a URL using libCURL

Options

url (default: none)

The URL to read from. This is required.

connnect timeout (default: 2000ms)

The maximum amount of time to spend connecting to a URL in milliseconds.

read timeout (default: 1000ms)

The maximum amount of time to spend reading data from a URL.

verbose (default: false)

Enable libCURL's verbose logging to stderr.

ignore icecast (default: false)

By default, when connecting to an HTTP source the plugin will send the Icy-MetaData:1 header, to receive Icecast/ShoutCast metadata. Setting ignore icecase to true will disable sending the header, and ignore any Icecast-related headers the server may send.

There may be instances where a server changes behavior based on the presence of this header, or maybe a server sends both Icecast metadata and FLAC/Vorbis comments (and you only want to handle FLAC/Vorbis).

header (default: none)

This can be specified multiple times to set custom headers.

Example

[source.demo]
input = curl
url = http://127.0.0.1:8000/mount.ogg
header = User-Agent: my-app 0.1
header = X-My-Custom-Header: Hey there
decoder = miniflac