I'm looking for a command line program to listen to BBC radio live streams.
I'm a bit of a newbie with trying to do this and I'm a bit confused by the fact that all of the URLs I can find for 'streaming' are actually playlists.
But anyway, be that as it may, I have tried a couple of programs to listen to the .asx streams that seem to be the most readily available BBC streams with mostly rather poor results:-
mpg321 - doesn't seem to recognise URLs at all though the man page says it should.
mpg123 - recognises some URLs (in particular .pls ones) but doesn't appear to understand .asx.
mplayer - this manages to play .asx URLs but it's really a movie player and thus drags in far more bits and pieces than I want, playback is still choppy.
How much processor power and/or bandwidth is required to play a basic radio stream?
On 26 March 2012 19:21, Chris Green cl@isbd.net wrote:
I'm looking for a command line program to listen to BBC radio live streams.
Got a link for us?
mplayer - this manages to play .asx URLs but it's really a movie player and thus drags in far more bits and pieces than I want, playback is still choppy.
Come on, any "bits and pieces" it does actually "drag in" is worth it, as it's a really versatile (media) player.
-cache <kBytes> This option specifies how much memory (in kBytes) to use when precaching a file or URL. Especially useful on slow media.
How much processor power and/or bandwidth is required to play a basic radio stream?
That's actually a "how long is a piece of string" question, in disguise. It would depend on your hardware, what else is running, the bitrate and codec of the media, the network bandwidth and latencies, and probably lots of other metrics. And also by your definition of a "basic radio stream" :)
Not sure if streamripper deals with such streams, but could be worth a try?
-Srdjan
On Mon, Mar 26, 2012 at 08:38:23PM +0100, Srdjan Todorovic wrote:
On 26 March 2012 19:21, Chris Green cl@isbd.net wrote:
I'm looking for a command line program to listen to BBC radio live streams.
Got a link for us?
Well sort of, but I don't care what sort of stream it is as long as it works. The easiest BBC ones to find are .asx ones like:-
http://www.bbc.co.uk/radio/listen/live/r4.asx
mplayer - this manages to play .asx URLs but it's really a movie player and thus drags in far more bits and pieces than I want, playback is still choppy.
Come on, any "bits and pieces" it does actually "drag in" is worth it, as it's a really versatile (media) player.
I've not tried but will it run on a system that doesn't have X? (I will try, but just at the present that system seems to have a problem seeing the Ubuntu repositories).
-cache <kBytes> This option specifies how much memory (in kBytes) to use when precaching a file or URL. Especially useful on slow media.
How much processor power and/or bandwidth is required to play a basic radio stream?
That's actually a "how long is a piece of string" question, in disguise. It would depend on your hardware, what else is running, the bitrate and codec of the media, the network bandwidth and latencies, and probably lots of other metrics. And also by your definition of a "basic radio stream" :)
Well my acer aspire seems to have problems with a simple audio stream.
Not sure if streamripper deals with such streams, but could be worth a try?
But I don't want to record them, I just want to listen live. This is what seems so odd, that stations are not available as a raw stream to play, they send a playlist. I don't want or need any extra information with the news on Radio 4 (or the Today program, or anything), I just want to listen to the program.
On Mon, Mar 26, 2012 at 07:21:03PM +0100, Chris Green wrote:
I'm looking for a command line program to listen to BBC radio live streams.
Have you had a look at get_iplayer? It appears to be able to stream through mplayer with a cache to stop the choppiness. There are instructions at the top of the man page.
Richard
On Mon, Mar 26, 2012 at 09:07:44PM +0100, richard.lee.parsons@gmail.com wrote:
On Mon, Mar 26, 2012 at 07:21:03PM +0100, Chris Green wrote:
I'm looking for a command line program to listen to BBC radio live streams.
Have you had a look at get_iplayer? It appears to be able to stream through mplayer with a cache to stop the choppiness. There are instructions at the top of the man page.
I'm about to have a play with it, I'll report success/failure! :-)
On 26-Mar-2012 Chris Green wrote:
On Mon, Mar 26, 2012 at 09:07:44PM +0100, richard.lee.parsons@gmail.com wrote:
On Mon, Mar 26, 2012 at 07:21:03PM +0100, Chris Green wrote:
I'm looking for a command line program to listen to BBC radio live streams.
Have you had a look at get_iplayer? It appears to be able to stream through mplayer with a cache to stop the choppiness. There are instructions at the top of the man page.
I'm about to have a play with it, I'll report success/failure! :-)
Chris Green
Yes plaese! I've use get_iplayer successfully in the (increasingly distant) past, but then the BBC "moved on" while my get_iplayer didn't! I'd be very interested in news about updates.
Ted.
------------------------------------------------- E-Mail: (Ted Harding) Ted.Harding@wlandres.net Date: 26-Mar-2012 Time: 22:09:11 This message was sent by XFMail -------------------------------------------------
On Mon, Mar 26, 2012 at 10:09:14PM -0000, Ted Harding wrote:
On 26-Mar-2012 Chris Green wrote:
On Mon, Mar 26, 2012 at 09:07:44PM +0100, richard.lee.parsons@gmail.com wrote:
On Mon, Mar 26, 2012 at 07:21:03PM +0100, Chris Green wrote:
I'm looking for a command line program to listen to BBC radio live streams.
Have you had a look at get_iplayer? It appears to be able to stream through mplayer with a cache to stop the choppiness. There are instructions at the top of the man page.
I'm about to have a play with it, I'll report success/failure! :-)
Chris Green
Yes plaese! I've use get_iplayer successfully in the (increasingly distant) past, but then the BBC "moved on" while my get_iplayer didn't! I'd be very interested in news about updates.
Well my basic reaction after running it was - what now?
Presumably to play something I would do:-
get_iplayer --type=liveradio --stream http://www.bbc.co.uk/iplayer/console/bbc_radio_fourfm | mplayer -cache 3072 -
... and that sort of works, but:-
It takes ages to start up as it fills the cache, not really what I'd call 'live' radio!
It still has buffering problems
... and finally it manages:-
Opening video decoder: [raw] RAW Uncompressed Video RAW: depth 0 not supported VDecoder init failed :( Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family [IMGUTILS @ 0x620b14]Picture size 0x0 is invalid Selected video codec: [ffrawyuy2] vfm: ffmpeg (RAW YUY2) ========================================================================== ========================================================================== Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders AUDIO: 44100 Hz, 2 ch, s16le, 0.0 kbit/0.00% (ratio: 0->176400) Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio)) ========================================================================== AO: [pulse] Init failed: Connection refused Failed to initialize audio driver 'pulse' AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample) Starting playback...
Too many audio packets in the buffer: (4096 in 1521457 bytes). Maybe you are playing a non-interleaved stream/file or the codec failed? For AVI files, try to force non-interleaved mode with the -ni option. A: 0.5 V: 0.0 A-V: 0.500 ct: -0.008 0/ 0 ??% ??% ??,?% 1960 0 0%
************************************************ **** Your system is too SLOW to play this! **** ************************************************
Possible reasons, problems, workarounds: - Most common: broken/buggy _audio_ driver - Try -ao sdl or use the OSS emulation of ALSA. - Experiment with different values for -autosync, 30 is a good start. - Slow video output - Try a different -vo driver (-vo help for a list) or try -framedrop! - Slow CPU - Don't try to play a big DVD/DivX on a slow CPU! Try some of the lavdopts, e.g. -vfm ffmpeg -lavdopts lowres=1:fast:skiploopfilter=all. - Broken file - Try various combinations of -nobps -ni -forceidx -mc 0. - Slow media (NFS/SMB mounts, DVD, VCD etc) - Try -cache 8192. - Are you using -cache to play a non-interleaved AVI file? - Try -nocache. Read DOCS/HTML/en/video.html for tuning/speedup tips. If none of this helps you, read DOCS/HTML/en/bugreports.html.
^C 29.0 V: 0.0 A-V: 29.001 ct: -0.007 0/ 0 ??% ??% ??,?% 161022 0 15%
MPlayer interrupted by signal 2 in module: av_sync A: 29.0 V: 0.0 A-V: 29.002 ct: -0.007 0/ 0 ??% ??% ??,?% 161023 0 15%
MPlayer interrupted by signal 2 in module: enable_cache
INFO: Cleaning up (signal = INT), killing PID=3441:. Caught signal: 2, cleaning up, just a second... ERROR: RTMP_ReadPacket, failed to read RTMP packet header Download may be incomplete (downloaded about 0.00%), try resuming
"Your system is too SLOW to play this!" - surely I don't need so much computer power just to play an audio stream!? The computer in question has 1Gb of memory and a 2xIntel Atom Z520 1.33GHz processor.
I've tried '-nocache' and that does seem to make it nearly usable, though it still takes an age to start up.
Well I have a solution, it's not a command line program but does everything else I need - it's called radiotray.
I think it confirms my faith in the old Unix philosophy of small tools that do one thing well. *All* it does is play internet radio streams, no attempt at a GUI (it's a tray app, hence its name), the whole interface is just a way to build a list of station names and a way to select one.
It plays the BBC's .asx streams 'out of the box'.
On 27/03/12 11:19, Chris Green wrote:
Well I have a solution, it's not a command line program but does everything else I need - it's called radiotray.
I think it confirms my faith in the old Unix philosophy of small tools that do one thing well. *All* it does is play internet radio streams, no attempt at a GUI (it's a tray app, hence its name), the whole interface is just a way to build a list of station names and a way to select one.
It plays the BBC's .asx streams 'out of the box'.
It doesn't for me so can somebody help point me in the right direction please?
It plays 'Classic Rock' ok but tells me 'Your GStreamer installation is missing a plugin' when trying the Radio 4 link Chris G posted earlier.
But I'm stumped when it comes to deciding *which* plugin I need. I've just installed a load of them in the hope that it would solve the problem but it didn't.
On 27/03/12 12:30, Chris Walker wrote:
It plays 'Classic Rock' ok but tells me 'Your GStreamer installation is missing a plugin' when trying the Radio 4 link Chris G posted earlier.
But I'm stumped when it comes to deciding *which* plugin I need. I've just installed a load of them in the hope that it would solve the problem but it didn't.
It works for me playing http://www.bbc.co.uk/radio/listen/live/r4.asx
Perhaps you could try the stream in another radio player, e.g. rhythmbox, and maybe that would say which plugin was missing?
You may find this repository http://packages.medibuntu.org useful for plugins.
And for finding radio feeds, http://www.radiofeeds.co.uk is very useful.
HTH Steve
On 27/03/12 13:34, steve-ALUG@hst.me.uk wrote:
On 27/03/12 12:30, Chris Walker wrote:
It plays 'Classic Rock' ok but tells me 'Your GStreamer installation is missing a plugin' when trying the Radio 4 link Chris G posted earlier.
But I'm stumped when it comes to deciding *which* plugin I need. I've just installed a load of them in the hope that it would solve the problem but it didn't.
It works for me playing http://www.bbc.co.uk/radio/listen/live/r4.asx
Perhaps you could try the stream in another radio player, e.g. rhythmbox, and maybe that would say which plugin was missing?
That link plays in VLC but won't play i.e. I don't get any errors but likewise, I don't hear any output from SMPlayer. But, if I 'Open a URL' in SMPLayer and paste in the full link, it *does* play. That seems to suggest that the gstreamer thing is a red herring.
You may find this repository http://packages.medibuntu.org useful for plugins.
I'm running Mandriva 2011.0 64 bit in case that changes things.
And for finding radio feeds, http://www.radiofeeds.co.uk is very useful.
I've looked there and added a few others. Having done so and tried again, this feed (a .asx feed) http://www.977music.com/tunein/web/classicrock.asx plays but still the same error when trying any of the BBC feeds.
Is there a log file anywhere that might give me a clue as to what's wrong?
On 27/03/12 14:42, Chris Walker wrote:
On 27/03/12 13:34, steve-ALUG@hst.me.uk wrote:
It works for me playing http://www.bbc.co.uk/radio/listen/live/r4.asx
Perhaps you could try the stream in another radio player, e.g. rhythmbox, and maybe that would say which plugin was missing?
That link plays in VLC but won't play i.e. I don't get any errors but likewise, I don't hear any output from SMPlayer. But, if I 'Open a URL' in SMPLayer and paste in the full link, it *does* play. That seems to suggest that the gstreamer thing is a red herring.
I find VLC will play things that others can't. From that point of view, it's not very useful using it to work out what's missing. That's why I suggested Rhythmbox, as ISTR that that gives you a message and suggests downloading codecs & stuff if there's a problem. At least that's what I recall it doing under Ubuntu.
You may find this repository http://packages.medibuntu.org useful for plugins.
I'm running Mandriva 2011.0 64 bit in case that changes things.
Yes, medibuntu won't be any use. Sorry, I just assumed which distro you'd be using. Silly me!
[]
Is there a log file anywhere that might give me a clue as to what's wrong?
Probably, no clue where tho!
Steve
On 27/03/12 13:34, steve-ALUG@hst.me.uk wrote:
And for finding radio feeds, http://www.radiofeeds.co.uk is very useful.
I've had another look there for Radio 2 and it's now playing using the 'aacPlus and AAC' link so although the .asx feed doesn't work for me, this link does so I'm happy to leave it there for now. The sunshine is beckoning so I'm off to do some gardening and computing will have to wait for an hour or two.
Thanks for your help.
On Tue, Mar 27, 2012 at 12:30:06PM +0100, Chris Walker wrote:
On 27/03/12 11:19, Chris Green wrote:
Well I have a solution, it's not a command line program but does everything else I need - it's called radiotray.
I think it confirms my faith in the old Unix philosophy of small tools that do one thing well. *All* it does is play internet radio streams, no attempt at a GUI (it's a tray app, hence its name), the whole interface is just a way to build a list of station names and a way to select one.
It plays the BBC's .asx streams 'out of the box'.
It doesn't for me so can somebody help point me in the right direction please?
It plays 'Classic Rock' ok but tells me 'Your GStreamer installation is missing a plugin' when trying the Radio 4 link Chris G posted earlier.
But I'm stumped when it comes to deciding *which* plugin I need. I've just installed a load of them in the hope that it would solve the problem but it didn't.
The ones I have installed are:-
gstreamer0.10-fluendo-mp3 gstreamer0.10-pulseaudio gstreamer0.10-ffmpeg gstreamer0.10-alsa gstreamer0.10-gnomevfs gstreamer0.10-plugins-good gstreamer0.10-plugins-base gstreamer0.10-plugins-ugly
I think it may be gstreamer0.10-plugins-ugly that you need for .asx streams.
On 27/03/12 15:46, Chris Green wrote:
On Tue, Mar 27, 2012 at 12:30:06PM +0100, Chris Walker wrote:
On 27/03/12 11:19, Chris Green wrote:
It plays the BBC's .asx streams 'out of the box'.
It doesn't for me so can somebody help point me in the right direction please?
But I'm stumped when it comes to deciding *which* plugin I need. I've just installed a load of them in the hope that it would solve the problem but it didn't.
The ones I have installed are:-
gstreamer0.10-fluendo-mp3 gstreamer0.10-pulseaudio gstreamer0.10-ffmpeg gstreamer0.10-alsa gstreamer0.10-gnomevfs gstreamer0.10-plugins-good gstreamer0.10-plugins-base gstreamer0.10-plugins-ugly
I think it may be gstreamer0.10-plugins-ugly that you need for .asx streams.
I've installed a further 2 of those and now it plays the BBC Radio 2 stream.
Thanks for the help.
On 27/03/12 11:19, Chris Green wrote:
Well I have a solution, it's not a command line program but does everything else I need - it's called radiotray.
Just to say thanks for posting this - for ages now I've been trying (on and off) to get BBC 6 Music to play via the flash RadioPlayer thingy on the BBC's website, to no avail. My Flash plugin on Firefox is up to date and all that, but it never worked and I just never got round to investigating further.
However, this little application worked brilliantly first time, once I'd added the stream (AAC 128k). Cheers!
Simon