Saturday, 2 June 2012

Raspberry Pi - BBC iPlayer Personal Podcast

Anyway... I like radio, love it, I like music and I love radio comedies, particularly those on BBC Radio 4, but, I never get to hear them, I'm just not around at the right time and when I do have time to listen (in the car, on the train, etc) they aren't on and streaming them is a right pain.

So along came the Raspberry Pi and I thought maybe here is an opportunity for me to have an always on, low power device, which could download stuff from BBC iPlayer, using the open source project get_iplayer (see my post about how to install get_iplayer on the Pi), then I could put it on my phone / ipod and listen to it when I do have time.

Then I thought how about making my own personal custom podcast of the things I have downloaded from iPlayer, then I can subscribe to it and hey presto, all that stuff I wanted to listen too, but never got the time will automatically end up on my phone!  Not only brilliant for listening to radio, but it would also work for TV shows as well!

This is how I did it:


I used the DVR capabilities of get_iplayer to download TV & Radio streams from BBC iPlayer, I also set up the WebUI component which allowed me to tell get_iplayer to download specific programmes or a complete series as and when a new episode becomes available from the comfort of my laptop.

Every hour a scheduled job (CRON) runs a series of commands:


Lighttpd (lighty) is then used to provide http access to the RSS file and the programmes via a symbolic link to the NAS drive.

I can then subscribe to the RSS using a podcast app (I use google listen), it will then download the new programmes allowing me to use them at my leisure.

I am SO impressive with this, not with me for putting it together, but because I have achieved this using a £25 peice of hardware, some free readily available software and 1 small python program.  This for me shows the power of the Raspberry Pi, not its computational power, but the inspirational it can bring to people to try a create something.


6 comments:

  1. Any chance of clues as to how you achieved this ie the scripts etc. It may help others to make something useful with a Raspberry PI. Thanks.
    -Jim

    ReplyDelete
    Replies
    1. Absolutely no problem. I am going to start blogging about some of the specifics around how this works, I'll do it component by component and update this post. It boils down to, configuring get_iplayer & lighttpd, writing a program to create an RSS feed and a script to run it periodically. If there something specific you want to know, Ill happily do that first.

      Delete
    2. Thanks for that, yes it was really setting up the samba part to point to your NAS. I have already got_iplayer and lighttpd up and running. I was also wondering how you targeted the NAS as your storage for the downloaded programmes in get_iplayer.
      Good work, love this Raspberry PI and its a lot cheaper than other SBC I've used :).
      -Jim

      Delete
    3. Check out my blog post about setting up samba http://stuffaboutcode.blogspot.co.uk/2012/05/raspberry-pi-connect-nas-windows-share.html, you can then use the --output option of get_iplayer to write directly to the NAS, or write a script to copy it off the SD card when get_iplayer has run.

      Delete
  2. Soooo.. You cant actually watch BBC iplayer on the R-Pi it self yet .. ya? Amazing script though. (I wanted to connect my Rpi at work via SCART and re watch some tv series.. of battery off course.. dont want to break ant TV Licence laws!)

    ReplyDelete
    Replies
    1. No you can watch iPlayer content on the pi. If you intend on downloading video to the Pi first you can then use a media player such as omx player to watch them back, if you want to stream video over the web, while I havent tried this myself you cold use xbmc with the iPlayer plugin.

      Delete