Using get_iplayer to download content from the BBC iPlayer in Linux [(X)ubuntu]

I couldn’t find a really simple guide that explains how to download TV and Radio shows from the iPlayer using get_iplayer so I thought I would write one. get_iplayer can do a lot of things including streaming and PVR style recording and other guides that I have found seem to focus more on that sort of thing. This will be much more basic and concentrate on one simple task.

This guide explains the process in Xubuntu Linux but will work in any other flavour of Ubuntu, for example Kubuntu, Lubuntu or the main Ubuntu version. It will also work in Linux Mint. The process is likely to be very similar in other distros like Debian, Fedora and OpenSUSE but I haven’t tried it.

There is a Windows version of get_iplayer and I would imagine that the commands are the same but again I haven’t tried it.

It is possible to use a proxy with get_iplayer to enable you to download content from the iPlayer from outside the UK. I won’t be covering that.

 

Installation

Open a terminal and type:

sudo apt-get install get-iplayer

Please note the dash (get-iplayer) rather than underscore (get_iplayer). Installation is the only time a dash is used. After this it will always be an underscore.

Enter your password and then say yes.

 

Use

TV

First you need to decide where you want to save the file that you will be downloading. If you are happy to save it to your home folder then you just need to open a terminal and run the relevant command. Otherwise you will have to cd to the folder where you want to save it first. Some distros and desktop environments have a right click “open terminal here” option which saves a bit of time. This is among the many reasons that I like Xubuntu.

Once you have the terminal open in the correct folder you need to copy the URL of the programme. The easiest way to do that is to go to the page where you would normally watch the show and copy everything in the address bar. It should look something like this:

 

www.bbc.co.uk/iplayer/episode/b03bvsw2/David_Attenboroughs_Rise_of_Animals_Triumph_of_the_Vertebrates_Dawn_of_the_Mammals/

 

The only part of it that get_iplayer actually needs is the pid (programme ID). In this case it is b03bvsw2. It makes no difference if you use the whole URL and it is probably easier so I will be doing that in this tutorial.

The command that you need to type into the terminal is the following:

 

get_iplayer --raw --modes=flashhd --pid=www.bbc.co.uk/iplayer/episode/b03bvsw2/David_Attenboroughs_Rise_of_Animals_Triumph_of_the_Vertebrates_Dawn_of_the_Mammals/

(To paste things into the terminal you need to either right click paste or Ctrl+Shift+v)

 

The –raw part means that it won’t convert the file that it has downloaded. You will get a file that ends .flv and can be played in VLC (and many other media players including MX Player on Android). My rule is that if VLC will happily play it, there is no need to convert it. Should you want to convert the resulting file, I suggest either Handbrake or VLC.

The –modes=flashhd part is where you specify which stream you will be saving. In order of best quality to worst quality you have the following options: flashhd, flashvhigh, ,flashhigh, flashstd, flashnormal, flashlow. I generally go for flashhd or flashvhigh for programmes that are not available in 720p.

After the –pid= you can either paste the full url or just the pid which in this case would be b03bvsw2.

If you get an error about the pid already being in the cache (most likely because you have downloaded the programme before) then you will need to add –force to the end of the command so it looks like this:


get_iplayer --raw --modes=flashhd --pid=www.bbc.co.uk/iplayer/episode/b03bvsw2/David_Attenboroughs_Rise_of_Animals_Triumph_of_the_Vertebrates_Dawn_of_the_Mammals/ --force

 

Sometimes I find that there are interruptions in the download and usually it will just automatically resume but occasionally the file will become corrupted and the download will fail part way through. You will know that this has happened if the downloaded file still ends .partial.flv (it will look like this while it is downloading). If this happens, the easiest thing to do is delete the file and then rerun the command with –force added.

 

Radio

The process is very similar for radio downloads. Again go to the page where you can play the show in question and copy the URL. Open a terminal and type the following:

 

get_iplayer --raw --modes=flashaacstd --pid=www.bbc.co.uk/iplayer/episode/b03bfkbg/The_Archers_25_09_2013/



You have a few –modes= options. I’m not that experienced with radio downloads but you can chose from  flashaaclow, flashaacstd, rtspaaclow and rtspaacstd.

 

The resulting .flv file isn’t much use so I suggest using Audacity to convert it to flac, ogg or mp3.

10 thoughts on “Using get_iplayer to download content from the BBC iPlayer in Linux [(X)ubuntu]”

  1. Not all the stuff on iplayer is in HD it may be necessary to play with the flash mode parameter, “flashhigh” “flashlow” “flashstd” are some of the possibilities.

Leave a Reply

Your email address will not be published. Required fields are marked *