Skip to content

Latest commit

 

History

History

examples

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Audio::Libshout Examples

This directory contains examples of usage of Audio::Libshout, they all assume that you have a working Icecast server available

This is the simplest working example, it takes a single MP3 file as a command line argument and streams it to an Icecast on localhost with the default configuration and a mount of /foo.

This is a more complete example for streaming a single file which may be either MP3 or Ogg/Vorbis. The host, port, mount, username can be specified and the password and file are required.

Usage:
  examples/streamfile --password=<Str> --file=<Str> [--host=<Str>] [--port=<Int>] [--user=<Str>] [--mount=<Str>]

This is a fuller example that will open any audio file recognized by libsndfile encoding it to MP3 with Audio::Encode::LameMP3 before streaming it.

The additional parameters are the bitrate and quality of the encoding.

Requires Audio::Encode::LameMP3 and Audio::Sndfile to run, which can be installed with:

 zef install Audio::Encode::LameMP3 Audio::Sndfile
Usage:
  examples/streamfile-encode --password=<Str> --file=<Str> [--host=<Str>] [--port=<Int>] [--user=<Str>] [--bitrate=<Int>] [--quality=<Int>] [--bufsize=<Int>] [--mount=<Str>]