CBC Radio Stream URLs

Recently CBC revamped its music streams again and the old URLs don’t work. Why would they do this? Well, they want people to listen using the website or official app, or via platforms they have agreements with, like Google Home and Alexa.

Personally, I think this is bullshit. I like listening to music while on the computer, but I’m not opening a whole-ass modern web browser, on top of whatever else I have open, for a simple audio stream. And if I’m using headphones with my phone or an actual physical radio, how am I supposed to hear sounds on my computer? So, after some helpful tips from more techy folks on Mastodon, I threw together this playlist with all the local CBC Radio 1 and CBC Music streams available at CBC Listen. Details below the fold.

How to use it:

  • Save the raw file to your computer.
  • Optionally, first open the file in a text editor and delete the stations you don’t want.
  • Open the file with your preferred web radio application of choice, like VLC.
  • Pick your preferred radio station. “CBC Music” is, of course, what used to be Radio 2.

Personally, I like VLC’s ncurses interface, so I added this to my .bash_aliases file: alias cbcradio='vlc -I ncurses ~/Music/cbc.m3u'. Typing cbcradio into my terminal app results in this:

A playlist opened in VLC's text-based interface.
It’s lightweight. Shut up.

To do:

I don’t know how to get the proper streaming URL for individual shows/podcasts and playlists. If anyone does, please let me know!

25 thoughts on “CBC Radio Stream URLs”

  1. Hi Neville, I tried a couple of the links in Logitech Media Server, to try to reestablish CBC playability on my Squeezebox, but all I get is 10sec of silence from the stream, then it stops. VLC just crashes right away. [MacOS Mojave, latest]. Any suggestions? Thanks, John

    1. Hi! I’m afraid don’t know anything about LMS/Squeezebox, but you may need to install extra stuff to enable support for HLS format streams. Here’s a couple of threads that might help.

      1. Hi, I have already succeeded in configuring LMS to play HLS streams from BBC, so I think that isn’t it. However, I did manage to play CBC through the TuneIn Radio app within LMS – no account required either. The CBC app does not work. For anyone else trying this, just search within TuneIn for “CBC Radio One” to obtain a fairly clean list of stations, instead of having to wade through every program ever streamed by CBC. Straightforward then, to add streams to Favourites. So all is good, I can now listen when FM signals are poor. Cheers, John

      2. Update. I just found that iTunes now pulls CBC Radio from TuneIn. All of the Live Radio streams are there (just search for “CBC Radio” in the Browse tab), and all of the podcasts too (have to go to Podcasts instead of Music at top-left dropdown). For those of us on Macs, this will all change with the update to Mojave (Podcasts & Music are separate apps), and who knows the fate of iTunes on Windows ….
        Good luck!

  2. Thanks much for your work on this. I’m with you, if I want to hear the World at 6 why the sam hill do I need to fire up a web browser to listen? I’m going to use this with mplayer and scripts for a crude internet radio player.

    Thanks again!

  3. Neville, Like you I stream audio from CBC.ca or its French counterpart Radio-Canada.ca (R-C) in the background while on my PC. I like VLC because I can tweak sound with its equalizer, and can make the interface invisible with its “-I dummy” option. CBC and R-C cut their URLs at the end of July 2019, and R-C did it again a few days ago. I’m guessing it’s just a matter of time before CBC follows suit. I’ve been with CBC since 1969 so this hits me hard. Anyway I found how to fetch stream URLs. I use Pale Moon browser. Instructions:
    – navigate to a CBC or R-C stream, start the stream
    – when the stream is running, hit Ctrl-Shift-Q to bring up the “Developer/Network” pane
    – top left you’ll see 2 URLs. They repeat every few seconds
    – Click on the URL that doesn’t change. Its details are then displayed in the right pane
    – Right-click on the URL at the top of the right-hand pane, select “select all”
    – Right-click again on the URL at the top of the right-hand pane, select “copy”

    You have copied the URL for this stream. It works in VLC

    You will have something like this
    https://cbcliveradio-lh.akamaihd.net/i/CBCR1_MTL@360544/index_96_a-p.m3u8?sd=10&rebase=on
    CBC (English) streams all terminate with “/index_96_a-p.m3u8?sd=10&rebase=on”
    Cut what follows m3u8 so you have
    https://cbcliveradio-lh.akamaihd.net/i/CBCR1_MTL@360544/index_96_a-p.m3u8
    Optionally you can replace “index_96_a-p” with “master”, so you have
    https://cbcliveradio-lh.akamaihd.net/i/CBCR1_MTL@360544/master.m3u8
    which akso works. For now anyway.

    Enjoy

    1. Thanks Neville Park and Kevin Aris. Your posts and work were extremely useful.

      I am building a Raspberry Pi (and Arduino) internet radio and was struggling to have CBC play. The builds I was following use the Music Player Daemon (mpd) and mpc. Music Player Daemon (MPD) is a server-side application for playing music.

      For those using mpd and mpc I found that you should remove the “/master.m3u8” part of the url. For example here is the CBC Radio One Toronto url I use when I add a url to mpc: https://cbcliveradio-lh.akamaihd.net/i/CBCR1_TOR@118420/index_96_a-p.m3u8?sd=10&rebase=on

      Note that several places suggest building and changing mpd. I found this was not necessary – I used mod 0.21.25 (Sept. 1 2020) from https://www.musicpd.org/ and mpc version: 0.31

  4. I expect the browser requirement allows advertisements – there are no ads on CBC One, why do we have to have them when we stream through the web browser!

    So thank you for doing the groundwork on this – extremely useful!

  5. I use “Radio Tray”, a little tiny radio stream player for Linux written in Python that just sits on your taskbar. It doesn’t do anything other than play radio streams. It’s so lightweight that it’ll run on just about any old computer … I have it working on an old original Asus EeePC netbook which is about the size of most of those internet radio boxes and the machine has an old 900 MHz. Celeron processor with 512 MB RAM.

    Radio Tray stores everything in a simple “bookmarks.xml” file and so that makes it easy to copy the file from computer to computer. All my computers run Linux (yes even an iMac and MacBook Pro).

    I have literally hundreds of radio stations in my bookmarks.xml file from all over the place…so many that it’s actually quite a chore to keep them up to date!

    Since the recent change though I find a lot of timeouts on the CBC Radio streams. I was able to figure out all of the CBC Radio One and Two streams. I haven’t yet figured out the new streams on the Radio Canada side of things.

    You can figure out most radio streams in Firefox just by going to “Tools” and then “Web Developer” and then “Network”. There’s a little button in the box marked “Reload” to reload the web page that the streamlink is on, reload the page and then play the radio stream. You’ll find the “actual” stream URL in there most of the time.

    It’s a similar process in the Chrome/Chromium browsers.

    1. I love Radio Tray! Sadly it has stopped playing nicely with my particular OS, and the project seems to have been abandoned, so I had to find something else.

      I still have an old EeePC kicking around, running Lubuntu. Painstakingly themed LXDE to look like Windows 95. :D

  6. That’s true, it’s unmaintained but works :) Someone else has picked up the project as “Radio Tray-NG”. The database is stored in a JSON file instead of an XML file. Initially, to add stations to the JSON file meant manually editing the JSON file, which most folks would find a bit of a pain.

    They’ve added an editor now I understand. But I’m a bit lazy and have built such a large bookmarks.xml file for the old unmaintained version that I haven’t bothered :)

    Some Linux distros package the “old” Radio Tray (Debian and Ubuntu-based), others like Solus packages Radio Tray-NG, and Manjaro/Arch seem to package both of them. You can also install Radio Tray-NG using Flatpak on any distro.

    I guess, if you’re starting from scratch, you can give Radio Tray-NG a try. Me, I’ll probably keep using the old one until I can’t anymore :)

    But, I’m typing this from a 2007 vintage iMac running Lubuntu 18.04. Not using new computers is kind of a point of pride for me LOL!!! The price on this thing was right…a freebee rescued from heading to the Apple recycle store :)

    There’s another approach of course to doing it all yourself. It’s using applications that make use of the Community Radio Browser database as a “back end”.

    http://www.radio-browser.info/gui/#!/

    “RadioDroid” for Android implements it there. “Gradio” was the best implementation on Linux, but that’s been abandoned in favour of a “still in the works” application called “Shortwave”. There’s also a “Kodi” plugin that makes use of it.

  7. I just found a script on the Radio Tray-NG github page that will convert my “bookmarks.xml” file to a “bookmarks.json” file. I’ll have to re-arrange my file structure somewhat first, but I might try that and switch to Radio Tray-NG.

    1. The locations are the URLs in the .m3u, e. g. https://cbcliveradio-lh.akamaihd.net/i/CBCR1_TOR@118420/master.m3u8. Rather than MP3 streaming, CBC Music uses the HLS (HTTP Live Streaming) protocol. The stream is broken up into into multiple .ts files (each a few seconds long), which are then fed into the .m3u8 playlist file that delivers them to your computer in the right order.

      Hope this helps!

      1. Thank you for this information. It is going to help a great deal with my application. I’ll look at HLS and see how I can adapt it for my use. Stay Safe, my frien!

  8. I just did a fresh install of Ubuntu 20.04 and these m3u8 streams would not work in Rhythmbox until I installed ffmpeg.

    I had also installed ubuntu-restricted-extras but don’t know if that was necessary.

    I had also installed
    libdvdnav4
    libdvd-pkg
    gstreamer1.0-plugins-bad
    gstreamer1.0-plugins-ugly
    but I don’t know if they were necessary

Leave a Reply to thebadger2020 Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.