LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-29-2005, 09:55 AM   #1
webagogue
LQ Newbie
 
Registered: May 2005
Posts: 1

Rep: Reputation: 0
help - resume curl automatically on MP3 stream fail?


Hello.

First the question, then some background (which is important) - how do I script a check to see if curl is ripping my mp3 stream and restart it if it fails?

I'm a recent switcher to Mac and have been playing with Darwin. Here's my scenario. There is a radio station that streams MP3 audio non-stop. I want to rip my favorite radio show at the same time, every weekday, for the same length of time. I used to use TotalRecorder on Windows to accomplish this but wanted to try my hand at the CLI. I know there are other solutions, but I want to exhaust the CLI possibilities (bash, perl, python, php - doesn't matter) first.

Here's how I rip the stream.

curl my.radiostation.com > myradiostation.mp3.

This works really well except for one thing. Sometimes the stream drops and needs to be restarted.

I know I can manually append the mp3 file by using a double arrow >>, but I am never around when the stream is being recorded.

So, my question is, how do I script this so that 1. I record the stream and 2. perform a check that will restart and append my mp3 file if the stream fails?

Thanks.

Last edited by webagogue; 05-29-2005 at 11:03 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
MP3 stream decode cppkid Programming 0 10-20-2005 12:43 AM
You Can Now Stream LQ Radio Without an MP3 Player jeremy LQ Suggestions & Feedback 16 09-08-2005 09:56 PM
How do you resume MP3 support in Redhat 9? dsschanze Linux - Software 7 08-14-2004 04:35 AM
stream mp3 archives surfeagle Linux - Software 2 06-04-2004 01:19 PM
mp3 stream? sk8guitar Programming 1 08-02-2003 10:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration