3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Schedule Streaming Audio Recordings in Ubuntu

Step 5You're in Business!

You\
That's all there is to it, to test your handiwork you can right click the streamrecord job in Kcron, choose 'run now' and check for mystream.wav in your /tmp directory. If it's there (and growing fast), run the pkill job and you should soon see the mystream.wav disappear from your /tmp directory, and a new .mp3 file in the directory you specified when you altered the script. If you're recording a long show, keep in mind that it will take a decent amount of time to encode your .wav file. On one 3 hour show I record, it takes approximately 10 minutes to encode to mp3. If you have any problems getting this to work, feel free to drop me a line.


Stuff

P.S. I know my methods are a bit crude, as there are probably best-practices that I'm not following in some of my steps, so please don't school me on Linux 101, this is just a quick and dirty way to never miss your favorite audio stream.
« Previous StepDownload PDFView All StepsNext Step »
8 comments
Nov 21, 2008. 9:58 AMbdbull says:
I'm using this to record a 4.5 hour talk radio show from a radio station's internet stream. However, for some reason it's not getting the whole show. So far of 5 recordings this week, none of them recorded the entire show and they are all different file lengths.
Nov 21, 2007. 5:41 AMfrenchie says:
Hi, really useful tutorial, thanks a lot. I'm having a strange problem with it though. The script to record the stream runs fine when I run it from the command line, but if I try to run it automatically from the crontab, mplayer crashes every time! MPlayer interrupted by signal 13 in module: play_audio - MPlayer crashed. This shouldn't happen. The script is identical, permissions are the same, I don't understand!! Thanks, John.
Nov 21, 2007. 8:04 AMfrenchie says:
Managed to track down the problem. Yes, I'm using crontab -e to edit the crontab (originally tried kcron and it didn't work there either). My crontab entry originally looked something like this:

03 00 * * 2-6 script URL filename

I edited it to redirect output/error messages like so:

03 00 * * 2-6 script URL filename > $HOME/logfile 2>&1

Now it works just fine! By the way, there's some useful info here that I've used together with your how-to in order to record directly to ogg/mp3 without creating a temporary wav file: http://www.tomtaylor.co.uk/blog/2007/04/17/play-it-again/

Thanks again, it's so cool to be able to record streams automatically.
John.
Nov 21, 2007. 10:37 AMfrenchie says:
You may have already tried this, but if your mp3 player doesn't support ogg natively, maybe this could help: Rockbox. It's an open-source alternative to the factory firmware, and it supports several models of mp3 player. Anyway, the lame conversion works just fine too.

Looking forward to listening to the radio show tomorrow that will be recorded while I snooze tonight!

all the best,
john.

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
32
Followers
10
Author:stuffman