#!/bin/sh url=http://out1.cbc.icy.abacast.com:80/cbc-cbcr1hfx-96 time=60 out=stream-`date +%Y-%m-%d-%H%M`.mp3 curl -s -G "$url" > "$out" & curl_pid=$! function cleanup() { kill $curl_pid } trap cleanup EXIT sleep $time # cleanup gets implicitly called here
url is the raw stream address, found in the mp3 playlist, the example stream is cbc radio halifax.
time is the length to record in seconds.
output is what to name the output file (stream-yyyy-mm-dd-HHMM.mp3).
No comments:
Post a Comment