Category: Linux

Jul 27 2010

Firstly I must apologise to all of those people who have posted information regarding the continued development of get_iplayer which I hadn’t approved on the comment threads. Well, here is the information which I have summarised below:

  • get_iplayer appears to have been taken over by several other developers. One of the strengths of free open source software is that anyone can ‘fork’ a project as long as they abide by the license conditions (get_iplayer was released under the GPLv3).
  • The most active and up to date fork, which seems to work the best, is maintained by David Woodhouse at: http://www.infradead.org/get_iplayer/html/get_iplayer.html
  • There is a mailing list at http://lists.infradead.org/mailman/listinfo/get_iplayer
  • A windows installer is available at this site.
  • Fedora users will be pleased to know that get_iplayer is now available in RPM Fusion repos.
Mar 10 2010

The events of the past two weeks (here, here, here, here and here) have clarified the BBC’s stance on allowing interoperability with open-source iPlayer clients. I have therefore decided to withdraw get_iplayer with immediate effect.

Ian Hunter’s post (Managing Editor, BBC Online) provided very clear guidance on the way the BBC feels about open-source applications accessing iPlayer streams. I have no desire act against the BBC’s wishes in this respect.

The BBC iPlayer is built on many open-source products and yet, in this case, they have failed to let open-source clients access the very same service. The BBC have clearly not followed the spirit of open-source here.

From the outset, exactly 2 years ago when I developed get_iplayer, my intentions have been to never harm the BBC but to just provide a convenient way for me to watch iPlayer programmes on my TV with the hardware that I own. However, the BBC clearly considers such methods to be somehow detrimental to their service and therefore with great regret I have decided to cease development.

I sincerely hope that, in the future, the BBC will make steps to support open source given that they have gained so much from it.

Dec 20 2009

I’ve just released a fixed get_iplayer v2.50 so that you can now get the iphone streams once again. This is because the BBC appear to have changed (simplified) the method for iphone http streaming as of a few days ago. The freeze still stands so hopefully this will be the only critical fix before next year.

Nov 14 2009

A new major version of flvstreamer has been released. After some testing it would seem that it fixes quite a number of problems that get_iplayer users have been experiencing for the past few weeks since Akamai (one of the BBC’s content delivery network providers) started upgrading all their Flash Media Servers to v3.5.x. BBC Live TV now works better and many other bugs are reported to have been fixed. It also now auto-retries failed streams and fixes the bug where recording 1+ hour BBC radio flash streams always had to be resumed.

If you are using the Windows Installer for get_iplayer then just download it again and re-run it to get the new flvstreamer and ensure you choose the cygwin based flvstreamer.

Jul 24 2009

This is a follow-up to the post a few days ago. It is now much easier to get those AAC streams on your SqueezeBox.
It is now possible to navigate and play the High quality (up to 192kbps) AAC BBC iPlayer Radio and Live Radio streams on your Squeezebox by mean of an OPML playlist.

Just add the following URL to your favourites in SqueezeCenter and then navigate to the Favourites on the SqueezeBox remote an you will see a three-level menu of Channel -> Programme Name -> Programme for iPlayer Radio. You need to be running get_iplayer PVR Manager v0.24 or later. This has only been tested on Linux and may work on OSX and Windows.

http://[SERVER IP]:1935/opml?PROGTYPES=radio&MODES=flash,iphone&LIST=channel

To list all the Live iPlayer Radio channels add this to your SqueezeBox favourites:

http://[SERVER IP]:1935/opml?PROGTYPES=liveradio&OUTTYPE=wav

Finally, to only show those numbered BBC Radio stations:

http://[SERVER IP]:1935/opml?PROGTYPES=liveradio&MODES=flash&SEARCH=%20\d&OUTTYPE=wav

Update: Now works on windows except for realaudio mode. Ensure you use flvstreamer v1.8h or later.

Jul 23 2009

With the latest experimental release of get_iplayer PVR Manager you can now use to browse and play almost any BBC iPlayer programme directly from VLC‘s playlist. This functionality of get_iplayer PVR Manager should work on Linux/Unix, MacOSX and Windows.

Just download and run get_iplayer PVR manager as described in yesterdays post

Next, using VLC to open a URL such as:

http://127.0.0.1:1935/playlist?PROGTYPES=liveradio

You will get an automatically generated playlist for the programme type you selected.

Valid programme types are:

  • tv
  • radio
  • livetv
  • liveradio

Open the playlist in the vlc GUI and you will see all of the available programmes.

Just click on one and it will start playing after a few seconds.

There are many more examples and detailed usage in the comments at the top of the get_iplayer.cgi script if you are interested.

I haven’t tried opening the playlists in anything other than mplayer and vlc so far. When I get a chance I’ll try them out on the Squeezebox also.

Let me know if you get this working on any other players or if you find any other novel uses for it.

Update: Now works on windows except for realaudio channels. Ensure you use flvstreamer v1.8h or later.

Jul 22 2009


Update: See Part II of this post – all this has been improved and simplified…

I’ve been playing with get_iplayer PVR Manager (get_iplayer.cgi) on Linux (although it works on MacOSX and Windows also). It can now also act as an RTMP proxy to allow simple streaming of any flashaac radio or liveradio BBC iPlayer programme to a Slim Devices / Logitech Squeezebox (SBII or better). WARNING: This is still alpha quality experimental code….

All you need to do is:
Install and start the get_iplayer PVR Manager:

  • download get_iplayer.cgi from SVN (see the get_iplayer PVR Manager page)
  • Ensure you have flvstreamer installed and it’s location saved in your options
  • Ensure ffmpeg is installed and in the system PATH
  • Start it on your Linux server:
    perl get_iplayer.cgi –port=1935 –getiplayer=/path/to/get_iplayer –ffmpeg=/path/to/ffmpeg

Now configure the Squeezebox:

  • Go to the Squeezecenter page for your Squeezebox
  • Add a Favourite with the streaming URL. e.g. http://[server_ip_address]:1935/?ACTION=stream&PROGTYPES=liveradio&PID=bbc_radio_one&MODES=flashaac&OUTTYPE=a.wav
  • Go to your Squeezebox remote control or web page and play the favourite you have added.
  • Sit back and listen to much higher quality Radio at up to 192kbps AAC on your Hi-Fi

Similarly you can stream all sorts of programmes and modes on other http based media players. e.g.:

* Stream flash AAC liveradio as 320k mp3 stream:

vlc "http://localhost:1935/?ACTION=stream&PROGTYPES=liveradio&PID=[PID]&BITRATE=320&MODES=flashaac\
  &OUTTYPE=nnn.mp3"

* Stream flash livetv as an flv stream:

vlc "http://localhost:1935/?ACTION=stream&PROGTYPES=livetv&PID=[PID]&MODES=flashnormal\
  &OUTTYPE=nnn.flv"

* Stream flash AAC liveradio as a raw wav stream:

vlc "http://localhost:1935/?ACTION=stream&PROGTYPES=liveradio&PID=[PID]&MODES=flashaac\
  &OUTTYPE=nnn.wav"

* Stream tv as a quicktime stream:

mplayer "http://localhost:1935/?ACTION=stream&PROGTYPES=tv&PID=[PID]&MODES=iphone\
  &OUTTYPE=nnn.mov" -cache 2048

* Stream iphone radio as http mp3 stream:

vlc "http://localhost:1935/?ACTION=stream&PROGTYPES=radio&PID=[PID]&MODES=iphone\
  &OUTTYPE=nnn.mp3"

* Stream flash mp3 radio as http flac stream:

vlc "http://localhost:1935/?ACTION=stream&PROGTYPES=radio&PID=[PID]&MODES=flashaudio\
  &OUTTYPE=nnn.flac"

***PLEASE REWRITE THE DOUBLE QUOTES – this blog mangles them***

The valid [PID]s for any programme type can be determined by running:

get_iplayer –info [usual search terms]

Update (July 30th 2009): I changed SEARCH= to PID= in the latest version…Also updated to use new cmdline options. Also now works in Windows with the latest Automated Installer.
Update (September 18th 2009): I changed streaming URLs for the latest version.

Jun 25 2009

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.

Jun 10 2009

As of today, not only can you watch/record live BBC TV and Radio as described in my earlier post, you can now also record/watch BBC embedded videos and Live streams. Yes, you can now watch the tennis Live!

Remember to update to flvstreamer v1.8 or later.

To do this just use the following examples (not in Win32):

get_iplayer –pid ‘tv:<URL>’ –stream | mplayer -cache 512 -

OR

get_iplayer –pid ‘tv:<URL>’ –stream | vlc -

Or to record an embedded video (all OSes):

get_iplayer –type=tv –url='<URL>’

Where <URL> is a URL with an embedded video player like: http://news.bbc.co.uk/sport1/hi/tennis/8091015.stm

The ‘modes’ used by the BBC embedded media player streams in ‘flashnormal’ so you may need to add ‘–modes=flashnormal’ if you don’t normally have that in your mode list.

Jun 09 2009

After many requests I have eventually given in and added Live stream support for BBC iPlayer TV and Radio. So now you don’t need to playback TV in a browser – you can use the video player of your choice. The Radio streams are of fantastic quality especially when not played back in adobe flash player – well done BBC! The Flash AAC radio quality is between 128-192 kbps and the TV is either 512×288 or 640×360 resolution at between 512-800 kbps.

Remember that you do need a TV License to legally record or watch any Live TV streams in the UK. The Live support does require flvstreamer v1.8 or later(rtmpdump v1.6 is not as reliable with these streams). The below examples assume that the tool is in your path already. If not then add it using ‘–flvstreamer=/path/to/flvstreamer’. As a side note, rtmpdump 1.5/1.5a, albeit somewhat unreliable, will work only if you want to record the live streams or listen to Live Radio – direct TV playback does not want to work on those older versions.

Live BBC iPlayer TV

To watch BBC iPlayer TV channels via mplayer, for example, use:

get_iplayer –pid tv:bbc_one –stdout –nowrite | mplayer -cache 512 -

Or

get_iplayer –pid tv:<iPlayer Channel URL> –stdout –nowrite | mplayer -cache 512 -

Or to record a Live programme:
Where <iPlayer Channel URL> is a URL like: http://www.bbc.co.uk/iplayer/radio/bbc_radio_one or http://www.bbc.co.uk/iplayer/playlive/bbc_radio_one/

get_iplayer –pid tv:bbc_one

The ‘vmode’ used by the BBC iPlayer TV Live streams in ‘flashnormal’ so you may need to add ‘–vmode=flashnormal’ if you don’t normally have that in your vmode list.

Live BBC iPlayer Radio

To listen to BBC iPlayer Radio channels via mplayer, for example, use:

get_iplayer –pid radio:bbc_radio_one –amode=flashaac –stdout –nowrite | mplayer -cache 128 -

Or

get_iplayer –pid radio:<iPlayer Channel URL> –amode=flashaac –stdout –nowrite | mplayer -cache 128 -

Or to record a Live programme:

get_iplayer –pid radio:bbc_one –amode=flashaac

Please not that the recording and streaming will not stop after the end of a programme – it is perpetual.

Other Media Players

The recorded live streams will playback on any media player that can decode flv streams. So far I’ve successfully managed to get them playing back on xine, vlc and mplayer on Linux. I’ve not tried the various players on Windows or MacOSX.
I tried to playback th live TV streams directly with those players and found that both mplayer and xine were successful. I had trouble getting vlc to work without stuttering because I couldn’t figure out how to set the buffer/cache size. For xine use: ‘| xine stdin:/’.
The direct audio playback seems to work on mplayer and vlc only although vlc does result in slightly glitchy playback compared with mplayer.
Let me know below if you manage to get other media players to work.

Converting flv Streams

Convert Audio losslessly:

ffmpeg -i infile.flv -vn -acodec copy -y outfile.m4a

Convert video flv to avi losslessly:

ffmpeg -i infile.flv -vcodec copy -acodec copy -y outfile.avi

WordPress Themes