When I want to watch stuff on the BBC iPlayer I normally use the website. Being a Ubuntu user, the official desktop client is of no use to me. I did have it working a couple of years ago, while I was at university (downloading being the only way to deal with the incredibly slow internet, which was useless for streaming), but several months ago I came to use it and it didn’t work any more. As I remember it, it was quite an annoying thing to get working, as it relied on Adobe Air and Flash, two things which were pretty difficult to get working right on 64-bit Linux. Anyway, a month or so back, I wanted to watch a programme on the iPlayer which was only a few hours from being removed off the website, but I didn’t have time to watch it right then. So I needed to find a way to download it. I’d read a little bit about get_iplayer before, but it was only then, in my hour of need, that I chose to install it. Once I’d done so, via Synaptic as it’s in the Ubuntu repositories, I opened a terminal and tried to figure out how to use it. Typing
get_iplayer --help didn’t help much though, as the number of options are quite overwhelming. After some hardcore Googling, I managed to find a forum post somewhere that was enough for me to get the basics, which I’m going to try to explain here.
Firstly though, something else. After watching a few of the programmes I’d downloaded with the version in the Ubuntu repositories, I noticed that some of them contained pretty serious compression artefacts, the picture would be obscured for several seconds before going back to normal. Investigating this a bit, I found out that the version of get_iplayer in the Ubuntu repositories is a bit old, and that there is a newer version available. Luckily, there is a PPA you can add which will give you the newer version of get_iplayer and some of its dependencies, I’d recommend following the instructions there and using it. Or, to save you reading, from a terminal you can enter:
sudo add-apt-repository ppa:jon-hedgerows/get-iplayer
sudo apt-get update
Then to install get_iplayer, enter:
sudo apt-get install get-iplayer
If all that happened without any errors, then everything should be ready to go! If there were errors, I don’t know what went wrong.
So now the hard part, how to actually use it. I’m only going to cover the basics, which is searching for a programme and then downloading it. To search for a programme, you just use the syntax:
get_iplayer "Programme Name"
When you do this, quite often it will first update its database, displaying
INFO: Getting tv Index Feeds, and then they’ll be a long list of programme names all prefixed with
Added:, followed by a number. You can safely ignore this. What you want is the bit that follows
Matches:, which will hopefully be a list of one or more episodes of the programme you searched for, each preceded by a three digit number. This number is important, as it is a unique identifier for each programme, note the correct number for the programme you want. What you then want is something like the following:
get_iplayer --get xxx --output ~/Videos/ --tvmode=flashhd,flashvhigh
xxx is the three digit number of your programme. Note that, if you want to download more than one programme you can put
--get xxx yyy zzz and so on, and it will download them in sequence.
--output option is fairly self-explanatory, you just follow it with the directory you want to place the resultant file or files in. The
--tvmode option is more complex. The example I have given is what I use, it will download the programme in high definition if it is available in that format, otherwise it will use the highest quality standard definition feed. If you always want SD, use
--tvmode=flashvhigh instead. There are also lower quality settings available if you want. If you’ve used the iPlayer website you’ll know that the quality dynamically adjusts depending on your connection’s ability to handle it, and get_iplayer’s various quality settings basically mirror these levels, you can see them all by typing
And that’s basically all there is to it. There are a whole host of more advanced options, including some to make it run in the background and automatically download new programmes for you (a sort of series link), but I haven’t tried those myself. Another thing to point out is that 30 days after you have downloaded something, if the downloaded programme is still located in its original location when you run the program, it will ask you if you want to delete it or not. This is in line with what the official BBC Desktop program does, although that deletes things automatically. You’re free to say “No” with get_iplayer, although I do not condone using it to download whole series to avoid paying for DVDs or Blu-Rays. Although doing so to avoid ever having to watch Dave is a valid excuse, and no jury would ever convict.
Update 08/06/2013: If you’re having the
RTMP_ReadPacket, failed to read RTMP packet header INFO: Command exit code 1 (raw code = 256) error (which, judging by my site’s stats, a lot of you are) then try running the following command:
get_iplayer --prefs-add --rtmp-tv-opts="--swfVfy http://www.bbc.co.uk/emp/releases/iplayer/revisions/617463_618125_4/617463_618125_4_emp.swf"
You should then be able to use get_iplayer as usual. Thanks to Martin-C in the comments for pointing this out. There’s a little more info about this error here. Basically, the BBC changed something at their end, but it’s simple to fix by running the above command.