Thanks to the valiant efforts of Brendan Cully, there is now a Perl binding library for Libshout 2.0, which is required to stream to Icecast2.

We have therefore been able to update FreeStream to stream Ogg. For the time being, this is a separate version called VreeStream which only streams Ogg and only streams to Icecast2, but eventually we will make a version which is more flexible, since Libshout 2.0 does make it possible to connect to Icecast1.

To install: it helps if you have already installed the original version of FreeStream before, as you will be familiar with what to do. The general idea is: you install libshout, then you install Shout.pm, which is a Perl library that depends on libshout.

This time, it's a bit trickier though: more dependencies. You need to already have libogg and libvorbis installed in order to be able to compile and install Libshout 2.0. Go to Vorbis.com to get the source code for these if you want to install them, or if you have Debian, you can
apt-get install libao-dev libogg-dev libvorbis-dev
but as with most libraries installed from Debian packages, your mileage may vary!

For streaming, you will also need oggenc to do the Ogg encoding (again, compile from source code from Vorbis.com or apt-get install vorbis-tools).

Got all that stuff installed? OK, first install Libshout 2.0. To be certain to avoid conflicts, we highly recommend stripping out all old versions of libshout.
I.e.: rm -rf /usr/lib/libshout.* /usr/local/lib/libshout.*

Download Libshout 2.0
To install: tar xvfz libshout-2.0.tar.gz;cd libshout-2.0;./configure;make;make install

Download Shout.pm.2.0.1
To install: tar xvfz Shout-2.0.1.tar.gz;cd Shout-2.0.1;perl Makefile.PL;make;make install

In the Shout-2.0.1 directory, edit test.pl to insert the hostname and encoder password for your Icecast2 server. If you run it with no problems, then you should have no problems with Vreestream. If you encounter any sort of error having to do with "pthread", as we did, then compile and install FSU pthreads. Then reconfigure, recompile, and reinstall Libshout 2.0, and recompile and reinstall Shout.pm.

This is the Vreestream perl script. This is for streaming Ogg Vorbis to Icecast2. You can put it in the same place as freestream, for instance /usr/local/bin/ .

This is a sample shell script showing how to use Vreestream. We highly recommend having ALSA installed so that you can use arecord to retrieve your soundcard input, but esdrec should work as well (Note: if your stream sounds like static, try adding the option --raw-endianness=1 to oggenc to assume that the sound data is bigendian and not little-endian).


This is the Peestream perl script. This is for streaming MP3 to Icecast2. You can put it in the same place as freestream, for instance /usr/local/bin/ .

This is a sample shell script showing how to use Peestream. We highly recommend having ALSA installed so that you can use arecord to retrieve your soundcard input, but esdrec should work as well (Note: if your stream sounds like static, try adding or removing the command-line switch -x to lame to assume that the sound data is big-endian and not little-endian or vice versa).


Enjoy!

-- Fat Freddy & his Cat <ff APESTAARTJE squat PUNT net>