| ï
for what it is worth I have a system running here
for the local volunteer fire department. It is running in a Dell Optiplex
GX1 under Fedora Core 2.
I am in the process of writing a mini how-to for
the listener package. I found 2 errors in the listener.c source.
Folkert should have corrected the distribution sources by now. version
0.9
It was very easy to get a single channel recorder
working. The existing documentation is unclear in the set up of the 2
channel recorder using the listenersoundpipe.
You must create 2 FIFO's using mkfifo, set the
ownership and permissions of the FIFO's so the user running the listeners can
read/write the FIFO's.
start 2 listener processes, using different config
files use the -c (configfile) command line to point the listener binary at
the correct configfile. Then the last step is to start the
listenersoundpipe process to connect /dev/dsp to to your FIFO's.
I use the following script run by
rc.local at boot time to start the listeners. I have a user named
"recorder" who runs the listener processes. User recorder is added to
group sys.
#[root@recorder listener-0.9]# cat rc.listener
##!/bin/bash # ## Make sure we are user root!!! #if [ `/usr/bin/whoami` != "root" ] ; then # echo This program must be run as user ROOT! # exit 1 #fi # ## Setting Up the Sound Pipe # #echo -n "Setting up the Sound Pipe...." # if [ ! -f /dev/left.pipe ] ; then # mkfifo /dev/left.pipe > /dev/null 2>&1 # fi # if [ ! -f /dev/right.pipe ] ; then # mkfifo /dev/right.pipe > /dev/null 2>&1 # fi #chmod 660 /dev/left.pipe /dev/right.pipe #chown root.sys /dev/left.pipe /dev/right.pipe #echo " Done!" # ## Setup the Sound Devices # #echo -n "Changing permissions of sound card device files in /dev ..." #chmod 660 /dev/mixer* /dev/dsp* /dev/audio* #chown root.sys /dev/mixer* /dev/dsp* /dev/audio* #echo " Done!" # #/usr/sbin/alsactl restore # # #echo -n "Starting Listener ... " # /bin/su - -c "/home/recorder/listener-0.9/listener -c /home/recorder/listener-0.9/listener.conf.ch1 " recorder # /bin/su - -c "/home/recorder/listener-0.9/listener -c /home/recorder/listener-0.9/listener.conf.ch2 " recorder # /bin/su - -c "/home/recorder/listener-0.9/listenersoundpipe -l /dev/left.pipe -r /dev/right.pipe -d /dev/dsp -s 16000" recorder #echo "done!" #
#[root@recorder listener-0.9]#
I also created a wav2mp3 script to convert the
output wav files to mp3 format so the recorded files use less disk
space.
as time is important to you I have included that
script below.
#[root@recorder listener-0.9]# cat
wav2mp3
##!/bin/bash #DEST="/var/recorder/ch1" #DAY=`date +%Y-%b-%d` #MONTH=`date +%Y-%m` #echo "month/day" $MONTH/$DAY # if [ ! -f $DEST/$MONTH ] ; then # mkdir $DEST/$MONTH > /dev/null 2>&1 # fi # if [ ! -f $DEST/$MONTH/$DAY ] ; then # mkdir $DEST/$MONTH/$DAY > /dev/null 2>&1 # fi #INFILE=$1 #echo "infile=" $INFILE #FILENAME=${INFILE: -21} #echo "filename=" $FILENAME #DAYTIME=${FILENAME:0:17} #echo "daytime=" $DAYTIME #MP3FILENAME=${FILENAME/wav/mp3} #echo "mp3filename=" $MP3FILENAME #OUTFILE=$DEST/$MONTH/$DAY/$MP3FILENAME #echo "outfile=" $OUTFILE #lame --quiet --ta "169.590Mhz $DAYTIME" $INFILE $OUTFILE #rm -f $INFILE #[root@recorder listener-0.9]# # I create a directory for each month and day, then
save the mp3 files for each day in that day's directory.
It makes it easier to review the files in this
way.
We get a few 100 files each day, totaling
around 10 megs of mp3. the 40gig disk should be good for 6 or 7
years.
I have installed a second 40gig disk and set up a
raid 2 array for security should there be a hardware failure on the
disk
I am also using the smartmon to watch the
harddrives for errors.
Hope this helps...
It is a great package.
I am in western Canada if you would like to chat on
the phone...
Ted, VE7TFM
CFPO
Beaver Creek Fire Rescue
|
No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 266.1.0 - Release Date: 2/18/2005