PDA

View Full Version : Recording Internet streams for later playback



Mike New
2006-02-21, 15:13
I'm using SlimServer to listen to Internet radio, and am looking for a Tivo-style way to record scheduled programs for later playback through Squeezebox. Has anyone had success with this? If yes, what software do you use?

zuvembi
2006-02-21, 15:25
I just use mplayer set to dumpstream to a file. Unfortunately there's no way to tell mplayer to quit after X number of minutes, so I wrote a kill script.

I just popped them both into cron and it 'just works'. A crap solution I know, but it's sufficient for my needs.


#record car-talk
57 8 * * 6 /usr/local/bin/mplayer -dumpaudio -dumpfile /media/MP3/sampling/Car_Talk.mp3 http://128.208.34.80:8002
#kill car-talk process
03 10 * * 6 /usr/bin/perl /home/dane/bin/kill_car_talk.pl





#!/usr/bin/perl -w

#find process id
@x = `ps -ef |grep Car_Talk.mp3 |grep -v grep`;

foreach $line (@x)
{
#removed leading spaces
$line =~ s/^\s+//;

#get PID and kill process
($x, $pid) = split /\s+/, $line;
system ("kill $pid");
}

#set id3 info
@date = localtime(time());
$date[4]++;
$date[4] = "0".$date[4] if ($date[4] < 10);
$date[5] += 1900;
$date = join "/", ($date[5],$date[4],$date[3]);
$params = "--song \"Cartalk - show $date\" --year=$date[5] --artist=\"Tom and Ray Magliozzi\" ";
$params .= "-g 101 --album=\"Car Talk radio show\" --comment=\"cartalk.com - captured by MPlayer\"";
system ("/usr/bin/id3v2 $params /media/MP3/sampling/Car_Talk.mp3");

ericj
2006-02-22, 06:04
There was a very brief discussion, with alterntives for windows and mac at http://forums.slimdevices.com/showthread.php?p=87217#post87217

The script is a major improvement over the one I sketched out in that note. The only thing that one might suggest is that the stream could be transcoded (say from Real to mp3) with lame afterwards for the non-mp3 streams.

I am listening to last night's WKCR broadcast right now (8am) from last night's broadcast.

Thanks much for the posted script....

zuvembi
2006-02-22, 13:57
There was a very brief discussion, with alterntives for windows and mac at http://forums.slimdevices.com/showthread.php?p=87217#post87217

The script is a major improvement over the one I sketched out in that note. The only thing that one might suggest is that the stream could be transcoded (say from Real to mp3) with lame afterwards for the non-mp3 streams.
It's not really a general purpose script, more of quick one-off. You can certainly add those steps in there without much difficulty.


Thanks much for the posted script....

No problem. I'm glad someone found it useful. :)

Linzer
2006-02-22, 14:08
I'm using SlimServer to listen to Internet radio, and am looking for a Tivo-style way to record scheduled programs for later playback through Squeezebox. Has anyone had success with this? If yes, what software do you use?

Why not ask Google? http://www.google.com/search?num=100&hl=en&lr=&safe=off&q=tivo+internet+radio&btnG=Search

bmccall
2006-02-23, 04:11
I purchased the above software to record my old records to Ogg. It will record anything that comes through your sound card and has a timer for controlling when you record. I have used Quintessential player to play the radio stream and total recorder to record. Quintessential is free. Unfortunately, TR is not but was well worth the money to record my records.

Ben

chiphart
2006-02-23, 08:02
zuvembi wrote:
> I just use mplayer set to dumpstream to a file. Unfortunately there's
> no way to tell mplayer to quit after X number of minutes, so I wrote a
> kill script.

...Linux users should really check out streamripper.

My crontab looks something like this:

58 9 * * 6 /home/chip//CARTALK >> /home/chip/cartalk/log 2>&1

~chip/CARTALK is just a simple script:

/usr/local/bin/streamripper [urlofthestationIrecord] -a cartalk.`date
+%F` -A -l 3840 -d /home/chip/streamripper/cartalk

...and I end up with an ~11MB file for 1 hour of CarTalk.

Note that the "-l 3840" is the length of the recording, so I
don't need a kill command. streamripper has some other nice
features designed for the obvious tasks like this (such as
automatically splitting and labeling tracks from a music
stream).


--
Chip Hart - Pediatric Solutions * Physician's Computer Company
chip @ pcc.com * 1 Main St. #7, Winooski, VT 05404
800-722-7708 * http://www.pcc.com/~chip
f.802-846-8178 * Pediatric Software Just Got Smarter.
Your Practice Just Got Healthier.

zuvembi
2006-02-23, 14:04
zuvembi wrote:
> I just use mplayer set to dumpstream to a file. Unfortunately there's
> no way to tell mplayer to quit after X number of minutes, so I wrote a
> kill script.

...Linux users should really check out streamripper.


I looked at, but previously it had a few dependencies I couldn't resolve for SuSE 9.3 or 9.2. I just apt-get install'ed it, so I might give it a whirl.

edit: I was thinking of streamtuner, which I was trying to install for my parents. I never got around to trying streamripper previously.

Mark Lanctot
2006-03-20, 17:17
Just saw a program that can do this:

Online Radio Tuner (http://www.bassictech.com/index.php?option=com_content&task=view&id=12&Itemid=27)

It's in beta, but one of its features is:


Record what you hear as MP3's.

chiphart
2006-03-21, 15:45
Mark Lanctot wrote:
> Just saw a program that can do this:
> 'Online Radio Tuner' (http://tinyurl.com/loohe)
> It's in beta, but one of its features is:

I've said it before and I'll say it again:

http://streamripper.sourceforge.net/

OSX, Win32 and Linux versions available. I've used only the
latter, but it's excellent. There's also the WinAmp method,
which is really quite nice (for Windows users...).


--
Chip Hart - Pediatric Solutions * Physician's Computer Company
chip @ pcc.com * 1 Main St. #7, Winooski, VT 05404
800-722-7708 * http://www.pcc.com/~chip
f.802-846-8178 * Pediatric Software Just Got Smarter.
Your Practice Just Got Healthier.

MrSinatra
2006-11-23, 12:30
online radio tuner doesn't have a way to schedule recordings that i can see, (otherwise looks quite neat, but thats the golden ring i need to make it like tivo)

and i also have the winamp dsp of streamripper, which is awesome... but again, no scheduling options. and i don't think the standalone offers that either.

its such a no brainer, i'm surprised i can't find a free one that includes a scheduler.



Just saw a program that can do this:

Online Radio Tuner (http://www.bassictech.com/index.php?option=com_content&task=view&id=12&Itemid=27)

It's in beta, but one of its features is:


Mark Lanctot wrote:
> Just saw a program that can do this:
> 'Online Radio Tuner' (http://tinyurl.com/loohe)
> It's in beta, but one of its features is:

I've said it before and I'll say it again:

http://streamripper.sourceforge.net/

OSX, Win32 and Linux versions available. I've used only the
latter, but it's excellent. There's also the WinAmp method,
which is really quite nice (for Windows users...).

MrSinatra
2006-11-23, 12:53
i should add that online radio tuner's website says u can schedule recordings, but its unclear to me how to do so, or if it can be done totally unattended.