How to compile ezstream from source

Note: This post is 6 years old. Some information may no longer be correct or even relevant. Please, keep this in mind while reading.

Debian Stretch’s version of ezstream is currently a bit out of date. Here is how you compile ezstream from source to get the latest improvements and bugfixes. Not even the INSTALL file in the ezstream repo has all the steps:

apt-get install libshout3-dev libxml2-dev libtag1-dev libshout3-dev libvorbis-dev libogg-dev check libtag-extras-dev libtagc0-dev

git clone https://github.com/xiph/ezstream.git

cd ezstream

libtoolize --force
aclocal
autoheader
automake --force-missing --add-missing
autoconf
autoreconf -f

./configure
make
make install

Note that the configuration file structure has changed from what can be found on older blog posts on the internet. For example, to pipe OGG Vorbis data into ezstream without re-encoding, you can use something like teststream.xml:

<ezstream>
  <server>
    <hostname>media.example.com</hostname>
    <password>hackme</password>
  </server>
  
  <stream>
    <mountpoint>test.ogg</mountpoint>
    <format>Vorbis</format>
  </stream>
  
  <media>
    <type>stdin</type>
    <filename>stdin</filename>
    <stream_once>1</stream_once>
  </media>
</ezstream>

Then, to stream 30 seconds of brown noise with a sine sweep to an Icecast server for testing purposes:

sox --null -p synth 00:00:30 brownnoise synth 00:00:30 sine 300-3000 | \
sox -r 48k -t raw -e signed -b 16 -c 1 -V1 - -r 48000 -t ogg - | \
ezstream -vvc teststream.xml