capturing CBC Radio from an internet stream

D. Hugh Redelmeier hugh-pmF8o41NoarQT0dZR+AlfA at public.gmane.org
Sun Feb 17 07:09:21 UTC 2008


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)

- 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

- 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.
--
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