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:
- The DVR function in get_iplayer in called which downloads and encodes any new programmes which have become available since it last ran. See post re get_iplayer setup.
- A script then moves the programmes from the SD onto my NAS drive using Samba. See post re connecting to a NAS.
- A small python program, get_iplayer_genrss, then runs which uses the get_iplayer download history to write out a RSS file which contains the latest programmes which have been downloaded. See here for installation and usage.
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.
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.
ReplyDelete-Jim
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.
DeleteThanks 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.
DeleteGood work, love this Raspberry PI and its a lot cheaper than other SBC I've used :).
-Jim
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.
DeleteSoooo.. 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!)
ReplyDeleteNo 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