These instructions enable you to find the URL address of an RTMP
stream, i.e. the real address of a BBC iPlayer radio or tv show,
using a program called RTMPSRV.EXE, and you then use that address
with the main program (RTMPDUMP.EXE) to download that show -
1. Use Get_iPlayer to download the RTMP stream info for the BBC
radio or tv show which you want to record: insert the 8-digit
PID (Programme ID) number from the URL address of the iPlayer
page for that show, in place of the 8 zero's in this command -
perl get_iplayer.pl --type=radio --streaminfo PID:00000000 > BBC.txt
2. All you need from the text file which the previous step creates
is the HOST address, but that step is unnecessary 99% of the time
because for the BBC iPlayer the host address is normally this:
bbcmedia.fcod.llnwd.net
3. Edit your computer's HOSTS file, as follows:
(a) Go to START > RUN and type this in the box, then click OK:
C:\WINDOWS\COMMAND\ATTRIB.EXE -R -S -H C:\WINDOWS\HOSTS
(b) Go to START > RUN and type this in the box, then click OK:
EDIT C:\WINDOWS\HOSTS
(c) Disable the line in the HOSTS file that reads
"127.0.0.1 localhost" by putting a # at the start of that line
(d) Type in the following line, immediately underneath that line:
127.0.0.1 bbcmedia.fcod.llnwd.net
(e) Save the changes: File > Save
NB: When it's all over, put your HOSTS file back to normal by
reversing all these changes.
4. Download the program RTMPDUMP version 2.2d from this link:
http://rtmpdump.mplayerhq.hu/downloa...2d-windows.zip
The .zip file includes RTMPSRV.exe as well as RTMPDUMP.exe,
so run RTMPSRV.exe (by double-clicking it).
5. Open the iPlayer page that plays the radio or tv show you
want to download, and start it playing. This is an example
of the page URL address (you must substitute the show's
8-digit PID number for the 8 zero's in this example) -
http://www.bbc.co.uk/iplayer/console/00000000
6. Now look at the window in which RTMPSRV is running. It will
start displaying the true RTMP address of the tv or radio show
that the iPlayer is trying to play in the other window.
Command Format:
rtmpdump -r "rtmp://[server]:[port]/[application]?[authString]"
-a "[application]?[authString]" -f "[Flash Version]" -W "[swfUrl]"
-p "[iPlayer page URL]" -y "[mp4: to .mp4 playpath]" -o file.flv
Command Example:
rtmpdump -r "rtmp://bbcmedia.fcod.llnwd.net:1935/a1414/e3?as=adobe
-hmac-sha256&av=1&te=connect&mp=bbc7/secure_auth/RBN2_bbc_-_thursd
ay_1930_b00sg0w7_2010_05_20_19_26_38.mp4&et=127493 4408&fmta-token
=2b4b12633bfd205b3d7f3060c0f827c37ae18080883697444 853b3c7866b40ee"
-a "a1414/e3?as=adobe-hmac-sha256&av=1&te=connect&mp=bbc7/secure_
auth/RBN2_bbc_-_thursday_1930_b00sg0w7_2010_05_20_19_26_38.mp4&et =
1274934408&fmta-token=2b4b12633bfd205b3d7f3060c0f827c37ae18080883
697444853b3c7866b40ee" -f "WIN 9,0,260,0" -W "http://www.bbc.co.uk
/emp/9player.swf?revision=18182_20020" -p "http://www.bbc.co.uk/
iplayer/console/b00sg1gl" -y "mp4:bbc7/secure_auth/RBN2_bbc7_-_th
ursday_1930_b00sg0w7_2010_05_20_19_26_38.mp4" -o filename.flv
7. Write a batch (.BAT) file called RTMP_SRV.BAT to run RTMPSRV.EXE
and pipe its output into a second .BAT file, one that can be used
then to actually download the iPlayer show -
This is the content of RTMP_SRV.BAT:-
rtmpsrv > rtmpdump_run.bat
If you run RTMPSRV.EXE by double-clicking on the batch file
RTMP_SRV.BAT, it will save all its output into RTMPDUMP_run.bat
- but remember: it is saving the URL address of the iPlayer
show, not the actual show itself!
Note: You can NOT run RTMPDUMP_run.bat to download the iPlayer
show until you have re-edited your HOSTS file back to
its original state (or you'll get an error message).
Note: There will be
many copies of the download command saved
into the batch file RTMPDUMP_run.bat so you must
delete
all except one! Otherwise the batch file will keep deleting
(i.e. overwriting) the download every time it completes!
8. Finally, you must change the file extension of the downloaded
file from .MP4 to .FLV because it is really a Flash FLV file!
A Flash audio or video file will play in
GOM Player or in
Applian FLV Player .
There are tools to extract the MP4 file from inside the FLV
wrapper, if you want to do that (e.g. FFMPEG.EXE).