capturing CBC Radio from an internet stream

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Mon Feb 25 15:07:32 UTC 2008


On Sun, Feb 17, 2008 at 02:09:21AM -0500, D. Hugh Redelmeier wrote:
> This has taken a bit to figure out.  I hope some others find this
> information useful.
> 
> CBC Radio is streamed in two ways that I know about:
> 
> - ogg vorbis: experimental.  CBC Radio 1 in Toronto (only)

I thought they had Calgory as well.  They do have radio 2 as ogg as
well from Toronto.

> - mms stream containing .wma.  For each radio station.
> 
> See http://www.cbc.ca/listen/index.html
> 
> I would like to be able to report that ogg vorbis is the way to go,
> but there are two problems:
> 
> - every time try to capture an hour-long show, I find the stream is
>   broken off prematurely

Never had a problem using streamripper.

> - I often want to record something that I found out about by coming in
>   on the middle.  In these cases, it is great to capture from a
>   station in a later timezone.
> 
> How can you capture mms?  I want to use scripts so it has to be a cli
> program.
> 
> Here's a shell script that I call GRAB1hrCBC1mms:
> 
>     # grab 60 minutes of CBC Radio 1
>     # mms => ASF (.asf or .wma)
> 
>     DATE=`date +%Y.%m.%d-%H.%M`
> 
>     mmsrip --delay=3600 --output=$DATE.wma mms://wm.cbc.ca/cbcr1-${CITY:-toronto}
> 
> You can give it an argument of the city you wish to record from.  I've
> listed their time offset from here and their timezone:
>     -1 cst  winnipeg
>     -1 cst  regina
>     -2 mst  calgary
>     -3 pst  vancouver
> 
> I can start this up with tha at(1) command
> 
> I got mmsrip here:
>   http://nbenoit.tuxfamily.org/projects.php?rq=mmsrip
> 
> The output of mmsrip, at least in this case, is a .wma file.  But it
> is a bit malformed: it won't work in my mp3 players.  Two things do
> understand it:
> 
> - ffmpeg
> 
> - mplayer (because it uses the ffmpeg library)
> 
> It turns out that a null transcoding by ffmpeg can make the file work
> with my Creative Zen V!  ffmpeg has unconventional flags -- check the
> manpage.
> 
>   ffmpeg -i captured.wma  -acodec copy nice.wma
> 
> I also found the flags -title and -author (but not -album) allowed me
> to add tags.

I never got mms to capture correctly.  What I do use personally is this:

cat /etc//cron.d/streamripper
# /etc/cron.d/streamripper
PATH=/bin:/usr/bin:/usr/local/bin

# Saturdays at 19:00 EST record Randy's Vinyl Tap for 2 hours (7200
# seconds)
0 19  * * 6     www-data   /usr/bin/streamripper http://vorbis.nm.cbc.ca:80/cbcr1-toronto.ogg -A -a "Randy's Vinyl Tap - \%d" -d /var/www/streams/cbc/ -l 7200 --quiet

# Saturdays at 10:00 EST record Vinyl Cafe for 1 hour (3600 seconds)
0 10  * * 6     www-data   /usr/bin/streamripper http://vorbis.nm.cbc.ca:80/cbcr2-toronto.ogg -A -a "Vinyl Cafe - \%d" -d /var/www/streams/cbc/ -l 3600 --quiet

--
Len Sorensen
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list