Actions

Live Audio/Ubuntu Darkice

From The RadioReference Wiki

Revision as of 12:59, 22 October 2009 by Kc2rgw (talk | contribs)

HOWTO - Ubuntu Darkice Configuration for Live Audio Feeds.

This page describes the configuration for Ubuntu Linux 9.04 for darkice stream feeds for RR Live Audio feed provisioning. This should work in a generic sense for most any linux distribution using darkice, but contains some Ubuntu specific instructions for installing the packages needed to get things rolling.

Packages needed

darkice - Mandatory as this will take the audio feed captured, transcode it and direct the stream to the icecast/shoutcast service you are publishing to. This takes audio and converts it to mp3 stream format.

icecast2 - Optional. This is the streaming server itself. If you install this on your box, you will be serving up your darkice converted mp3 stream. This is useful to monitor your own stream if you don't want to connect out to the internet to pick up the RR feed. I prefer this to local monitoring as I know the quality of the actual converted feed 'signal' that I'm sending vs the raw direct audio that is being captured.

To fetch the packages

Open a terminal window of your chosing.

Update your current list of packages.

sudo apt-get update

Fetch and install the software. If you don't want an icecast2 server, just don't add it to the following line.

sudo apt-get install darkice icecast2

This should take care of the installation of the packages themselves and the supporting documentation. It's just that simple.

On to the Darkice configuration.

Documentation for darkice can be viewed a few ways.

man darkice - shows the command line syntax for starting darkice man darkice.cfg - shows details for the config file syntax

Pointing a browser at

file:///usr/share/doc/darkice/examples/darkice.cfg - The location of the sample config file

First step is to create a configuration file or darkice won't do much of anything for you.

Here is a starter file for you. You can cut and paste this in or just copy it and create a file named darkice.cfg. The file name is not important, you can call it whatever you want.


# 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      = 1         # 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      = 22050     # sample rate in Hz. try 11025, 22050 or 44100
bitsPerSample   = 16        # bits per sample. try 16
channel         = 2         # 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
 
# If you want to send to your own icecast server, you basically copy
# this whole section and put in the values to point the feed to your own
# server instead of the RR information below
 
# Don't forget, the name [icecast2-0] needs to change to [icecast2-1]
# and 2 and 3 as you add more feed destinations.
 
[icecast2-0]
# The audio format to encode to, we're using mp3 here
format          = mp3

# The bit rate mode to use, the commented out lines are for a fixed bit
# rate "constant bit rate" at 16 bits.  I prefer the variable bit rate
# for the sound quality it has and the throughput is very similar on avg

#bitrateMode    = cbr
#bitrate        = 16

bitrateMode     = vbr

# Quality at .1, max is 1.0, but as you increase, so does the bandwidth
# used.  For mono scanner audio .1 is totally fine.
quality         = 0.1

# Takes the input and mixes it down to a mono output for the feed.
channel         = 1

# Cuts frequency response over 5kHz.  For scanner feed this mostly
# eliminates hiss and harshness on paging tones.  Saves a bunch of
# bandwidth as well.
lowpass         = 5000

# Server shown on your RR feed owner page that hosts your feed
# You need to log in to RR, go to Account -> My Live Audio Feeds ->
# click the feed owner page icon at the far right of your feed listing.
# Then you will see all this information.


# From Feed Technical Details, the "Server"
server          = audio3.radioreference.com 

# From Feed Technical Details, the "Port"
port            = 80      # port of the IceCast server, usually 8000

# From Feed Technical Details, the Password exactly as shown
password        = PASSWD_FROM_YOUR_RR_FEED_PROVIDER_PAGE 

# From Feed Technical Details, the mount...remove the leading "/", it's
# not needed in this file.  So if it is /999999 make it just 999999
mountPoint      = MOUNT_POINT_FROM_YOUR_RR_FEED_PROVIDER_PAGE 

# name of the strea
# On My Live Audio Feeds, it's the first part ending in a colon ":"
name            = FEED NAME THAT RR GAVE YOU WHEN YOU APPLIED 

# On My Live Audio Feeds, it's the part in parentheses in the Feed name
description     = DESCRIPTION ASSIGNED FROM YOUR FEED APPLICATION 

# I don't think this is really needed because RR takes care of links
url             = http://api.radioreference.com/js/?key=XXXXXXX&feedId=XXXX
genre           = Scanner
public          = yes