[mythtv-users] Recording internet radio - will mythstream do it?

Steve Heistand steve at heistand.org
Tue Oct 21 14:32:48 UTC 2008


On Tue, 21 Oct 2008 15:44:46 +0200, Chris Rouch wrote
> On Mon, Oct 20, 2008 at 2:14 PM, David Fishburn
> <dfishburn.mythtv at gmail.com> wrote:
> > MythTV 0.21
> >
> > I want to record about 5 minutes of radio everyday.
> >
> > If MythStream can listen to the shows (internet streaming) does this
> > mean we can also record the show as well?
> > From what I read, it doesn't look like it can record.
> >
> > Anyone done anything similar?

this may be overkill but I have a number of radio shows I record off
internet streams with scripts like the following. Its fired off from cron
a minute or two before the show starts. requires a few programs
but they are all easily installable from apt-get/yum/etc these days.
(zinf, mp32ogg and vorbiscomment)

change the URL/file locations/sleep time to suite. (this is an hour show
with 2 minutes at the begining and 2 minutes at the end)

the ogg file gets moved into my music collection, a rescan of music
will show the new files to play. (which also gets done via cronjob)

### start script
#!/bin/sh
{
cd /tmp
now=`date "+%m_%d_%Y"`
name="${now}_Jazzset"
/usr/bin/zinf -save -ui cmdline http://sc1.abacast.com:8240 > /tmp/zinf_log 2>&1 &
sleep 3960
/usr/bin/killall -s HUP zinf
mv /tmp/KCSM*.mp3 /mnt/mp3/real_audio/Jazzset/${name}.mp3
rm /tmp/*.wav /tmp/*.mp3
cd /mnt/mp3/real_audio/Jazzset
/usr/X11R6/bin/mp32ogg --delete ${name}.mp3
/usr/X11R6/bin/vorbiscomment -a ${name}.ogg -t "ARTIST=NPR" -t "TITLE=Jazzset" -t "DATE=$now"
/bin/chmod 644 ${name}.ogg
} &
### end script

"Why is it so hot inside this handbasket?"
--
Steve Heistand
steve at heistand.org



More information about the mythtv-users mailing list