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.