Slashdot Mirror


User: sfral

sfral's activity in the archive.

Stories
0
Comments
2
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 2

  1. The script on Sources of Intelligent Audio for Commute? · · Score: 1

    Here is an example cron entry:
    00 14 * * Fri /home/sfral/scripts/record_show 60 TalkOfNation >> /home/sfral/work/radio/log

    The script record_show is this:

    #!/bin/bash

    . ~/.bashrc

    if test -z $2; then
    echo Use: $0 num_minutes showname
    exit
    fi

    DIR="/share/SharedDocs/Radio"

    if test -d $DIR; then
    # Share is mounted
    DATE=`date +"%F_%I%M%P"`
    WAVEFILE="$DIR/$2_$DATE.wav"
    MP3FILE="$DIR/$2_$DATE.mp3"

    # Capture audio and save in .wav file.
    #
    echo $DATE -- Capturing $2...
    /usr/bin/sox -v 1.0 -c 2 -w -r 44100 -t ossdsp /dev/dsp -t .wav -r 44100 -c 2 $WAVEFILE &
    REC_PID=$!
    sleep $(($1*60))
    kill -2 $REC_PID

    # Convert to mp3
    #
    echo ...Converting $2 to mp3...
    nice /usr/local/bin/lame --quiet -h $WAVEFILE $MP3FILE

    # Delete wav file.
    echo ...Deleting wav file $WAVEFILE
    rm -f $WAVEFILE

    echo ...Capture complete -- $MP3FILE

    else
    echo Share not mounted! Aborting.
    exit
    fi
  2. Time-shift your local radio broadcasts on Sources of Intelligent Audio for Commute? · · Score: 1
    I plugged an FM radio (set to NPR) into my Linux box and use cron and a script to capture the interesting stuff on the weekend. Then I listen to it during the week. This was finally a geek thing that my wife can appreciate, since I burn CDs of the shows for her.

    The links I used:
    http://osl.iu.edu/~tveldhui/radio/
    http://gary.burd.info/2003/07/time-shifting-fm-rad io.html

    I'll post my script in a reply to this posting.