About get_iplayer
This tool allows you to search, index and record/stream:
- BBC iPlayer TV - up to 3200 kbps HD 720p H.264 / Quicktime / MP4
- ITV player Catch-up / Classic TV - 384 kbps+ WMV / ASF
- BBC iPlayer Radio - up to 192 kbps MP3 / AAC and Realaudio
- BBC Podcasts - up to 192 kbps MP3 / AAC
- BBC iPlayer TV subtitles - SubRip / srt
Unlike the web sites above, get_iplayer has PVR-like capabilities (like Sky+ / TiVo / Series-Link); You can save lists of programme searches which are automatically recorded when they become available so that you can watch them when you choose and on devices that cannot run Adobe Flash Player - even if you don’t have adequate broadband speeds or if your broadband streams too slowly at peak hours when you want to watch a programme.
The iPhone H.264 feeds from the BBC are higher quality than in the Flash iPlayer (normal quality). See the beebhack wiki for a comparison. They are intended for the Apple iPhone and are consequently made difficult to download for any other OS. The same goes for the iPhone MP3 radio streams. get_iplayer also allows recording of the high-quality (even HD 720p) flash based content using rtmpdump.
Myself and a few others worked out how to work around these problems and now have tools which essentially simulate an iPhone as far as the BBC web servers are concerned.
get_iplayer, does the recording, indexing and searching of the iPlayer TV/Radio/ITVplayer programmes and podcasts available. It can even stream the iPlayer TV programmes while recording them to mplayer or xine, etc. It does not circumvent any digital rights management security (see the BBC’s website on how to do that with the Windows-only DRM content they provide). The BBC iPlayer TV / ITV only work in the UK.
Uses
The script is primarily intended for use for recording and playing back TV and Radio content on devices that cannot support adobe Flash/Air/Silverlight, systems which run entirely on open-source software (i.e. no Adobe flash/air or Silverlight), recording content for mobile devices that have no access to broadband/wi-fi or running on devices that have such limited memory that running a browser with a flash player or AIR is not possible (or not permitted). For me this would be an Xbox running Xebian Linux with Freevo or XBMC. The Xbox only has 64Mb of memory and struggles enormously with Adobe flash (Adobe doesn’t permit you run flash player or AIR on a games console either).
Fair Use
Of course, to respect the content providers’ wishes and fair-use legislation, you should keep the recorded content for no longer than 30 days (in the UK), not attempt to obtain it from outside of the UK and not redistribute it. get_iplayer is not intended for use in making illegal copies of copyrighted content. Please respect the rights of the content owners when recording. get_iplayer will attempt to remove it’s recorded content which is more than 30 days old.
Features
- Recording/Streaming of TV, Radio and Podcasts from BBC, ITV sites
- Recording/Streaming of Live BBC iPlayer TV & Radio
- Recording/Streaming of Embedded media in BBC Learning Zone, Archive and News sites
- PVR functionality allows predefined searches to be recorded from a scheduler such as cron or Windows scheduler
- Queuing of programmes for batched recording or for recording off-peak
- Resume recordings of partially recorded content
- Stream iPlayer or podcast content via mplayer or xine while recording it
- Allow multiple programmes to be recorded in one command
- Indexing of all available programmes
- Script update capability
- Advanced Searching on programme name, episode, description, channel or category, etc
- Limit search by programmes made available after a specific number of hours
- Removal of recorded content which is more than 30 days old
- Meta-tagging of recorded iPlayer iPhone/H.264 and mp3 files for importing into iTunes
- Plug-in based architecture to allow new channels and sites to be added by 3rd-parties
Reported to Work on:
It has been tested by users under Linux (Fedora, Centos/RHEL, Ubuntu, Xebian, Debian, OpenSuSE, OLPC, ArchLinux, Puppy, NSLU2), MacOSX, iPhone and Windows (Cygwin, Strawberry Perl or Activestate perl)
Using get_iplayer
See the instructions and examples here
Downloading get_iplayer
See here
Installing get_iplayer
See the installation instructions here
Contact
You can send me bug reports in the comments below or email them to me at iplayer2 (at sign) linuxcentre.net
Actually, I was using the ‘--command’ in my options file to write out the metadata to an XML file after the programme had been downloaded.
Then using these file in combination with another script, I automatically import any downloaded programmes in to iTunes, parsing the XML files and also adding the appropriately formatted metadata. (I also download a bigger image for the iTunes library, where available e.g. from the BBC).
The same script then sends me an HTML email with a list of the downloaded programmes, split between radio and tv, with thumbnails and some of the programme metadata, to let me know what has been recorded. Every Friday another script emails me a summary of what is still un-watched in my iTunes TV library, ready for the weekend
All this is on a headless MacMini and runs at specified intervals (launchd). Makes for a brilliant PVR, so please don’t change the ‘--command’ stuff too much!! I just wanted to able to use the First broadcast and Last broadcast dates to add to the iTunes metadata.
On re-reading your email, are you saying you can use the ‘--info’ option in the options file to echo commands out to an XML file using --info rather than --command?
Let me know if you need any further information.
Russ
What I meant to say was: as a workaround, if you also specify the --info option this has the side-effect of the --command option being able to use those tags you wanted like lastbroadcast etc etc. In fact, if you run the command with --debug and look for lines starting with ‘DEBUG: Substitute’ then you will see a list of the tags that are available. Try with and without --info and you will see the difference.
(O/S=XPsp3, new install) ‘Default’ mode works, but can’t get flvstreamer to work. It bombs out with ‘WARNING: HandShake, client signiture does not match!’. I tried video and audio ‘flash’ downloads
-----
INFO: Trying flashaac1 mode to record radio: Shipping Forecast - 11/06/2009
INFO: File name prefix = Shipping_Forecast_-_11_06_2009_b00krywp_default
INFO: Command: .\rtmpdump.exe --port 1935 --protocol “0″ --playpath “mp4:radio4/
secure_auth/RBN2_radio_4_fm_-_thursday_0520_b00kryw3_2009_06_11_05_00_23″ --host
“bbcmedia.fcod.llnwd.net” --auth “s=1244842685&e=1244842765&h=c6c46986d5d64fb66
dd2796cd5403f8a” --swfUrl “http://www.bbc.co.uk/emp/9player.swf?revision=9644_10
144″ --tcUrl “rtmp://bbcmedia.fcod.llnwd.net:1935/a1414/e3″ --app “a1414/e3″ --r
esume -o “Downloads\/Shipping_Forecast_-_11_06_2009_b00krywp_default.partial.aa
c.flv” 1>&2 --timeout 20
FLVStreamer v1.7
(c) 2009 Andrej Stepanchuk, license: GPL
DEBUG: Setting buffer time to: 36000000ms
Connecting …
DEBUG: Protocol : RTMP
DEBUG: Hostname : bbcmedia.fcod.llnwd.net
DEBUG: Port : 1935
DEBUG: Playpath : mp4:radio4/secure_auth/RBN2_radio_4_fm_-_thursday_0520_b00kryw
3_2009_06_11_05_00_23
DEBUG: tcUrl : rtmp://bbcmedia.fcod.llnwd.net:1935/a1414/e3
DEBUG: swfUrl : http://www.bbc.co.uk/emp/9player.swf?revision=9644_10144
DEBUG: app : a1414/e3
DEBUG: auth : s=1244842685&e=1244842765&h=c6c46986d5d64fb66dd2796cd5403f8a
DEBUG: flashVer : LNX 9,0,124,0
DEBUG: live : no
DEBUG: timeout : 20 sec
DEBUG: Connect, … connected, handshaking
DEBUG: HandShake: Type Answer : 03
DEBUG: HandShake: Server Uptime : 1240304751
DEBUG: HandShake: FMS Version : 3.0.4.1
WARNING: HandShake, client signiture does not match!
DEBUG: Connect, handshaked
Connected…
Starting download at 0.000 KB
ERROR: ReadN, RTMP recv error 10060
ERROR: ReadPacket, failed to read RTMP packet header
Closing connection… done!
WARNING: Failed to stream file Downloads\/Shipping_Forecast_-_11_06_2009_b00kryw
p_default.partial.aac.flv via RTMP
INFO: skipping flashaac1 mode
ERROR: Failed to record ‘Shipping Forecast - 11/06/2009 (b00krywp)’
It seems to work for me. Can you get any flash modes working for any programmes? Are you behind a firewall, outside UK or behind a proxy? Otherwise I have no idea.
UK-based, no proxy, bog-standard McAfee AV/firewall. I’ve not managed to download any flash-mode content using get_iplayer, but non-flash downloads work OK. The command line I used for that example used ‘-amode=flash’ and it cycled through all the flash options but they all failed with the same error.
(totally unrelated… but Sod’s Law says get_iplayer also fails to download flash on my Linux-based eeePC, but that gives an obvious error… flvstreamer/rtmpdump needs glibc_2.4 and eeePC only has glibc_2.36)
Probably McAffee Firewall. I had a similar problem with some users that couldn’t get script updates using other Personal FWs. Try temporarily disabling it and try again. If that fixes it then you may need to add rtmpdump/flvstreamer and get_iplayer as trusted apps or port 1935 as a trusted port.
Seems to have been a temporary thing, although it lasted over 24hrs… everything I’ve gone for today has downloaded (tried flashhigh and flashvhigh), although at least 1 needed a 2nd attempt before it fired up.
I’ll have a go at ‘make’ on the eeePC later (possibly *much later*) and if it works OK I’ll let it loose on the eeeUser forum/wiki (they have a very old wiki entry that just outlines what needs to be done)
Also, flvstreamer is VERY easy to compile. Just unpack it cd into the dir and type ‘make’. That easy as long as you have g++ and make installed.
Yippie! I can listen to the BBC’s newshour again! Thanks so much.
Mike
Hi folks,
Anyone tried using php to execute and send commands to this file?
Can anyone give the syntax for downloading BBC Archive recordings? (Post of June 10 said that this was now possible).
Try this: Get the ‘URL’ with the embedded media player in it for the programme you wish to record or watch. then add it in as follows:
get_iplayer --pid “tv:URL” --vmode=flashnormal
Note the use of double quotes around the --pid argument - needed because the URL has character s in it which upset the command line like ‘?’ and ‘&’, If this fails on your OS try single quotes.
The filename will contain the URL so you’ll probably want to rename it.
Sorry the blog mangled the command a bit I meant:
get_iplayer --pid “tv:URL” --vmode=flashnormal
Where ‘URL’ is the archive page of the player.
for example how to use get-iplayer with page at:
http://www.bbc.co.uk/archive/steamtrains/7318.shtml?all=1&id=7318
get_iplayer --pid “tv:http://www.bbc.co.uk/archive/steamtrains/7318.shtml?all=1&id=7318” --vmode=flashnormal
I’m running a CLI on Windows XP, with flvstreamer.exe and ffmpeg.exe in the same directry as get_iplayer (the directory I’m running from). Command line is ” get_iplayer.pl --get --pid prog_pid --vmode=flashhd --force --flvstreamer ./flvstreamer.exe ./ffmpeg.exe ”
I’m always getting the error
” ‘.’ is not recognized as an internal or external command…. ”
I think my paths are incorrect, but don’t know where i’m wrong…
Try .\flvstreamer.exe - the slashes should be around the other way in windows. Also, you need to add the --ffmpeg option before telling get_iplayer where it is. If you use the latest Automated Installer then you shouldn’t need to specify either --ffmpeg or --flvstreamer options. Although the binary is called rtmpdump.exe in the automated installer, it is actually flvstreamer in disguise! Also with the installer version you should use get_iplayer.cmd as the command.
Fantastic, the path change worked perfectly (I’d omitted the --ffmpeg in the post but had been using it….)
Works great now, thanks very much.
Using get_iplayer on Ubuntu Jaunty Server. Using get_iplayer 2.03 and flvstreamer-1.8a
I’m calling get_iplayer from inside a PHP script. This works perfectly by default, and the iphone version of the requested show is downloaded no problems.
The problem starts when I add the --vmode=flashvhigh (or any flash option). The following error is shown (I’ve substituted the show name with ‘Show’):
[snip]
INFO: File name prefix = Show
INFO: Downloading Subtitles to /folder/show.srt
WARNING: Failed to stream file /folder/show.mp4.flv via RTMP
INFO: skipping flashvhigh2 mode
ERROR: Failed to record ‘Show (b0074s9j)’
[snip]
This PHP script is called via cron, and the get_iplayer bit is the following:
get_iplayer --subtitles --get $array_get_iplayer[$i] --metadata=xmbc --vmode=flashvhigh --file-prefix ‘<name>-<episode>’ --force --overwrite --command ‘mv -f “<dir>” “/folder/<name> - <episode>”
The weird thing is, when I run the PHP script from the shell there are no problems - flvstreamer is able to stream the file: this makes me think there’s a permission problem, but I’m not sure what isn’t allowing what to run…
Any ideas?
It could be that the environment vars under the php script are different and cannot see flvstreamer in the path. Try explicitly stating the location like: --flvstreamer=/path/to/flvstreamer
Also, probably best to add --nopurge option also. Did you also know that you can specify the download dir by using --outputtv or just --output and you can set it to create separate subdirs using --subdir. That might save you from having to run the mv command.
OK, I’ll try explicitly stating the flvstreamer location, but I thought that get_iplayer checked the options file in ~/.get_iplayer for this information anyway?
In that file I have:
rtmpdump /home/user/flvstreamer-1.8a
output /folder/.iplayer/
subdir 1
You’ll notice that I do let get_iplayer create separate folders for each episode. The reason for the mv command is that I prefer cleaner directory names (without underscores etc), because later scripts pick up the folder name and do all sorts of funky stuff for the media centre installed on the server.
Anyway, I’ll try explicitly stating the flvstreamer path in the php command…
Correct, options will be picked up from the options file. Maybe get your script to run “bash -c ’set; export’” to see that the requisite env vars are as expected. I think that $HOME might be an important one here otherwise it may not know where to look for options. You could always force this with --profile-dir=/path/to/profile/dir/
Also maybe look into using --whitespace option to get rid of those underscores etc.
--whitespace? When the hell did that appear? Good God, this thing updates far too quickly for me!! Good job!!
get_iplayer --long-help
Been in there for almost a year
Ha!! Now I look dumb! You have no idea how many times I’ve done --helplong and never noticed that! Anyway, for other reasons I think I’m still gonna stick to the mv command for now.
As for explicitly stating the path for flvstreamer: still doesn’t work. My script now runs:
get_iplayer --subtitles --get $array_get_iplayer[$i] --nopurge --flvstreamer=/home/user/flvstreamer-1.8a --vmode=flashvhigh --file-prefix ‘<name>-<episode>’ --force --overwrite
I also tried putting the flvstreamer blob into the www folder to see if it was a php access problem, but it doesn’t change anything!
Try running the script with --verbose and --showopt and see what it says..
I’ve emailed you the results - thought it’d look pretty untidy on here…
I had a look at the email you sent and I think it might be that flvstreamer is not executable by the user which runs the php script. I suggest you put the flvstreamer binary somewhere where the web server user can read it and make sure you do a ‘chmod 755 /path/to/flvstreamer’ as root. I’ve put a fix in the next version of get_iplayer to catch this…
Now that is service!! I tried putting the binary blob in the web directory already, but didn’t quite do the whole chmod 755 stuff…
I’ll report back..
I don’t understand why a BBC video file *will* play in Media Player Classic (MPC) if I download an iPhone version with get_iplayer (and rename it from .MOV to .FLV), whereas if I download a Flash version (e.g. Flash Normal) using RTMPDUMP the file *won’t* play in MPC. In the latter case, the only program the FLV file will play in is the Applian player.
Could you explain, in general terms, for the benefit of non-technical users such as myself, what the distinction is between the two types of file.
I use Gabest’s Media Player Classic v6.4.9.0 (2006), and Applian FLV Player v2.0, on a Windows ME system.
The mov file is a Quicktime h.264 file. The flashnormal file is flv which is an abobe streaming container format for various codecs. ffmpeg should auto convert this to an avi container after downloading. I cannot comment on those players you mantion because I’ve never used any of them. Try ffplay.exe or mplayer.exe (somewhere under the get_iplayer folder in wondows). Or just download vlc. All of these open source ones work.
I just updated to 2.04 from 1.97, and it has stopped working. Output below…
INFO: 1 Matching Programmes
INFO: Mode list: flashhigh1,flashhigh2,flashhigh3
INFO: Checking existence of default version
INFO: flashhigh3 modes will be tried for version default
INFO: Trying flashhigh3 mode to record tv: Michael McIntyre’s Comedy Roadshow -
Swansea
INFO: File name prefix = Michael_McIntyres_Comedy_Roadshow_-_Swansea_b00ldgr2_de
fault
FLVStreamer v1.8a
(c) 2009 Andrej Stepanchuk, license: GPL
Connecting …
Connected…
Starting download at 0.000 KB
ERROR: ReadN, RTMP recv error 10060
ERROR: ReadPacket, failed to read RTMP packet header
Closing connection… done!
WARNING: Failed to stream file Downloads\/Michael_McIntyres_Comedy_Roadshow_-_Sw
ansea_b00ldgr2_default.partial.mp4.flv via RTMP
INFO: skipping flashhigh3 mode
ERROR: Failed to record ‘Michael McIntyre’s Comedy Roadshow - Swansea (b00ldgr2)
‘
Try this: run v2.04 on this download with --verbose and save the output in a file. Then downgrade get_iplayer to 1.97 and do the same thing again and then email me the output text (email address on the contact page). Can you make sure before you run these commands that there are definitely no partially downloaded files of the same programme….
I am out here in the Maldives for the next several months and have come up with a feature request. I know many people here that would love this feature. The ISPs here only allow 10KB/s downloads. The thing is, this is one of the few places I have been in recent years where concurrently downloading multiple segments increases the speed by 12-fold to the actual line speed of 120KB/s. I was wondering if there was anyway you could build support for this in?
Thanks,
Thomas
The reason parallel downloads go faster is because of TCP handshakes and ACK latencies (i.e. flow control) on a TCP session means that you cannot make full use of the available bandwidth using a single TCP session without some serious TCP tweaking. In the Maldives you’d most likely be usiang a satellite link which have notoriously high ping latencies.
get_iplayer is happy to run in parallel for normal searches but will lock out parallel PVR runs.
You could put your PVR searches into named presets and then run all those at the same time. e.g.
Setup 2 presets:
get_iplayer ‘Top Gear’ --preset=topgear --get --prefs-add
get_iplayer Eastenders --preset=eastenders --get --prefs-add
Then run them using:
get_iplayer --preset eastenders &
get_iplayer --preset topgear &
(miss off the & in Windows and just fire off the commands in parallel in different cmd windows.)
I could download multiple shows at once but ideally would like to be able to download one show through multiple connections, like a download accelerator would.
I don’t plan on adding that. That would require quite serious patching to flvstreamer and not get_iplayer.
I was thinking just for the iPhone versions but that’s fine. Your program is excellent as it is. I have already started to abandon my own GUI for iPlayer-DL at times to use yours. I am thinking about writing a Cocoa GUI for Get_iPlayer but that would be significantly more complicated than for iPlayer-DL. We shall see.
Thanks,
Thomas
Ahh, that’s a very good point! I’ll have a think about it.
A Cocoa gui for get_iplayer need only be as compilcated as you want it to be. You could just put very minimal functionality in there…
Hi,
Very very new to this, used to bit torrents…
enjoying using so far.
few things…
1) after a download is finished, it seems to keep going, not no MB’s changing etc…
2) if i do a type search ie itv, it only seems to show around 600 ish files, from say “T” only…
3) I tried searching for a program, ie erm ‘the jeremy kyle show’, wife loves that! but it said no finds, but its on the itv listings. maybe im doing the search wrong.
4) any other basics anyone can advise..
thanks
I’m assuming you are using windows. Firstly update get_iplayer from the menu. Then you need to ensure you are using the --itvnothread option as follows (this will save it as default so you only need to do this once)
get_iplayer.cmd --prefs-add --itvnothread
Then to find Jeremy Kyles shows:
get_iplayer.cmd --type=itv ‘Jeremy Kyle’
This will give you a list of shows. Pick one or more of those numbers and get using (my example gets the episodes numbered 100874 and 100873 buyt these may be different on your system.):
get_iplayer.cmd --type=itv 100874 100873
Then just wait…. and they should be in the Downloads folder.
If your ptogramme listing scrolls off the page, try adding ‘| more’ to the command
I might seem dumb, but not used to these type of commands etc, so bare with me, but i appreciate help…
not sure on the update, it says im using version 2.04…
I dont know how to type that straight line! can see the key lol…
i need to find hollyoaks off channel 4, any chance?
I try to download a full series at one, ie
get_iplayer --type=itv --get ‘60 minutes makeover’
it fines all 11 or whatever it is, but only downloads the first one….
can anyone help??
On windows I just did (after adding that -itvnothread option as described above):
get_iplayer --type=itv “makeover” --get
and it downloaded at least 3 episodes before I got bored waiting for the rest. I cannot work out what’s up with yours. I did use double quotes as oppsed to single ones… Maybe try that.
The very ending of programs seem to be missed, any ideas?
Hi, I’ve tried on three machines to download this one stream and had no joy. I can’t get much further than one hour but the full stream is 1:08.
get_iplayer --url http://www.bbc.co.uk/glastonbury/2009/artists/animalcollective/ --type radio --force --overwrite --nopurge --nocopyright
ERROR: ReadN, RTMP recv error 10060
ERROR: ReadPacket, failed to read RTMP packet header
I’ve tried on a Vista machine, an XP machine and another XP machine (with different router and ISP).
Any ideas? FWIW, I see that error message quite a bit. Usually I keep trying until I get all of it, but this one is proving difficult.
It’s a bug in flvstreamer. I’ll try to contact the maintainer and get it fixed. It would appear that the partially downloaded file is not correctly tagged as an audio stream in the FLV header, subsequently any retries fail to find the last video key frame and the resume fails. Also the exit code of flvstreamer tells get_iplayer it succeeded.
As a temporary workaround to get resume working, just open the partial file in a hex editor and change the 5th byte in the file from ‘0×05′ to ‘0×04′ and then rerun get_iplayer it will then resume.
Pages
Categories
Recent Comments
Recent Posts
Links
Admin
Translate
Charity
© 2009 Linuxcentre | WordPress
WordPress Themes