get_iplayer v2.04 now has very much simplified Live TV and Radio support.
Two new programme types have been added: ‘livetv’ and ‘liveradio’. These types, if selected, will list the available programmes in the familiar listing format:
get_iplayer --type=livetv
Matches:
80000: BBC Four - live
80001: BBC News 24 - live
80002: BBC One - live
80003: BBC Parliament - live
80004: BBC Three - live
80005: BBC Two - live
80006: CBBC - live
80007: CBeebies - live
INFO: 8 Matching Programmes
Or you can just search, stream or playback by channel/programme name:
get_iplayer --type=liveradio 'Radio 1'
Matches:
80132: BBC Radio 1 - live
INFO: 1 Matching Programmes
To directly stream a selected live programme in all OSes (except Win32) you can use:
get_iplayer --stream 80001 --player='mplayer -cache 256 -'
Where –player can refer to any player command than can play programmes from STDIN. Or simply use:
get_iplayer --stream 80001 | mplayer -cache 256 -
The advantage of the –player option is that it can be saved in your default options as follows:
get_iplayer --prefs-add --player='mplayer -cache 256 -'
Then you can just stream via mplayer using:
get_iplayer --stream 80001
( –stream is just a synonym for –stdout –nowrite )
To record a live stream use:
get_iplayer --get 80001
Specifying modes has changed a little. –amode has become –radiomode and –vmode is now –tvmode. Additionally, –modes=<modelist> can be used to set a general default set of modes for all programme types.
Likewise, embedded media web pages can be played more easily. e.g.:
get_iplayer --stream --type=radio
--url="http://www.bbc.co.uk/robertburns/works/a_bards_epitaph/"
Or recorded using:
get_iplayer --get --type=radio
--url="http://www.bbc.co.uk/robertburns/works/a_bards_epitaph/"
The only major thing I’ve not been able to get working is direct streamed playback under native Windows. If anyone knows why it won’t work or has a fix or workaround please let me know! I’ve tried with ‘vlc -‘, ‘ffplay -‘ and ‘mplayer -‘ and all seem to just fail.