Usage:
Run ‘get_iplayer -h’
Examples:
* List all programmes (either from BBC site or cached):
get_iplayer
* List all programme names matching ‘News’:
get_iplayer news
* List all Radio programme names matching ‘News’:
get_iplayer --type=radio news
* List all programmes with long descriptions:
get_iplayer --long
* List all programmes with categories containing the word ‘News’ and on channel ‘BBC One’
get_iplayer --channel=’BBC One’ --category=News
* List all programmes added to the cache since 24 hours ago:
get_iplayer --since=24
* Refresh/flush the programme cache (this happens after 4hrs automatically):
get_iplayer --flush
* Download programme number 123 (see index list):
get_iplayer --get 123
* Download Radio programme number 10123 (see index list):
get_iplayer --get 10123
* Download Radio programme number 10123 and tv programme number 324 (see index list):
get_iplayer --get 10123 324
* Download Podcasts matching ‘Moyles’:
get_iplayer --type=podcast --get ‘Moyles’
* Download all tv programmes with ‘blue peter’ in the title/episode:
get_iplayer --get ‘blue peter’
* Download all tv programmes with ‘blue peter’ in the title/episode, and programme index 123:
get_iplayer --get ‘blue peter’ 123
* Download all programmes with URL that contains a programme ID (pid) b002a23a (i.e. the URL of the programme page on BBC iplayer):
get_iplayer --get --pid http://blah.blah.blah/b002a23a.shtml
* Download all programmes with ‘comedy’ in the title, episode or long description:
get_iplayer --long --get comedy
* Download all programmes with categories containing ‘music’:
get_iplayer --get --category=comedy
* List all available categories for Radio and TV programmes:
get_iplayer --list=categories --type=’tv,radio’
* List all available radio channels:
get_iplayer --list=channel --type=radio
* List all programmes with categories not containing the string ‘child’ on BBC One:
get_iplayer --exclude-category=child --channel=’bbc one’
* Stream a programme in mplayer or xine while downloading it to disk:
get_iplayer --stdout --get 123 | mplayer -cache 2048 -
get_iplayer --stdout --get 123 | xine stdin:/
* Stream a programme in mplayer or xine while not downloading it to disk:
get_iplayer --nowrite --stdout --get 123 | mplayer -cache 2048 -
get_iplayer --nowrite --stdout --get 123 | xine stdin:/
* Check for Updates and Download new version of get_iplayer (also creates backup):
get_iplayer --update
* Save proxy settings and verbose mode to defaults in ~/.get_iplayer/options
(or ‘%USERPROFILE%\.get_iplayer\options’ in ActivePerl/Windows):
get_iplayer --save --verbose --proxy=http://proxy.domain.com:3128
* Save programme type settings to default in ~/.get_iplayer/config:
get_iplayer --type=all --save
* Download programme number 123 with subtitles (if available) and insert a
subtitle delay of 5 seconds:
get_iplayer --subtitles --suboffset 5000 --get 123
* Display the Various BBC iPlayer stream URLs for programme index 123:
./get_iplayer --streaminfo 123
* Run a custom user command after a successful download using the following substitutions:
<index> => index number
<name> => programme short name
<episode> => Episode info
<desc> => Long Description
<available> => Date/Time made available or remaining
<longname> => Long name
<duration> => duration in HH:MM:SS
<versions> => comma separated list of versions, e.g Default,Signed
<version> => selected version e.g Default, Signed
<thumbnail> => programme thumbnail url
<channel> => TV channel
<categories> => Categories
<type> => Type: tv, podcast or radio
<filename> => Filename of downloaded file
<versions> => Comma separated list of versions, e.g default,signed
<timeadded> => timestamp when programme was added to the cache
<dir> => Directory of file
<fileprefix> => Filename Prefix of file
<ext> => Filename Extension of file
get_iplayer -get 123 --command ‘echo “<index> <filename> <name> <episode> <desc> <available> <longname> <duration> <versions> <version> <thumbnail> <channel> <categories> <type> <pid>”‘
* Use a user defined filename-prefix format using the above substitutions:
get_iplayer -get 123 --file-prefix ‘<name>-<episode>-<longname>-<version>-<pid>’
* Using the command option to background transcode your downloaded video to mp4 format:
get_iplayer -get 123 --command ‘mencoder -ovc lavc -lavcopts vcodec=mpeg4 -oac lavc -lavcopts abitrate=128 -o <filename>.mp4 <filename> -quiet &’
* Using rtmpdump tool to get high quality Flash download version of a TV programme (--rtmpdump is optional)
get_iplayer -get 123 --vmode=rtmp --rtmpdump=’/path/to/rtmpdump’
PVR Usage Examples:
The PVR functionality allows you to download any number of iPlayer programmes
using any combination of search terms that you would normally run on the
command line. The PVR searches are saved in ~/.get_iplayer/pvr/.
You can Add, Delete and List the PVR searches. This feature allows you to
run multiple batch downloads froma scheduler such as Unix crond (and possibly
the Windows scheduler).
* Add a new PVR search (using any usual search options):
get_iplayer --pvr-add=bbc1_comedy_tv_progs --category=comedy --type=tv --output=/path/to/my/pvr/downloads/ --channel=’BBC One’
* List the PVR searches already added:
get_iplayer --pvr-list
* Remove a PVR search:
get_iplayer --pvr-del=bbc1_comedy_tv_progs
* Disable a PVR search:
get_iplayer --pvr-disable=bbc1_comedy_tv_progs
* Re-enable a PVR search:
get_iplayer --pvr-enable=bbc1_comedy_tv_progs
* Run the PVR (this really should be added to your scheduler such as cron):
get_iplayer --pvr
* Line to add to user’s crontab (use ‘crontab -e’ to edit) - this will run all of the PVR jobs every hour:
0 * * * * /path/to/get_iplayer --pvr 2>>/tmp/get_iplayer.log
* In Linux/Unix, to notify by email when programme(s) have been downloaded, add this to the top of your crontab (this will catch the stdout from the cron job and send to the specified email address):
MAILTO=me@mydomain.com
Notes:
* The first time you run the script it will access the BBC website and
download an index of all programmes currently on iplayer / podcasts.
* Sometimes you will not be able to download a programme listed due to BBC
not encoding it yet for H.264 format (usually happens within 24hrs of airing).
Also BBC don’t seem to create an H.264 version for some programmes at all.
* Windows/ActiveState Perl does not support fifos/named pipes and therefore
any RealAudio radio download will only be transcoded to mp3 after downloading.
Also none of the --stdout options will work with RealAudio radio.

How do I get a list of all the programs available? Piping the output on both the Linux and Windows versions doesn’t work. It either ignores the target or uses it as a search term.
@Bart Smit 2>&1 | grep blah, blah, blah
The programme listings are sent to STDERR rather than STDOUT. To pipe this in Linux shell use:
get_iplayer
This effectively redirects STDERR into STDOUT. I may well make the listings go to STDOUT in future versions - you aren’t the first to have this issue…