Perl 6 binding to libshout - provide icecast/streaming client
Clone or download
Latest commit c6ddf9c Nov 4, 2017
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples Basically working live encoding example Jul 21, 2015
lib/Audio Up version May 28, 2016
t Test synchronously too to discover errors Feb 29, 2016
.gitignore Add .precomp to .gitignore Dec 9, 2015
.travis.yml Alter travis config to use zef Aug 2, 2017 Make zef compatible Jan 24, 2017
Changes Add changes Nov 4, 2017 Add markdown converted POD Feb 29, 2016
LICENCE Use english May 28, 2016
META6.json Fix licence Apr 22, 2017 No panda Aug 22, 2017


Perl 6 binding to libshout - provide icecast/streaming client

Build Status


This provides a source client to stream to an icecast server. It can stream Ogg/Vorbis or MP3 data but doesn't provide any transcoding so the data will need to be provided from an appropriate source in the required encoding. This has been developed against version 2.2.2 of libshout, it is possible later versions may provide support for other encodings.

The API is somewhat simplified in comparison to libshout but provides an asynchronous mechanism whereby data can be fed as quickly as it is obtained to a worker thread via a channel so the client doesn't have to worry about the timing and synchronisation issues, though the lower level send and sync methods are available if your application requires a different scheme.

In testing this proved quite capable of streaming a 320kb/s MP3 read from a file to an icecast server on the local network, though of course network conditions may limit the rate that will work well to remote servers.

The "examples" directory in the distribution contains a simple streaming source client that will allow you to send an Ogg or MP3 file to an icecast server.

If you're curious the first thing that I streamed using this library was

Mike's a great DJ, great DJs and producers make making software worthwhile :)

The full documentation is available as markdown or embedded POD.


You will need to have "libshout" installed on your system in order to be able to use this. Most Linux distributions offer it as a package.

If you are on some platform that doesn't provide libshout as a package then you may be able to install it from source:

I am however unlikely to be able to offer help with installing it this way, also bear in mind that if you install a newer version than I have to test with then this may not work.

In order to perform some of the tests you will need to have a working Icecast server available, these tests will be skipped if one isn't found. The tests use some default values for the server parameters that can be over-written by some environment variables:

  • SHOUT_TEST_HOST - the host to connect to. The default is 'localhost'
  • SHOUT_TEST_PORT - the port to connect to. The default is 8000.
  • SHOUT_TEST_USER - the user to authenticate as. The default is 'source'.
  • SHOUT_TEST_PASS - the password to authenticate with. The default is 'hackme' but you changed that right?
  • SHOUT_TEST_MOUNT - the mount point on the server to use. The default is '/shout_test'

Assuming you have a working Rakudo Perl 6 installation you should be able to install this with zef :

# From the source directory

zef install .

# Remote installation

zef install Audio::Libshout


Suggestions/patches are welcomed via github at

I have tested this and found it to work with my installation of icecast, so it should work anywhere else, if however you experience a problem with streaming please test with another source client such as ices or darkice before reporting a bug as I am unlikely to be able to help you with your streaming configuration.


Please see the LICENCE file in the distribution

© Jonathan Stowe 2015, 2016, 2017