I’ve posted several times in the past about get_iplayer – a very useful set of scripts that allow you to download BBC iPlayer content for offline viewing. I’ve even written a MagPi article about it, which also appears in the Official Raspberry Pi Projects Book

There have been several software updates since then, but something broke some time over the last few months (I wasn’t watching closely) and get_iplayer now requires a manual install of FFMPEG or it won’t convert the downloaded .ts files to .MP4

I think what broke was that the file format changed to allow higher quality streams (or something like that) and the default avconv can’t handle the new format. So FFMPEG , which is no longer part of Debian (and hence Raspbian) needs to be installed manually to overcome this.

When I found that out I went “EEEEEEEEEEK” because I can remember, in the first weeks of Pi, having to compile FFMPEG , which took 10 hours on a Pi 1. I’m sure it would be a LOT faster on a Pi3. But, happily, we don’t have to do it because ccrisan has shared a pre-compiled .deb file on github

(Update May 2017- Jon Davies has now given us a one-line installation script which does everything for you – see below)

So I’m going to give a complete rundown of the get_iplayer installation with the new part at the end…

How Do I Install get_iplayer on my Pi? (updated May 2017, successfully retested 30 Oct 2018)

First update your packages…



sudo apt-get update

sudo apt-get upgrade



To install the repository, get-iplayer and its dependencies, paste this line into a terminal window:



wget http://packages.hedgerows.org.uk/raspbian/install.sh -O - | sh

To remove get-iplayer and the repository, paste this line into a terminal window:



wget http://packages.hedgerows.org.uk/raspbian/uninstall.sh -O - | sh

The script uses sudo for some tasks, which will ask for your password.

Both scripts use sudo for some tasks, which will ask for your password. If you want to know in advance what the script will do, see install.sh or uninstall.sh.

Then you should be good to go. Run it with… (Notice the program name is _ underscored, not – hyphenated.)



get_iplayer --help



This will give you a list of the basic usage options. If you want to see all of the advanced options as well…



get_iplayer --helplong



Basic Command Line Usage

That’s nice, but how do I get started? Typing…

get_iplayer planet gave this output…

So, supposing I want to download number 2688 Planet Earth II – Mountains…

get_iplayer --get 2688 --modes best ( --modes best gives you the best available quality)

After about 10-15 minutes the file “Planet_Earth_II_-_1._Islands_p048sflc_editorial.mp4” is downloaded and processed and can be watched using…



omxplayer Planet_Earth_II_-_1._Islands_p048sflc_editorial.mp4



(CTRL+C to exit)

And that’s about all there is to it. Have fun. :)

Usage Tips

Sometimes there is a discrepancy between the list provided by running get_iplayer and what’s on the BBC site. But it’s easy enough to circumvent…

e.g. the URL for the Eagle Has Landed used to be (they removed it now)…

http://www.bbc.co.uk/iplayer/episode/b00glr88/the-eagle-has-landed

b00glr88 is the programme id, so…

get_iplayer --pid=b00glr88 --modes best

would get you that programme.

The Boring Bit

If you download programmes using get_iplayer you are supposed to delete them after 30 days. get_iplayer will remind you to do this, but it doesn’t force you to.

To use iPlayer you must be located in the UK. More specifically, your IP address must be a UK registered one.

From 1st September 2016 you need a UK TV license to use iPlayer legally.