NAME
SYNOPSIS
DESCRIPTION
XML CONFIGURATION
FILES
AUTHORS

EZSTREAM ( 1 ) OpenBSD Reference Manual EZSTREAM ( 1 )

NAME

ezstream - source client for Icecast with external en-/decoder support

SYNOPSIS

ezstream [ -hqVv ] [ -c configfile ]

DESCRIPTION

The ezstream utility is a source client for the Icecast media streaming server. In its basic mode of op-
eration, it streams media files and data from standard input "as-is" -- such as Ogg Vorbis, Ogg Theora and
MP3 -- to a server. It can also use various external decoders and encoders to reencode from one format
to another, and stream the result. The only requirement is that the external programs support writing to or
reading from standard input, and can be used from the command line.

Command line parameters

-c configfile
Use the XML configuration in configfile. ( Mandatory. )

-h Print a summary of available command line parameters with short descriptions and exit.

-q Be more quiet. Suppress the output that external programs send to standard error.

-V Print the ezstream version number and exit.

-v Produce more verbose output from ezstream. Use twice for even more verbose output.

When the -q and -v parameters are provided simultaneously, an additional line of information about the
currently streamed file -- playlist position, approximate playing time and bitrate -- is displayed.

Runtime control
On POSIX systems, ezstream offers limited runtime control via signals when it is not streaming data
from standard input. By sending a signal to the ezstream process, e.g. with the kill(1) utility, a certain
action will be triggered.

SIGHUP
Rereads the playlist file after the track that is currently streamed. If the playlist is not to be shuffled,
ezstream attempts to find the previously streamed file and continue with the one following it, or
restarts from the beginning of the list otherwise.

SIGUSR1
Skips the currently playing track and moves on to the next in playlist mode, or restarts the current
track when streaming a single file.

CONFIGURATION FILE SYNTAX

The ezstream utility uses a simple XML configuration file format. It has a tree-like structure and is made up of XML elements. Of all the possible XML features, only regular elements that contain text or other elements, and comments, appear in an ezstream configuration file.

Each element in the configuration file consists of a start tag, its content and an end tag. For ex- ample:

<filename>playlist.m3u</filename>
<!-- XML comments look like this. -->

XML CONFIGURATION

In this section, each available element is listed and described. Note that for this purpose, elements are in-
troduced in their short, i.e. empty form. In the configuration file, they need to be used as start tag +
content + end tag
, like in the introductory example shown above.

OpenBSD 4.1 February 20, 2007 1

EZSTREAM ( 1 ) OpenBSD Reference Manual EZSTREAM ( 1 )

Root element

<ezstream />
( Mandatory. ) The configuration file's root element. It contains all other configuration elements.

Global configuration elements
Each of the global configuration elements have the <ezstream/> element as their parent.

<url />
( Mandatory. ) Specifies the location and mountpoint of the Icecast server, to which the stream will be
sent. The content must be of the form http://server:port/mountpoint For example:

<url>http://example.com:8000/stream.ogg</url>

<sourcepassword />
( Mandatory. ) Sets the source password for authentication with the Icecast server.

<format />
( Mandatory. ) This element has two different meanings, depending on whether reencoding is enabled or
not. It specifies the output format of the stream if reencoding is enabled. Otherwise, it specifies the input
format
of all input files. Recognized and supported values for output stream formats are VORBIS, MP3
and THEORA. Other values will be ignored and cause ezstream to simply pass through the data,
which may or may not work.

<filename />
( Mandatory. ) Set the path and name of a single media file, a playlist, the name of an external program
( see below ) , or the keyword stdin for streaming from standard input. Playlists are recognized by their
filename extension and end with either .m3u or .txt.

A playlist consists of filenames, one entry per line. Comments in playlists are introduced by a `#' sign at
the beginning of a line and ignored by ezstream.

<playlist_program />
( Optional. ) Set to 1 ( one ) to indicate that the file in <filename/> is actually an executable program or
script. This program is supposed to print ( to standard output ) one line with the name of a file that should
be streamed next and then exit.

If set to 0 ( zero ) , <filename/> content is assumed to be a media file, playlist file or the keyword stdin
( the default ) .

<shuffle />
( Optional. ) Set to 1 ( one ) to randomly shuffle the entries of the playlist specified in <filename/>. Files
are played sequentially if set to 0 ( zero ) or when the <shuffle/> element is absent. This option will be ig-
nored if <playlist_program/> is set to 1 ( one. )

<stream_once />
Set to 1 ( one ) in order to stream the content of <filename/> only once, and to 0 ( zero ) for continuous
streaming ( the default ) .

<reconnect_tries />
Set how many attempts should be made to reconnect to the Icecast server in case the connection is inter-
rupted. The default is to try indefinitely, which is equal to setting this configuration option to 0 ( zero ) .

<svrinfoname
( Optional.

<svrinfourl
( Optional.

OpenBSD

<svrinfoname />
( Optional. ) Set the name of the broadcast. Informational only.

<svrinfourl />
( Optional. ) Set the URL of the web site associated with the broadcast. Informational only.

4.1 February 20, 2007

2


EZSTREAM ( 1 )

<svrinfogenre />

OpenBSD Reference Manual

EZSTREAM ( 1 )

( Optional. ) Set the genre of the broadcast. Informational only, used for YP.

<svrinfodescription />
( Optional. ) Set the description of the broadcast. Informational only, used for YP.

<svrinfobitrate />
( Optional. ) Set the bitrate of the broadcast. This setting is also purely informational and only used for YP.
The value is set by the user and not ezstream, and should match the bitrate of the stream.

<svrinfoquality />
( Optional. ) Set the quality setting of an Ogg Vorbis broadcast. Informational only and needs to be set by
the user, used for YP.

<svrinfochannels />
( Optional. ) Set the number of audio channels in the broadcast, e.g. 1 ( one ) for mono or 2 for stereo. In-
formational only and needs to be set by the user, used for YP.

<svrinfosamplerate />
( Optional. ) Set the sample rate of the broadcast. Informational only and needs to be set by the user, used
for YP.

<svrinfopublic />
( Optional. ) Set to 1 ( one ) if the broadcast may be listed in a public YP directory. If set to 0 ( zero ) , the
Icecast server will not submit this stream to a YP directory, which is also the default if the <svrinfopublic/>
element is absent.

<reencode />
( Optional. ) Element that contains child elements, which specify if and how reencoding should be done.

Reencoding settings
Each of the reencoding configuration elements have the <reencode/> element as their parent.

<enable />
Set to 1 ( one ) to enable reencoding. If set to 0 ( zero ) , no reencoding will be done, which is also the de-
fault if the <enable/> element is absent.

<encdec />
Element that contains child elements, which specify how to decode and encode a certain media file format
for streaming. Each format is described by a separate <encdec/> element.

Decoder/Encoder settings
Each of the decoder/encoder configuration elements have the <encdec/> element as their parent.

<format />
This element is used by ezstream to find the appropriate encoder for the output stream format specified
in the <format/> element inside the global configuration. For consistency reasons, it is recommended that
this element is always supplied, even for currently unsupported output formats, with content such as
VORBIS, MP3, THEORA, FLAC, et cetera.

<match />
Set the filename extension used to identify a given media file format. This allows ezstream to find the
appropriate decoder for a given file. Should be set to .mp3 for MP3, .flac for FLAC, .ogg for Ogg Vorbis,
and so on.

<decode />
Set the command to decode the specified media file format to raw data and send it to standard output.
During runtime, the placeholder `@T@' is replaced with the fully qualified name of the media file, as speci-
fied in the <filename/> element or a playlist file. It should always be enclosed in quotes, to prevent prob-
lems with filenames that contain whitespaces.

OpenBSD 4.1 February 20, 2007 3

EZSTREAM ( 1 ) OpenBSD Reference Manual EZSTREAM ( 1 )

The metadata placeholder, `@M@', is also available in the <decode/> element. That way it can be used
for combined de-/encoder programs that produce readily streamable data.

For example, to decode Ogg Vorbis files using the oggdec utility:

<decode>oggdec -R -o - "@T@"</decode>

<encode />
Set the command to encode raw data, received from standard input, to the specified stream format. Dur- ing runtime, the placeholder `@M@' is replaced with the metadata (e.g. ``Artist - Title'') for the current track. It also should be enclosed in quotes at all times.

For example, to encode an Ogg Vorbis stream using the quality setting 1.5 with the oggenc utility:

<encode>oggenc -r -q 1.5 -t "@M@" -</encode>

FILES

\conf Directory containing example configuration files for various uses of
ezstream.

AUTHORS

ezstream

Ed
Moritz

This

OpenBSD

ezstream was written by:

Ed Zaleski <oddsock@oddsock.org>
Moritz Grimm <gtgbr@gmx.net>

This manual was written by Moritz Grimm.

4.1 February

20, 2007 4