LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Listen to live Radio with Linux (https://www.linuxquestions.org/questions/linux-newbie-8/listen-to-live-radio-with-linux-716668/)

howto 04-03-2009 04:44 PM

Listen to live Radio with Linux
 
I would like to listen to the Canadian Broadcasting Corporation's (CBC)live broadcast.
I am running Firefox on Kubuntu and I have several multimedia applications (mplayer, Helix, Kaffeine, RealPlayer, and VCL), but none will play the live stream.

CBC gives the following information on their web site:
Live CBC Radio Streaming

In August 2004, CBC.ca moved to one standard media player for live streaming - Windows Media Player.

Windows Media player is currently the most commonly used format in the marketplace and using this format allows CBC.ca to deliver live radio streaming to the widest possible audience. Further, by supporting only one commonly used media player (Windows Media), we can direct more technical support and resources behind this standard format and use the efficiencies to offer more radio streams to more Canadians, both at home and abroad.

CBC.ca continues to offer on-demand audio and video clips using RealPlayer. We constantly evaluate new streaming formats and welcome audience feedback. Please contact CBC Audience Relations if you have suggestions or comments.

CBC.ca
How can I make any of my players work in this case?

repo 04-03-2009 04:49 PM

you can install the Windows Media Player Plug-in
http://kdekorte.googlepages.com/gecko-mediaplayer

Here I can hear the streams, no problem
debian testing
firefox 3.1b3

Windows Media Player Plug-in

File name: /usr/lib/mozilla/plugins/gecko-mediaplayer-wmp.so
Gecko Media Player 0.9.4

Video Player Plug-in for QuickTime, RealPlayer and Windows Media Player streams using MPlayer

thorkelljarl 04-03-2009 06:33 PM

Or...

There is a media connectivity plug in for Foxfire that works well for most all players. I use it with vlc and smplayer (mplayer with a front end), but have used it with realplayer as well.

https://addons.mozilla.org/en-US/firefox/addon/446

howto 04-03-2009 08:37 PM

Listen to live Radio with Linux
 
Quote:

Originally Posted by repo (Post 3497748)
you can install the Windows Media Player Plug-in
http://kdekorte.googlepages.com/gecko-mediaplayer

Here I can hear the streams, no problem
debian testing
firefox 3.1b3

Windows Media Player Plug-in

File name: /usr/lib/mozilla/plugins/gecko-mediaplayer-wmp.so
Gecko Media Player 0.9.4

Video Player Plug-in for QuickTime, RealPlayer and Windows Media Player streams using MPlayer


Windows Media Player Plug-in is installed.
When trying to listen to Radio, it will try to connect and then displays: Stopped. When I press the play button, again it tries to connect and then it stops. Any ideas?

mrclisdue 04-03-2009 09:43 PM

Amazingly, it was just yesterday that I went through all this, and today you find yourself in the same situation.

In my case, this is the best solution -

There are ogg streams for cbc radio here:

http://www.cbc.ca/listen/ogg.html

These streams play equally well with mplayerplug-in, mplayer, xine.

Other things I tried:

There are urls for all the streams here:

http://www.cbc.ca/listen/streams.html

However, I can't play them with anything but xine.

Using the mediaconnectivity plugin, I'm unable to actually play anything from the main cbc.ca radio site (the one where you're just supposed to click on a link, & listen), however, I'm able to get the link info which looks something like this:

Code:

mms://a809.l961736808.c9617.g.lm.akamaistream.net/D/809/9617/v0001/reflector:36808
and that link will play in mplayer & xine.

To recap, the ogg is the easiest, but you're limited to two possible streams, both eastern, but 32bit stereo.

The scenario where the urls listed in the second link won't play using mplayerplugin (and quite possibly with the gecko-plugin) *probably* comes down to an mplayer configuration issue - I remember in the past having issues, and solving them, but I can't recall what that solution was.

Anyway, hope this helps, ymmv.

cheers,

howto 04-04-2009 12:39 PM

mrclistue
Thanks for your thoughts. I tried the ogg streams you indicated and they play, although so far only with xine.

pwalden 04-04-2009 02:26 PM

I can play the ogg stream via mplayer.

Code:

$ mplayer -playlist http://www.cbc.ca/livemedia/cbcr1-toronto.m3u

Mplayer has some problems with the windows media streams. It looks like it is a problem with their asx redirect. They use a doubly wrapped playlist, ie a playlist pointing to another playlist. If I use wget to get the first one, then I can play the playlist wrapped inside:

Code:

[pwalden@walden4 ~]$ wget http://www.cbc.ca/livemedia/cbcr1-edmonton-low.asx
--2009-04-04 12:18:08--  http://www.cbc.ca/livemedia/cbcr1-edmonton-low.asx
Resolving www.cbc.ca... 96.17.108.24, 96.17.108.8
Connecting to www.cbc.ca|96.17.108.24|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 129 [video/x-ms-asf]
Saving to: `cbcr1-edmonton-low.asx'

100%[======================================>] 129        --.-K/s  in 0s     

2009-04-04 12:18:08 (2.88 MB/s) - `cbcr1-edmonton-low.asx' saved [129/129]

[pwalden@walden4 ~]$ cat cbcr1-edmonton-low.asx
<ASX VERSION="3.0">
 <ENTRY>
  <REF HREF="http://mfile2.akamai.com/9616/live/reflector:37886.asx?bkup=37887" />
 </ENTRY>
</ASX>
[pwalden@walden4 ~]$ mplayer -playlist http://mfile2.akamai.com/9616/live/reflector:37886.asx?bkup=37887
MPlayer SVN-r28461-4.3.0 (C) 2000-2009 MPlayer Team
CPU: AMD Athlon(tm) Processor (Family: 6, Model: 2, Stepping: 1)
Resolving mfile2.akamai.com for AF_INET...
Connecting to server mfile2.akamai.com[96.17.107.27]: 80...
STREAM_ASF, URL: http://mfile2.akamai.com/9616/live/reflector:37886.asx?bkup=37887
Resolving mfile2.akamai.com for AF_INET...
Connecting to server mfile2.akamai.com[96.17.107.27]: 80...
size_confirm mismatch!: 22611 20047
Error while parsing chunk header
Failed, exiting.
Resolving mfile2.akamai.com for AF_INET...
Connecting to server mfile2.akamai.com[96.17.107.40]: 80...
Cache size set to 320 KBytes
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing mms://a1887.l961637886.c9616.g.lm.akamaistream.net/D/1887/9616/v0001/reflector:37886.
STREAM_ASF, URL: mms://a1887.l961637886.c9616.g.lm.akamaistream.net/D/1887/9616/v0001/reflector:37886
Resolving a1887.l961637886.c9616.g.lm.akamaistream.net for AF_INET...
Connecting to server a1887.l961637886.c9616.g.lm.akamaistream.net[209.170.97.7]: 1755...
Connected
unknown object
unknown object
file object, packet length = 671 (671)
unknown object
stream object, stream ID: 1
unknown object
unknown object
data object
mmst packet_length = 671
Cache size set to 320 KBytes
Cache fill: 17.50% (57344 bytes) 
ASF file format detected.
[asfheader] Audio stream found, -aid 1
Clip info:
 name: CBC Radio One Edmonton
 author: www.cbc.ca
 copyright: (C) Canadian Broadcasting Corporation
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 16000 Hz, 1 ch, s16le, 16.0 kbit/6.25% (ratio: 2000->32000)
Selected audio codec: [ffwmav2] afm: ffmpeg (DivX audio v2 (FFmpeg))
==========================================================================
AO: [pulse] 16000Hz 1ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A:1397291.6 (388:08:11.6) of 2133437440.0 (-24.-8)  0.5% 16%                   
Exiting... (Quit)



All times are GMT -5. The time now is 02:20 PM.