Update 23 Jan 2013

You may still find some of the following information useful. I’ll leave it there anyway. ;)

Original post

Following on from my original two postings on get_iplayer, (for Debian Squeeze & wheezy distros for the Raspberry Pi), this is a set of instructions for the Raspbian release. It’s quite a bit simplified because…

no need to rpi-update

no need to compile FFMPEG as it’s been done for us

That’s a big plus because the FFMPEG compile took 3.5 hours. :)

Starting point assumptions.

I’m assuming that you have an internet connected Raspberry Pi with SD card booted up into a clean install of a Raspbian distribution you got from the Raspberry Pi downloads page. The current version at the time of writing is 2012-07-15-wheezy-raspbian.zip

If, you’re on Raspbian, carry on with the instructions on this page. Let’s get started…

sudo apt-get update

This will update your packages and may take a few minutes.

Next we need to install git, which is a version control system we will need to access the latest versions of various packages.

sudo apt-get install git-corey to confirm when prompted.

Install Packages

Now, let’s navigate to a known starting point

cd /home

and install a required perl package.

sudo apt-get install libwww-perly to confirm

We’re going to use git to get the files, install the get_iplayer files, then build (compile) and install rtmpdump from the latest source code.

rtmpdump is used for recording the iplayer stream. ffmpeg is used for remuxing (repackaging) the resulting flv file into an mp4 wrapper – which means we can view it on our Pi with Omxplayer or XBMC etc

Now you will need to get hold of the latest version of get_iplayer…

sudo git clone git://git.infradead.org/get_iplayer.git

This will create a new folder called get_iplayer in your /home folder. All the get_iplayer files are in this folder. Let’s go there…

cd get_iplayer

we need to make the get_iplayer file itself writeable or it won’t work properly, so…

sudo chmod 777 get_iplayer

This changes its permissions so it can be read, written to and run by anyone.

Let’s get back to our home folder so we know where we are.

cd /home

Now we’re going to edit a file which contains the sources of debian repositories. We’ll do this with nano – a text editor.

sudo nano /etc/apt/sources.list

Then use the cursor keys to get to line 2 and add…

deb http://www.deb-multimedia.org/ wheezy main non-free

ThenCTRL-X to exity to confirm you want to saveenter to confirm the filename (don’t change it)

sudo apt-get update

It will update some package lists and give an error. We’ll deal with that next…

Build and Install rtmpdump

You will now see a some lines starting “gcc -Wall” and the process will take a few minutes. When it finishes, you’ve just compiled the latest version of rtmpdump. Now we need to install it…

sudo make install SYS=posix

You should then see some lines starting “cp” and “mkdir” as the files are copied over to their new homes. You have now compiled and installed rtmpdump. Congrats ;)

Test withrtmpdump -v
to check you are running the latest v2.4 (at the time of writing). Ignore the hostname error. We’ve got what we wanted. Onward.

Install FFMPEG

sudo apt-get install ffmpeg

Now we need to comment out the second addition we made in sources.list

sudo nano /etc/apt/sources.list

Add a # a the start of the following line. Change…

deb-src http://www.deb-multimedia.org sid main

…to…

#deb-src http://www.deb-multimedia.org sid main

Or you can delete that line altogether if you prefer, but don’t touch line 1. ;)

sudo ldconfig

So we don’t stumble across permissions issues, if you are going to be logging in as a normal user (pi) rather than root, we need to give ourselves ownership of these directories…

sudo chown -R pi /home/get_iplayer

Now your installation is finished, let’s try it out.

Automated Installation Option

Mark Williams has kindly provided a bash script which goes through this installation process. He has tested it, but I haven’t had time (although I have looked through it). You may choose to have a go with it at your own risk. You can download it here (You will need to unzip it and make it executable before it will run) chmod +x raspbian_get_iplayer_inst.sh.

Starting using get_iplayer

Go to your get_iplayer directory

cd /home/get_iplayer
then./get_iplayer
If it tries to update and gives an error message, make sure you have full permissions on the get_iplayer script filesudo chmod 777 get_iplayer

Run get_iplayer and once it’s finished updating plugins etc. It will update the program list. You’ll know when that happens you will see about 1000 programmes displayed.

part of program list

Then you use it like this../get_iplayer keyword (substitute keyword for a keyword in a programme title)

This will result in a list of programmes (or none) with that keyword in. Make a note of your chosen programme’s ID number e.g. 460

Then, to download programme 460, type this

./get_iplayer --get 460 --modes=best

This will download the program at the best available resolution to your get_iplayer folder on your SD card, which you probably don’t want. I generally put my downloads on a USB memory stick. You can redirect the download wherever you like using…

-o /path/to/file-destination

so for me, with a USB stick mounted at /media/usbstick, the full command would be…

Where did your ffmpeg install come from. Can you remember? Mine came from the raspbian repository. Is it possible yours came from deb-multimedia? If so, it might have installed the wrong version. That’s all I can think of, unless somehow your script changed things in some way I can’t understand?

I’ve already used it on 3 programmes. One was HD and ffmpeg worked fine for me.

A few people on the forums have noticed issues with FFMPEG. Racking my brains to figure out what this could be, the only thing I could come up with was that I had written in the blog a slightly different procedure for the changes in sources.list to simplify it. I thought it wouldn’t make a difference because FFMPEG seemed to be installed from the Raspbian repo anyway. But perhaps it did? The above now represents exactly what I did and the exact order in which I did it. (Good job I kept precise notes). Hope it works for everybody now. :) drgeoff has confirmed that the new procedure works with the above instructions.

No. I think you had what I originally put (which I’ve now changed because it broke the install). I’d tried to simplify things from what I actually did and it messed up the FFMPEG install. My bad. Now it works ok. If your script now works, I’d be delighted to host it here. You can send me an email at alex(AT)raspi.tv if you like and we can figure out the best way to do this. :) :-D

A little tweak. I’m leaving it here as much for a reminder to myself as anything ;)
If you find the file naming convention a bit annoying, you can change it.

./get_iplayer –prefs-add –file-prefix “<name> – <episode>”

this will get rid of the “8hfdkjgh_default” at the end of each filename. I’ve left episode in just in case I ever want to record a series. If you only ever download one-offs, you could omit that. But then if you do record a series, episode 2 will overwrite episode 1 etc.

I had it up and running on my squeeze image until today when doing an ‘rpi-update’ made it unbootable… I’ve just spent the afternoon reinstalling everything on raspbian… so glad to discover you documented how to do it on raspbian :yes:

Glad it still works after all the updates. 8-)
I bought the MPEG2 codec the other day and updated/upgraded and rpi-updated everything. Was delighted that everything still worked after that. The only thing i had to mess about with was the wifi dongle. :-)

[…] (the default username is ‘pi’ and the password ‘raspberry’), and set about installing get_iplayer using these instructions. I had to also install make and gcc before rtmpdump would build but other than that it all worked […]

Maybe something’s broken? I haven’t tried on a new fresh install since they first brough out Raspbian at the end of July. You might not need that part if RTMPdump and FFMPEG are in the official Raspbian repos now. Try going ahead without and see if it helps. You only need to post that part of the error message which is an error or you’ll soon clog up the comments section. :laugh:

Its such a pleasure to have a complete set of instructions that actually work as documented – pretty essential for us newbies stumbling about in the darkness.

Did the instal, scanned and downloaded and then played in omxplayer a one episode of eastenders. Im using the “debian wheezy raspbian 18 09 2012” release. Had a few problems with a poor wifi connection, you know the old spinning wheel when there isnt enough bandwidth watching the iplayer but it restarted and resumed where it left off. Very impressive.

Great job, worked perfectly and very good video quality too!

Now to sus out the pvr functionality to effectively replicate recording a whole series.

Now im running into trouble with PVR from the command line/crontab and despite hunting about cant make head nor tale of a variety of helpful stuff or from reading the documentation for get_i*.

Running ./get_iplayer –pvr directly from the command line works a treat, my Pi works its socks off (I was trying to think how a pi would work hard sorry) to run the searchs set up in the PVR find out what I have already downloaded and then download the new files.

However when trying to set up the crontab with what appears to be exactly the same command ie path to geti*/get_iplayer –pvr absolutely nothing seems to happen.

Any help or hints in the right direction would be much appreciated :-))

This is the PVR searches, one is for the main strictly show and the second is for the it takes two – ok not exactly exciting but the wife likes it.

All PVR Searches generated from get-iplayer –pvr-list:

pvrsearch = Strictly
search0 = Strictly Come

pvrsearch = Take_two
search0 = Strictly – it

The relevant section of the crontab is as follows. The time is a bit odd as I was experimenting with it. I believe this would fire up the pvr 10 mins past 1am, 4pm, 5pm and 8pm every day.

It’s right at the end, on attempting to download the selected BBC programme. The download tries a number of approaches (I assume looking for the best fit) and each such attempt fails due to not being able to find flvstreamer.

I seem to remember from the dim and distant past that this issue came up when I didn’t have read/write access to the media I was trying to save on or something like that. You might need to consult the guys on the get_iplayer mailing list as I think we’ve reached the extent of my knowledge here :(

Hi Alex,
I’ve followed your fine instructions and everything worked as expected with no errors. However, whilst ./get_iplayer successfully lists the available programmes, when I try and download any of them, the download fails. There don’t appear to be any helpful error messages, it just tries numerous times at different quality levels (e.g. flashhigh1, flashhigh2 etc.) each one with a corresponding WARNING: Failed to stream file and ‘WARNING: Your version of flvstreamer/rtmp dump does not support SWF Verification’ and the final line is ‘ERROR: Failed to record ‘.
The only oddity I can find is if I type rtmpduump -v I get the expected file version output but also a ‘Segmentation fault’ statement.
Any help or guidance you can give would be greatly appreciated!

Where are you trying to save the downloaded file? You can sometimes get errors and seemingly random failures right at the start of the download if the pi doesn’t have permission to write in the directory it’s trying to write to.

I was wondering if this problem was ever resolved as I have just started experiencing this same problem after upgrading to raspbian 2012-10-28 wheezy. I have had no problems with permissions as referred to in later posts and no occurrence of the error relating to version pid metadata. Followed the instructions to the letter.

Alastair, I’m sorry but I think we’ve reached the extent of my knowledge and ability to help you on this. What I suggest is that you ask on the get_iplayer mailing list. They have some very clever people there (who helped me to get going with get_iplayer on the Pi). I haven’t played with get_iplayer on a distro more recent than July – as you can see from all my other posts on here, I’ve been quite busy with other things.

I think that must be something to do with the deb multimedia keyring thing, but the guys on the get_iplayer list will sort you out better than I can. I haven’t stayed current with get_iplayer on the Pi since August. Sorry I can’t be of more help. :(

I haven’t played with get_iplayer on the pi since August. It’s possible that something’s changed since then that breaks the instructions. I’ve been too busy writing Gertboard software, making silly demos and fending off criticism about electrical safety to look at it since then ;)

The SWF Verification error is produced by get_iplayer when it cannot correctly parse the rtmpdump help file (it sends the command rtmpdump –help to the shell). This is caused in these cases as rtmpdump is returning a “segmentation fault” instead. You can see this where you type rtmpdump -v in the shell, or even rtmpdump -h which is what get_iplayer is trying to do.

rtmpdump is having issues as it cannot correctly locate librtmp which (if my memory serves me correctly) should have been installed with rtmpdump. What you need to do is run the following command:

export LD_PRELOAD=/usr/local/lib/librtmp.so.0

which you would have to do everytime you log in or even better put this line into the file /etc/profile which will mean that it will be run at startup.

If librtmp.so.0 is not in the folder above already it may be because it needs to be compiled and installed separately from rtmpdump. I happened to have done that already as one of my troubleshooting steps. If you need to, go to the librtmp subfolder in the rtmpdump source (should be /home/rtmpdump/librtmp if you followed the instructions above) thenmake
thenmake install

Hi, I ran into the same problem, and after some digging worked out why, and have a somewhat hacky solution which at least has got me up and running.

The problem is caused by the library librtmp.so. The rtmpdump distribution creates this library, and copies it into /usr/local/lib. BUT – the Raspbian distribution I have has its own librtmp.so, living in /usr/lib/arm-linux-gnueabihf (maybe this is only true with recent distributions?). And the system looks there first – so the one which we have just made is ignored. Clearly there’s an incompatibility, which causes the segmentation fault seen when you try a rtmpdump -v (It’s dumping as soon as it makes a call into the library).

I’m sure there’s an elegant solution to this. My inelegant sledgehammer has been to delete the version in /usr/lib/arm-linux-gnueabihf

sudo rm /usr/lib/arm-linux-gnueabihf/librtmp.so*

(making a back-up of course!), then running

sudo ldconfig -v

to let the system know what libraries are where.

And hey presto it works. If anyone has a better solution I’d love to hear it.

Really appreciate this site, struggled to get Get_iplayer to download till i reached the end of the posts – bingo – removed the library,reinstalled and all working!!
Learn’t a few things alng the way….

so that I get an automatic alert if there are any shows which aborted/failed to fully download/convert on the last PVR run. Of course this requires your raspbian be able to send mail from crontab. You will need to modify the /mnt/get_iplayer path to your own specification.

Hi
Have installed get_iplayer following your instructions and all seems well so far – thanks for the instructions

I have been trying to add an enhancement which is launching the program from a desktop icon from the LXDE desktop.
Have tried runing a number of options which I would have expected to do this in a desktop file with no success as follows:

You should see the GET_iPlayer icon in your LXDE desktop menu, under “Internet”.
I have used Midori as the browser – close any running instance of Midori before you click on the GET_iPlayer icon. Other tabs can be opened after get_iplayer page is running.
Don’t forget to “Refresh Cache”!

Tried downloading a program this morning for the first time and got the error message a few others have seen:

WARNING: Your version of flvstreamer/rtmpdump does not support SWF Verification
RTMPDump v2.4
ERROR: Failed to record ‘xyz -15/02/2013 adass’

However can report that Russells solution (8th January – see above) removed the error message and the program duly started to
download. Will report back later how I got on (did it fully download and play OK)

Have a quick question. I note that we can now just run the following to install get_iplayer:

I tried this step before all others and although a lot of downloading appeared to take place I could not find the get_iplayer
folder to run the program from. Any clues as to what I should have expected?
PS: I am running Raspian (the latest Wheezy version) on a model B RaspPi

The short answer is I don’t know – I haven’t found any way to get it going. There’s no /home/get_iplayer directory, ./get_iplayer just gets another “command not found” error, and I don’t know what to try next.

I don’t know whether it doesn’t work because of something I haven’t done, or did wrongly, or whether perhaps it might work if I knew how to run it. I should perhaps confess that I have this sort of experience with Linux quite often, which is why I hate it so much …

I tried it initially on my NAS server then, when that didn’t work, on a virgin card written with the current Raspbian downloaded today and immediately upgraded.

I must have misunderstood your post. I took it to mean that only the two steps under your January 2013 Update were necessary, but that is clearly not so. Perhaps I will have more joy if I ignore that and work through all the steps in the original post. I may try that tomorrow.

The trouble is they keep changing the OS, so what worked in Jan may not work now. :(

The Get_iplayer mailing list is helpful. John now has a Pi himself so has done some Pi specific versions too of the bleeding edge versions. At Easter time he asked that we not make them public, but the details are there in the list archive if you need them. They might be ready for public viewing by now :)

For the record, I tried again this morning and followed the full procedure from your page. That worked, except that rtmpdump -v, reported a segmentation error. Get_iplayer runs and I have downloaded a radio programme, but tv downloads fail with:

Your version of flvstreamer/rtmpdump does not support SWF Verification.

I got an error(make: *** No targets specified and no makefile found. Stop.) using the original instructions in the article, but then I tried sudo apt-get install get-iplayer ffmpeg atomicparsley libmp3-info-perl in the comments and it worked.
Up until I tried to download a program, that is. I keep getting INFO: No specified modes (flashhd, flashvhigh,flashhigh,flashstd,flashnormal,flashlow) available for this programme with version 'default' (try using --modes=).
I’m in the States, could this have anything to do with it?

I was looking at your article on using ffmpeg to convert video from the RPi’s camera, and in it you say that get_iplayer has made ffmpeg unsuitable for such a task. Did I understand that correctly? If so, how can one reverse that process?

I expect it would be different if you compiled it manually. I’m not entirely sure how to remove it in that case. I think there is a purge option for apt-get. That might be useful in this case. Sorry I can’t be of more help.

Now I spent 3 attempts (new fresh weezy SD 2 times). Failing on the same point every time.
Warning: Your version of rtmdump/flvstreamer does not support SWF…

RTMPDUMP is v2.4. My RPi`s VPN connection works fine. Everything updates as expected. I made every step in accordance to your instructions (RPi-wheezy way). But there is one little thing that I can not be sure of doing right, is the sudo ldconfig command. Is it supposed to be in the /etc/apt/sources.list? I don`t think so. But on the other hand -I could not see any feedback that something happened when I wrote this at the prompt.

What can possibly go wrong. Many respond to you that everything works. I`d love to be one of them!

Yes. I did use “the easy way” –every time. (Reformatting the SD and dd’d the wheezy last two attempts). I only installed PPTP before “the easy way”.
The error messages I get during installation are all the expected ones. (And as you write -they are being taken care of later on during installation).
And the installation process you describe is straight forward and well written. Every step during installation feels right to me.

Installing again does not feel like a solution. (my Raspbian is set to US translation – I doubt this is causing the problems).
My experiences in computing: User and admin of several Unix OS’s since the late 80’s. But I’m as lost as a child on this one.