Actions

Difference between revisions of "Live Audio/Ubuntu Darkice"

From The RadioReference Wiki

(Darkice configuration for Ubuntu linux hosts)
 
Line 38: Line 38:
 
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.
 
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.
  
<nowiki>
 
  
# 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
+
# sample DarkIce configuration file, edit for your needs before using
[general]
+
# see the darkice.cfg man page for details
duration        = 0        # duration of encoding, in seconds. 0 means forever
+
bufferSecs      = 1        # size of internal slip buffer, in seconds
+
# this section describes general aspects of the live streaming session
reconnect      = yes      # reconnect to the server(s) if disconnected
+
[general]
 
+
duration        = 0        # duration of encoding, in seconds. 0 means forever
# this section describes the audio input that will be streamed
+
bufferSecs      = 1        # size of internal slip buffer, in seconds
[input]
+
reconnect      = yes      # reconnect to the server(s) if disconnected
device          = /dev/dsp  # OSS DSP soundcard device for the audio input
+
sampleRate      = 22050    # sample rate in Hz. try 11025, 22050 or 44100
+
# this section describes the audio input that will be streamed
bitsPerSample  = 16        # bits per sample. try 16
+
[input]
channel        = 2        # channels. 1 = mono, 2 = stereo
+
device          = /dev/dsp  # OSS DSP soundcard device for the audio input
 
+
sampleRate      = 22050    # sample rate in Hz. try 11025, 22050 or 44100
# this section describes a streaming connection to an IceCast server
+
bitsPerSample  = 16        # bits per sample. try 16
# there may be up to 8 of these sections, named [icecast-0] ... [icecast-7]
+
channel        = 2        # channels. 1 = mono, 2 = stereo
# these can be mixed with [icecast2-x] and [shoutcast-x] sections
+
 
+
# this section describes a streaming connection to an IceCast server
# If you want to send to your own icecast server, you basically copy
+
# there may be up to 8 of these sections, named [icecast-0] ... [icecast-7]
# this whole section and put in the values to point the feed to your own
+
# these can be mixed with [icecast2-x] and [shoutcast-x] sections
# server instead of the RR information below
+
 
 
+
# If you want to send to your own icecast server, you basically copy
# Don't forget, the name [icecast2-0] needs to change to [icecast2-1]
+
# this whole section and put in the values to point the feed to your own
# and 2 and 3 as you add more feed destinations.
+
# server instead of the RR information below
 
+
 
[icecast2-0]
+
# Don't forget, the name [icecast2-0] needs to change to [icecast2-1]
# The audio format to encode to, we're using mp3 here
+
# and 2 and 3 as you add more feed destinations.
format          = mp3
+
 
 
+
[icecast2-0]
# The bit rate mode to use, the commented out lines are for a fixed bit
+
# The audio format to encode to, we're using mp3 here
# rate "constant bit rate" at 16 bits.  I prefer the variable bit rate
+
format          = mp3
# for the sound quality it has and the throughput is very similar on avg
+
 
+
# The bit rate mode to use, the commented out lines are for a fixed bit
#bitrateMode    = cbr
+
# rate "constant bit rate" at 16 bits.  I prefer the variable bit rate
#bitrate        = 16
+
# for the sound quality it has and the throughput is very similar on avg
 
+
bitrateMode    = vbr
+
#bitrateMode    = cbr
 
+
#bitrate        = 16
# Quality at .1, max is 1.0, but as you increase, so does the bandwidth
+
# used.  For mono scanner audio .1 is totally fine.
+
bitrateMode    = vbr
quality        = 0.1
+
 
+
# Quality at .1, max is 1.0, but as you increase, so does the bandwidth
# Takes the input and mixes it down to a mono output for the feed.
+
# used.  For mono scanner audio .1 is totally fine.
channel        = 1
+
quality        = 0.1
 
+
# Cuts frequency response over 5kHz.  For scanner feed this mostly
+
# Takes the input and mixes it down to a mono output for the feed.
# eliminates hiss and harshness on paging tones.  Saves a bunch of
+
channel        = 1
# bandwidth as well.
+
lowpass        = 5000
+
# Cuts frequency response over 5kHz.  For scanner feed this mostly
 
+
# eliminates hiss and harshness on paging tones.  Saves a bunch of
# Server shown on your RR feed owner page that hosts your feed
+
# bandwidth as well.
# You need to log in to RR, go to Account -> My Live Audio Feeds ->
+
lowpass        = 5000
# click the feed owner page icon at the far right of your feed listing.
+
# Then you will see all this information.
+
# 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.
# From Feed Technical Details, the "Server"
+
# Then you will see all this information.
server          = audio3.radioreference.com  
+
 
+
# From Feed Technical Details, the "Port"
+
# From Feed Technical Details, the "Server"
port            = 80      # port of the IceCast server, usually 8000
+
server          = audio3.radioreference.com  
 
+
# From Feed Technical Details, the Password exactly as shown
+
# From Feed Technical Details, the "Port"
password        = PASSWD_FROM_YOUR_RR_FEED_PROVIDER_PAGE  
+
port            = 80      # port of the IceCast server, usually 8000
 
+
# From Feed Technical Details, the mount...remove the leading "/", it's
+
# From Feed Technical Details, the Password exactly as shown
# not needed in this file.  So if it is /999999 make it just 999999
+
password        = PASSWD_FROM_YOUR_RR_FEED_PROVIDER_PAGE  
mountPoint      = MOUNT_POINT_FROM_YOUR_RR_FEED_PROVIDER_PAGE  
+
 
+
# From Feed Technical Details, the mount...remove the leading "/", it's
# name of the strea
+
# not needed in this file.  So if it is /999999 make it just 999999
# On My Live Audio Feeds, it's the first part ending in a colon ":"
+
mountPoint      = MOUNT_POINT_FROM_YOUR_RR_FEED_PROVIDER_PAGE  
name            = FEED NAME THAT RR GAVE YOU WHEN YOU APPLIED  
+
 
+
# name of the strea
# On My Live Audio Feeds, it's the part in parentheses in the Feed name
+
# On My Live Audio Feeds, it's the first part ending in a colon ":"
description    = DESCRIPTION ASSIGNED FROM YOUR FEED APPLICATION  
+
name            = FEED NAME THAT RR GAVE YOU WHEN YOU APPLIED  
 
+
# I don't think this is really needed because RR takes care of links
+
# On My Live Audio Feeds, it's the part in parentheses in the Feed name
url            = http://api.radioreference.com/js/?key=XXXXXXX&feedId=XXXX
+
description    = DESCRIPTION ASSIGNED FROM YOUR FEED APPLICATION  
genre          = Scanner
+
public          = yes
+
# I don't think this is really needed because RR takes care of links
 
+
url            = http://api.radioreference.com/js/?key=XXXXXXX&feedId=XXXX
</nowiki>
+
genre          = Scanner
 +
public          = yes

Revision as of 12:59, 22 October 2009

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