cURL / Mailing Lists / curl-users / Single Mail

curl-users

Using cURL to keep saving streams

From: Kristian Kjeldsen <e99_kkj_at_e.kth.se>
Date: Wed, 13 Apr 2011 23:58:34 +0200

Hi!

I'm finding a new use for cURL(MacOSX) recently and that is saving shoutcast streams with low resource load. The commandline i'm using is this:
curl -L -C - -o session_MMDD.mp3 http://88.198.133.16:8024
And it works great! However, at times the stream stops sending data, and sometimes does not recover from this condition. My question is this: How to, preferably in a single line, have curl save its data to the same file and keep reconnecting when there is a problem? I know i can adjust the timeout parameters, i'm not asking for this as i can easily find this information myself...

What i'm asking for is a little of that one-line bash script mojo you guys on this list have so much of, and i have so little of :)

I cant use straight resume since the shoutcast servers i'm communicating with doesn't like actual resumes(for obvious reasons). The best would be if it automatically assigned current month and day numbers to MM and DD respectively. ;)

Have a great day one and all!

Kristian
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-04-14