Refactor configuration (work in progress)
* Move -m and -n command line options into the config file
* Restructure configuration file:
- Group into "server", "stream", "media", "metadata", "decoders", and
"encoders"
- Untangle decoder and encoder:
o Decoders match on file extensions and convert to a canonical "internal"
format
o Encoders create one of the supported stream formats, potentially using
different parameters (like bitrate)
- Consistently specify stream format
- Enable reencoding by selecting an encoder
* Architecturally separate configuration file storage from parsing
- Allows for different configuration back-ends in the future, like
YAML, SQL, REST API, ...
* Support roll-back in case of error on (re)load
* Anticipate HTTPS support
2015-05-02 06:48:53 -04:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
2015-05-21 12:50:22 -04:00
|
|
|
<!--
|
|
|
|
EXAMPLE: A valid configuration that contains every configuration option
|
|
|
|
-->
|
|
|
|
|
|
|
|
<!-- Ezstream configuration root element -->
|
Refactor configuration (work in progress)
* Move -m and -n command line options into the config file
* Restructure configuration file:
- Group into "server", "stream", "media", "metadata", "decoders", and
"encoders"
- Untangle decoder and encoder:
o Decoders match on file extensions and convert to a canonical "internal"
format
o Encoders create one of the supported stream formats, potentially using
different parameters (like bitrate)
- Consistently specify stream format
- Enable reencoding by selecting an encoder
* Architecturally separate configuration file storage from parsing
- Allows for different configuration back-ends in the future, like
YAML, SQL, REST API, ...
* Support roll-back in case of error on (re)load
* Anticipate HTTPS support
2015-05-02 06:48:53 -04:00
|
|
|
<ezstream>
|
|
|
|
|
2015-05-21 12:50:22 -04:00
|
|
|
<!--
|
|
|
|
Server configuration
|
|
|
|
-->
|
Refactor configuration (work in progress)
* Move -m and -n command line options into the config file
* Restructure configuration file:
- Group into "server", "stream", "media", "metadata", "decoders", and
"encoders"
- Untangle decoder and encoder:
o Decoders match on file extensions and convert to a canonical "internal"
format
o Encoders create one of the supported stream formats, potentially using
different parameters (like bitrate)
- Consistently specify stream format
- Enable reencoding by selecting an encoder
* Architecturally separate configuration file storage from parsing
- Allows for different configuration back-ends in the future, like
YAML, SQL, REST API, ...
* Support roll-back in case of error on (re)load
* Anticipate HTTPS support
2015-05-02 06:48:53 -04:00
|
|
|
<server>
|
2015-05-21 12:50:22 -04:00
|
|
|
<!-- Transport protocol: HTTP, HTTPS -->
|
|
|
|
<protocol>HTTP</protocol>
|
|
|
|
<!-- Server address -->
|
|
|
|
<hostname>127.0.0.1</hostname>
|
|
|
|
<!-- Server port -->
|
|
|
|
<port>8000</port>
|
|
|
|
|
|
|
|
<!-- Login user -->
|
|
|
|
<user>source</user>
|
|
|
|
<!-- Login password (check file permissions, or everyone can see this) -->
|
|
|
|
<password>hackme</password>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
Directory to use for server certificate verification in "hash format".
|
|
|
|
See openssl(1)/verify(1) for details:
|
|
|
|
-->
|
|
|
|
<ca_dir>/etc/ssl/certs</ca_dir>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
CA bundle for both server certificate verification and building the
|
|
|
|
client certificate chain.
|
|
|
|
-->
|
|
|
|
<ca_file>/etc/ssl/certs/ca-certificates.crt</ca_file>
|
|
|
|
|
|
|
|
<!-- Client certificate (with public key) for authentication -->
|
|
|
|
<client_cert>/etc/ssl/ezstream.crt</client_cert>
|
|
|
|
|
|
|
|
<!-- Client private key for authentication -->
|
|
|
|
<client_key>/etc/ssl/private/ezstream.key</client_key>
|
|
|
|
|
|
|
|
<!-- Number of reconnection attempts, before giving up: -->
|
|
|
|
<reconnect_attempts>0</reconnect_attempts>
|
Refactor configuration (work in progress)
* Move -m and -n command line options into the config file
* Restructure configuration file:
- Group into "server", "stream", "media", "metadata", "decoders", and
"encoders"
- Untangle decoder and encoder:
o Decoders match on file extensions and convert to a canonical "internal"
format
o Encoders create one of the supported stream formats, potentially using
different parameters (like bitrate)
- Consistently specify stream format
- Enable reencoding by selecting an encoder
* Architecturally separate configuration file storage from parsing
- Allows for different configuration back-ends in the future, like
YAML, SQL, REST API, ...
* Support roll-back in case of error on (re)load
* Anticipate HTTPS support
2015-05-02 06:48:53 -04:00
|
|
|
</server>
|
|
|
|
|
2015-05-21 12:50:22 -04:00
|
|
|
<!--
|
|
|
|
Stream configuration
|
|
|
|
-->
|
Refactor configuration (work in progress)
* Move -m and -n command line options into the config file
* Restructure configuration file:
- Group into "server", "stream", "media", "metadata", "decoders", and
"encoders"
- Untangle decoder and encoder:
o Decoders match on file extensions and convert to a canonical "internal"
format
o Encoders create one of the supported stream formats, potentially using
different parameters (like bitrate)
- Consistently specify stream format
- Enable reencoding by selecting an encoder
* Architecturally separate configuration file storage from parsing
- Allows for different configuration back-ends in the future, like
YAML, SQL, REST API, ...
* Support roll-back in case of error on (re)load
* Anticipate HTTPS support
2015-05-02 06:48:53 -04:00
|
|
|
<stream>
|
2015-05-21 12:50:22 -04:00
|
|
|
<!-- Mount point on server -->
|
|
|
|
<mountpoint>/stream.ogg</mountpoint>
|
|
|
|
|
|
|
|
<!-- Various informational settings -->
|
|
|
|
<name>Test Stream</name>
|
|
|
|
<url>http://localhost:8000/</url>
|
|
|
|
<genre>Beeps</genre>
|
|
|
|
<description>Test tones and noise</description>
|
|
|
|
<quality>1.5</quality>
|
|
|
|
<bitrate>16</bitrate>
|
|
|
|
<samplerate>44100</samplerate>
|
|
|
|
<channels>2</channels>
|
|
|
|
|
|
|
|
<!-- Setting to allow stream to be listed in public YP directory -->
|
|
|
|
<server_public>No</server_public>
|
|
|
|
|
|
|
|
<!-- Stream format: Vorbis, MP3, Theora -->
|
|
|
|
<format>Vorbis</format>
|
|
|
|
|
|
|
|
<!-- Encoder name (defined below) to use for (re)encoding -->
|
|
|
|
<encoder>OggEnc-Q1.5</encoder>
|
Refactor configuration (work in progress)
* Move -m and -n command line options into the config file
* Restructure configuration file:
- Group into "server", "stream", "media", "metadata", "decoders", and
"encoders"
- Untangle decoder and encoder:
o Decoders match on file extensions and convert to a canonical "internal"
format
o Encoders create one of the supported stream formats, potentially using
different parameters (like bitrate)
- Consistently specify stream format
- Enable reencoding by selecting an encoder
* Architecturally separate configuration file storage from parsing
- Allows for different configuration back-ends in the future, like
YAML, SQL, REST API, ...
* Support roll-back in case of error on (re)load
* Anticipate HTTPS support
2015-05-02 06:48:53 -04:00
|
|
|
</stream>
|
|
|
|
|
2015-05-21 12:50:22 -04:00
|
|
|
<!--
|
|
|
|
Media configuration
|
|
|
|
-->
|
Refactor configuration (work in progress)
* Move -m and -n command line options into the config file
* Restructure configuration file:
- Group into "server", "stream", "media", "metadata", "decoders", and
"encoders"
- Untangle decoder and encoder:
o Decoders match on file extensions and convert to a canonical "internal"
format
o Encoders create one of the supported stream formats, potentially using
different parameters (like bitrate)
- Consistently specify stream format
- Enable reencoding by selecting an encoder
* Architecturally separate configuration file storage from parsing
- Allows for different configuration back-ends in the future, like
YAML, SQL, REST API, ...
* Support roll-back in case of error on (re)load
* Anticipate HTTPS support
2015-05-02 06:48:53 -04:00
|
|
|
<media>
|
2015-05-21 12:50:22 -04:00
|
|
|
<!-- Media type: autodetect, file, playlist, program, stdin -->
|
|
|
|
<type>autodetect</type>
|
|
|
|
|
|
|
|
<!-- Input file or program name -->
|
|
|
|
<filename>playlist.m3u</filename>
|
|
|
|
|
|
|
|
<!-- Setting to shuffle playlists -->
|
|
|
|
<shuffle>Yes</shuffle>
|
|
|
|
|
|
|
|
<!-- Setting whether to stream input indefinitely or only once -->
|
|
|
|
<stream_once>No</stream_once>
|
Refactor configuration (work in progress)
* Move -m and -n command line options into the config file
* Restructure configuration file:
- Group into "server", "stream", "media", "metadata", "decoders", and
"encoders"
- Untangle decoder and encoder:
o Decoders match on file extensions and convert to a canonical "internal"
format
o Encoders create one of the supported stream formats, potentially using
different parameters (like bitrate)
- Consistently specify stream format
- Enable reencoding by selecting an encoder
* Architecturally separate configuration file storage from parsing
- Allows for different configuration back-ends in the future, like
YAML, SQL, REST API, ...
* Support roll-back in case of error on (re)load
* Anticipate HTTPS support
2015-05-02 06:48:53 -04:00
|
|
|
</media>
|
|
|
|
|
2015-05-21 12:50:22 -04:00
|
|
|
<!--
|
|
|
|
Metadata configuration
|
|
|
|
-->
|
Refactor configuration (work in progress)
* Move -m and -n command line options into the config file
* Restructure configuration file:
- Group into "server", "stream", "media", "metadata", "decoders", and
"encoders"
- Untangle decoder and encoder:
o Decoders match on file extensions and convert to a canonical "internal"
format
o Encoders create one of the supported stream formats, potentially using
different parameters (like bitrate)
- Consistently specify stream format
- Enable reencoding by selecting an encoder
* Architecturally separate configuration file storage from parsing
- Allows for different configuration back-ends in the future, like
YAML, SQL, REST API, ...
* Support roll-back in case of error on (re)load
* Anticipate HTTPS support
2015-05-02 06:48:53 -04:00
|
|
|
<metadata>
|
2015-05-21 12:50:22 -04:00
|
|
|
<!-- Program to query for metadata instead of from media files -->
|
|
|
|
<!-- <program>metadata.sh</program> -->
|
|
|
|
|
|
|
|
<!-- Metadata format -->
|
|
|
|
<format_str>@a@ - @t@</format_str>
|
|
|
|
|
|
|
|
<!-- Interval for additional metadata refreshes (-1 for none) -->
|
|
|
|
<refresh_interval>-1</refresh_interval>
|
|
|
|
|
|
|
|
<!-- Setting to clean up extraneous whitespace -->
|
|
|
|
<normalize_strings>Yes</normalize_strings>
|
|
|
|
|
|
|
|
<!-- Setting to suppress all metadata udpates -->
|
|
|
|
<no_updates>No</no_updates>
|
Refactor configuration (work in progress)
* Move -m and -n command line options into the config file
* Restructure configuration file:
- Group into "server", "stream", "media", "metadata", "decoders", and
"encoders"
- Untangle decoder and encoder:
o Decoders match on file extensions and convert to a canonical "internal"
format
o Encoders create one of the supported stream formats, potentially using
different parameters (like bitrate)
- Consistently specify stream format
- Enable reencoding by selecting an encoder
* Architecturally separate configuration file storage from parsing
- Allows for different configuration back-ends in the future, like
YAML, SQL, REST API, ...
* Support roll-back in case of error on (re)load
* Anticipate HTTPS support
2015-05-02 06:48:53 -04:00
|
|
|
</metadata>
|
|
|
|
|
2015-05-21 12:50:22 -04:00
|
|
|
<!--
|
|
|
|
Decoder configurations
|
|
|
|
-->
|
Refactor configuration (work in progress)
* Move -m and -n command line options into the config file
* Restructure configuration file:
- Group into "server", "stream", "media", "metadata", "decoders", and
"encoders"
- Untangle decoder and encoder:
o Decoders match on file extensions and convert to a canonical "internal"
format
o Encoders create one of the supported stream formats, potentially using
different parameters (like bitrate)
- Consistently specify stream format
- Enable reencoding by selecting an encoder
* Architecturally separate configuration file storage from parsing
- Allows for different configuration back-ends in the future, like
YAML, SQL, REST API, ...
* Support roll-back in case of error on (re)load
* Anticipate HTTPS support
2015-05-02 06:48:53 -04:00
|
|
|
<decoders>
|
|
|
|
<decoder>
|
2015-05-21 12:50:22 -04:00
|
|
|
<!-- Decoder name -->
|
|
|
|
<name>OggDec</name>
|
|
|
|
<!-- Program and options -->
|
|
|
|
<program>oggdec -R -b 16 -e 0 -s 1 -o - @T@</program>
|
|
|
|
<!-- File extensions to use this decoder for -->
|
|
|
|
<file_ext>.ogg</file_ext>
|
|
|
|
<file_ext>.oga</file_ext>
|
|
|
|
</decoder>
|
|
|
|
|
|
|
|
<decoder>
|
|
|
|
<name>MadPlay</name>
|
|
|
|
<program>madplay -b 16 -R 44100 -S -o raw:- @T@</program>
|
|
|
|
<file_ext>.mp3</file_ext>
|
|
|
|
</decoder>
|
|
|
|
|
|
|
|
<decoder>
|
|
|
|
<name>Flac</name>
|
|
|
|
<program>flac -s -d --force-raw-format --sign=signed --endian=little -o - @T@</program>
|
|
|
|
<file_ext>.flac</file_ext>
|
Refactor configuration (work in progress)
* Move -m and -n command line options into the config file
* Restructure configuration file:
- Group into "server", "stream", "media", "metadata", "decoders", and
"encoders"
- Untangle decoder and encoder:
o Decoders match on file extensions and convert to a canonical "internal"
format
o Encoders create one of the supported stream formats, potentially using
different parameters (like bitrate)
- Consistently specify stream format
- Enable reencoding by selecting an encoder
* Architecturally separate configuration file storage from parsing
- Allows for different configuration back-ends in the future, like
YAML, SQL, REST API, ...
* Support roll-back in case of error on (re)load
* Anticipate HTTPS support
2015-05-02 06:48:53 -04:00
|
|
|
</decoder>
|
|
|
|
</decoders>
|
|
|
|
|
2015-05-21 12:50:22 -04:00
|
|
|
<!--
|
|
|
|
Encoder configurations
|
|
|
|
-->
|
Refactor configuration (work in progress)
* Move -m and -n command line options into the config file
* Restructure configuration file:
- Group into "server", "stream", "media", "metadata", "decoders", and
"encoders"
- Untangle decoder and encoder:
o Decoders match on file extensions and convert to a canonical "internal"
format
o Encoders create one of the supported stream formats, potentially using
different parameters (like bitrate)
- Consistently specify stream format
- Enable reencoding by selecting an encoder
* Architecturally separate configuration file storage from parsing
- Allows for different configuration back-ends in the future, like
YAML, SQL, REST API, ...
* Support roll-back in case of error on (re)load
* Anticipate HTTPS support
2015-05-02 06:48:53 -04:00
|
|
|
<encoders>
|
|
|
|
<encoder>
|
2015-05-21 12:50:22 -04:00
|
|
|
<!-- Encoder name -->
|
|
|
|
<name>OggEnc-Q1.5</name>
|
|
|
|
<!-- Output stream format -->
|
|
|
|
<format>Vorbis</format>
|
|
|
|
<!-- Program and options -->
|
|
|
|
<program>oggenc -r -B 16 -C 2 -R 44100 --raw-endianness 0 -q 1.5 -t @M@ -</program>
|
|
|
|
</encoder>
|
|
|
|
|
|
|
|
<encoder>
|
|
|
|
<name>Lame-CBR128</name>
|
|
|
|
<format>MP3</format>
|
|
|
|
<program>lame --preset cbr 128 -r -s 44.1 --bitwidth 16 - -</program>
|
Refactor configuration (work in progress)
* Move -m and -n command line options into the config file
* Restructure configuration file:
- Group into "server", "stream", "media", "metadata", "decoders", and
"encoders"
- Untangle decoder and encoder:
o Decoders match on file extensions and convert to a canonical "internal"
format
o Encoders create one of the supported stream formats, potentially using
different parameters (like bitrate)
- Consistently specify stream format
- Enable reencoding by selecting an encoder
* Architecturally separate configuration file storage from parsing
- Allows for different configuration back-ends in the future, like
YAML, SQL, REST API, ...
* Support roll-back in case of error on (re)load
* Anticipate HTTPS support
2015-05-02 06:48:53 -04:00
|
|
|
</encoder>
|
|
|
|
</encoders>
|
|
|
|
|
|
|
|
</ezstream>
|