Home » .m3u, .ogg, Informational, Installing, Linux, Media, Resources, Reviews, Scripts, Server, Ubuntu, Web Sites, audio stream, codecs, server-side

Configuring a live scanner stream with Icecast, Darkice, and Jackd

17 March 2010 No Comment

I worked for several days configuring the software to stream my RadioShack Pro-50 scanner online. The Olympia, Lacey, and Tumwater dispatch is currently online at http://wacomputing.com. I configured a .ogg stream that is audible as an in-page player or as a .m3u stream in your media player. The final configuration utilizes my existing Ubuntu Server (v.8.04) with software and libraries including:

  • icecast2 – streaming server
  • darkice – live audio streamer and encoder
  • jackd – audio server daemon
  • libogg0 – library
  • libvorbis0a – library
  • libvorbisenc2 – library

The literature that I read indicates that Darkice is compiled without mp3 support. You must compile from scratch, versus installing from the repositories if you want mp3 support. Once you compile from scratch, Darkice will stream .mp3. Then, you can use software such as Wimpy Media Player to embed it into your site.

If you are installing from scratch on Ubuntu Server 8.04, here are the steps to get you streaming and online. I start this install regimen assuming that you have at lease one functioning domain name on your server. Icecast will not interfere with your Apache installation as it operates on port 8000.

sudo apt-get install icecast2 sudo apt-get install jackd sudo apt-get install darkice sudo apt-get install screen

And, just to make sure the libraries were installed…
sudo apt-get install libogg0 sudo apt-get install libvorbis0a sudo apt-get install libvorbisenc2

I have attached my configuration files for both icecast and darkice. Copy those files below:
Darkice.cfg
# sample DarkIce configuration file, edit for your needs before using # see the darkice.cfg man page for details # this section describes general aspects of the live streaming session [general] duration        = 0        # duration of encoding, in seconds. 0 means forever bufferSecs      = 5         # size of internal slip buffer, in seconds reconnect       = yes       # reconnect to the server(s) if disconnected # this section describes the audio input that will be streamed [input] device          = /dev/dsp  # OSS DSP soundcard device for the audio input sampleRate      = 11025     # sample rate in Hz. try 11025, 22050 or 44100 bitsPerSample   = 16        # bits per sample. try 16 channel         = 1         # channels. 1 = mono, 2 = stereo # this section describes a streaming connection to an IceCast server # there may be up to 8 of these sections, named [icecast-0] ... [icecast-7] # these can be mixed with [icecast2-x] and [shoutcast-x] sections # this section describes a streaming connection to an IceCast2 server # there may be up to 8 of these sections, named [icecast2-0] ... [icecast2-7] # these can be mixed with [icecast-x] and [shoutcast-x] sections [icecast2-0] bitrateMode     = abr       # average bit rate format          = vorbis     # format of the stream: ogg vorbis bitrate         = 16        # bitrate of the stream sent to the server server          = wacomputing.com # host name of the server port            = 8000      # port of the IceCast2 server, usually 8000 password        = your-password    # source password to the IceCast2 server mountPoint      = olypd.ogg  # mount point of this stream on the IceCast2 server name            = olypd.ogg # name of the stream description     = This is only a trial # description of the stream url             = http://www.wacomputing.com # URL related to the stream genre           = scanner    # genre of the stream public          = yes       # advertise this stream? # this section describes a streaming connection to a ShoutCast server # there may be up to 8 of these sections, named [shoutcast-0] ... [shoutcast-7] # these can be mixed with [icecast-x] and [icecast2-x] sections

Icecast.xml download as .txt

Starting the Services

The great thing about darkice is that you can run the configuration file from anywhere on your system. It does not have an init.d script. However, the only downside from Darkice is that when you initiate the script, it has to be running – unless there is a better way. That is where the program screen comes into play. Once you start Darkice, you will see the:

Your terminal will be unusable at this time. This tutorial (http://wiki.radioreference.com/index.php/Live_Audio/Ubuntu_Darkice)provides a script to use screen to create a virtual terminal so that Darkice can still run while you have use of your Terminal. The process to start your stream is below:

sudo /etc/init.d/jackd start

sudo /etc/init.d/icecast2 start

darkice -c /etc/darkice.cfg

Listening to your stream

Once you get this going, it should be available on the parameters you stated in your darkice.cfg. My stream is located at http://wacomputing.com. If you have questions, I can try and help you to the best of my abilities. Leave a comment…

Many thanks to RenoScanner.com for the help in this configuration process.

Troubleshooting

arecord -l : lists sound devices; you might need this to detect which device to place in the darkice.cfg

Resources

http://ubuntuforums.org/showthread.php?p=8978773

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.