How to download BBC iPlayer videos and radio programmes

Abstract (Italiano): Scrivo questo articolo in inglese perché (ovviamente) la registrazione dei video della BBC interessa maggiormente le persone che parlano inglese. Se lasciate un commento, gentilmente fatelo in inglese.

Abstract (English): I’m writing this post in English because (obviously) recording BBC videos is mostly of interest for those who speak English. Also, a small note for native speakers, especially British people: I’m Italian and I’m mostly used to write using American spelling. For this reason, the post may contain mistakes or American words which may seem unusual. I’m sorry for that. If you find errors (apart from AE spelling) let me know in the comments.

Introduction

I already wrote about downloading videos from the BBC and Hulu websites (in Italian), however it was about two years ago. Websites change and so does software, hence the suggested method of using get_flash_videos does not work anymore.

I also wrote a generic article about downloading videos from websites (in Italian, too) that contains many different use cases and examples. One of my readers asked for clarification about recording iPlayer videos, so I tried again myself. I was able to apply some of the techniques of my post, together with a couple of clever tricks to find the maximum quality.

Since the process is a bit involved, I wrote a small software which automates all the steps and tells you how to start the recording immediately. This program is actually a so called user script, i.e. a piece of software that runs directly into your browser.

This article explains how to download and install the script. Then it shows you how to use it and what you need to do to record BBC iPlayer videos. Before we start, you need to be able to trick the BBC website into thinking you are living in the UK. If you are actually living there, skip the next section.

Pretending to be in the UK

The BBC iPlayer service is officially available only in the United Kingdom. The website will check your IP address and refuse access if you are trying to watch content from another country. To fix this problem, you need to use a technique to access the site through a server in the UK.

Usually the best tool for the job is a VPN service. VPNs are used to establish secure connections to private networks over the Internet, but may also be used to avoid geographical restrictions of websites.

There are many different VPN services. Most of them are paid (although cheap), while some are free. Among the best options, you can:

  • use VPNGate by choosing a node in the UK
  • use CyberGhost with free UK servers
  • use VPNOneClick
  • get a cheap lifetime deal for a professional VPN, such as:

CyberGhost is an interesting VPN service with a convenient free tier for Android devices, Windows and OS X. Unfortunately, the free option is not officially available for the operating system everyone should be using, i.e. Linux. I plan to investigate a bit more about this severe limitation.

Luckily, I also wrote a Python script for easily using VPNGate by specifying only the desired country which works perfectly on any Linux distribution, including Ubuntu, Mint, Fedora, OpenSuse and Mageia. You can check it out here.

You may also try VPN OneClick, which lists UK among the servers. Regardless of what VPN service you choose, once it is activated, you are ready to go on and start recording videos from iPlayer.

Script installation

To run the user script in your browser, you need to install an extension. This varies depending on your browser. The following are recommended:

After this step, you can click the following link to open the script page on Greasyfork. On the page that shows up, click on the Install this script button to complete the procedure.

Download — BBC iPlayer video download

You are now ready to start downloading.

Recording videos

The next time you open a video page on iPlayer, you’ll see that the script adds a box under it with some instructions and a command line. The following pictures shows an example with this video. You can see a reference to avconv, which was suggested previously, however now the recommended tool is ffmpeg.

Example of the output of the script
Example of the output of the script

The command line displayed in the gray box is a one-liner you can use together with ffmpeg. This is a software used to convert and record video files, which can be installed on any of the common Linux distributions such as Ubuntu. More informations are available on the official website. To start the download, carefully copy the entire content of the gray box (and nothing else) and paste it into a terminal window, then press Enter.

Downloading a video with ffmpeg
Downloading a video with ffmpeg

As you can see from both figures, the file is saved into a MP4 container and the name corresponds to the title of the video.

It should also be possible to download the software for Windows or Mac. On Windows you just need to create a new file called download.bat (with Notepad, or any other editor) in the same directory of ffmpeg.exe and copy-paste the command line into it. After that, you click the bat file and it should start downloading. However, using those operating systems is not recommended nor endorsed.

I cannot provide support to Windows or Mac users, since I don’t use those systems and they are proprietary software. If in doubt, please use Linux, or find an expert to help you with your OS. If you need help to follow this guide and you use Linux, of course leave a comment and we will try to figure it out together.

As an alternative to ffmpeg, you may want to try the recording features of VLC by just feeding it with the M3U8 URL that appears inside quotes. However, pay attention! You may accidentally enable video transcoding, potentially extending the time necessary to download and degrading the quality. For this reason I recommend you use ffmpeg.

Recording radio programmes

Starting from version 3.2, the script supports radio programmes such as those provided by BBC School Radio. The process is exactly the same as recording a video, including the command line provided for ffmpeg.

As an added bonus, the command line for audio files is tweaked so that you will directly get a file converted to MP3 for maximum compatibility!

Conclusion

The script I developed allows to automate all the necessary steps required to ensure the highest possible quality during the downloading. In particular, the script does the following:

  • find the configuration of the player for mobile phones
  • get the list of M3U8 URLs for different bitrates
  • look for the best available bitrate for desktop computers
  • tweak and simplify the M3U8 URL for the best quality
  • show the command line to the user

Performing the process manually is time consuming, error-prone and tedious if done multiple times. In this way it should be much easier for those who just want to record a couple of videos to watch them with a modern TV, on the train or keep them in a personal library.

Moreover, starting from version 3.0 the script shows you a download link to the original subtitles in TTML format (which is not very widespread). In addition, it performs an automatic conversion to the commonly used SRT format for your convenience.

Happy downloading!🙂

Did you like the article?

Writing software and tutorials like this takes time. If you found the provided information useful, and you liked the post, you may buy me a coffee by clicking on the button.🙂 If you do so, please leave a message on the donation page telling me it’s for this script.

Coffee

106 pensieri su “How to download BBC iPlayer videos and radio programmes

  1. I’m also getting “Server returned 403 Forbidden (access denied)”, and my VPN is working properly, so I don’t think thats the reason of the problem.

  2. I take for granted that the fact the BBC is actively monitoring users to detect VPNs is very well known. When I say “check your VPN” I mean that one should ensure their VPN provider is taking appropriate measures to guarantee a working functionality also on BBC iPlayer and other websites. This usually includes appropriately changing IP addresses every now and then and setting up a working SmartDNS solution on their end so the experience is not disrupted frequently.

    As I said before, the M3U8 URL which was specified above is working correctly.🙂 If you have a different URL that doesn’t work and this is not due to an inadequate VPN then please post it so I can have a look. Thank you.

  3. Is it possible to change the location to which the mp4 files are recorded? If so, how should I modify the script?

  4. Yes, you can save the files anywhere you want but you don’t need to modify the script.🙂 Assuming you want to save the files in /home/andrea/Videos/you just have to change directory in the terminal before recording the video:

    cd /home/andrea/Videos/
    ffmpeg -i [...]
    

    Also, you could simply tweak the path of the output file (and its name, if you want to):

    ffmpeg -i [...] /home/andrea/Videos/whatever.mp4
    

Che cosa ne pensi?

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione / Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione / Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione / Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione / Modifica )

Connessione a %s...