Audio/video stream recording forums (http://stream-recorder.com/forum/index.php)
-   rtmpdump (http://stream-recorder.com/forum/forumdisplay.php?f=54)
-   -  

Using rtmpdump,rtmpsrv,rtmpsuck,RTMPexplorer to download BBC iPlayer radio & TV shows

(http://stream-recorder.com/forum/showthread.php?t=9995)

macey 02-13-2010 08:42 PM

Using rtmpdump,rtmpsrv,rtmpsuck,RTMPexplorer to download BBC iPlayer radio & TV shows


 
I have bee using rtmpsuck to determine the input parameters
required to stream this site:-
Code:

http://atdhe.net/watch-bbc-news.php"]http://atdhe.net/watch-bbc-news.php
rtmpsuck output:-
Code:

Streaming on rtmp://0.0.0.0:1935
Processing connect
app: live?_fcs_vhost=cp52113.live.edgefcs.net&akmfv=1.8
flashVer: LNX 10,0,32,18
swfUrl: http://media2.myfoxtampabay.com/html/live/AkamaiFlashPlayer.swf
tcUrl: rtmp://61.19.12.95:1935/live?_fcs_vhost=cp52113.live.edgefcs.net&akmfv=1.8
pageUrl: http://atdhe.net/watch-bbc-news.php


I have substituted all of these into rtmpdump parameters but still not working.

Does anyone have any suggestions?

croques 04-05-2010 04:51 AM

BBC TV Recording with rtmpsuck


 
Hi
I'm experimenting with rtmpsuck.

I get the following when flash 10 plays a BBC TV file in my browser.

RTMP Proxy Server v2.2b
(c) 2010 Andrej Stepanchuk, Howard Chu; license: GPL

Code:

Streaming on rtmp://0.0.0.0:1935
Processing connect
app: ondemand?_fcs_vhost=cp41752.edgefcs.net&auth=dbEaic1aearcec4cZaGb0bjccaFdlcpbibg-blUB2S-c0-d0i_-JpoDEnDpJDtGowE&aifp=v001&slist=secure/idents/h264/bbc_one
flashVer: LNX 10,0,45,2
swfUrl: http://www.bbc.co.uk/emp/10player.swf?revision=15501_15796
tcUrl: rtmp://92.123.153.165:1935/ondemand?_fcs_vhost=cp41752.edgefcs.net&auth=dbEaic1aearcec4cZaGb0bjccaFdlcpbibg-blUB2S-c0-d0i_-JpoDEnDpJDtGowE&aifp=v001&slist=secure/idents/h264/bbc_one
pageUrl: http://www.bbc.co.uk/iplayer/episode/b00s0b6g/Jonathan_Creek_The_Judas_Tree/
WARNING: Trying different position for server digest!

ERROR: RTMP_ReadPacket, failed to read RTMP packet header
Closing connection... done!

Processing connect
app: ondemand?_fcs_vhost=cp41752.edgefcs.net&auth=dbEdlcPctbDbNcKcnbNbmcPcxchc_bRaHcf-blUB2X-c0-d0i_-CpmFJoFoODtGqxL&aifp=v001&slist=secure/b000s09cdH264151585069
flashVer: LNX 10,0,45,2
swfUrl: http://www.bbc.co.uk/emp/10player.swf?revision=15501_15796
tcUrl: rtmp://92.123.153.165:1935/ondemand?_fcs_vhost=cp41752.edgefcs.net&auth=dbEdlcPctbDbNcKcnbNbmcPcxchc_bRaHcf-blUB2X-c0-d0i_-CpmFJoFoODtGqxL&aifp=v001&slist=secure/b000s09cdH264151585069
pageUrl: http://www.bbc.co.uk/iplayer/episode/b00s0b6g/Jonathan_Creek_The_Judas_Tree/
WARNING: Trying different position for server digest!

ERROR: RTMP_ReadPacket, failed to read RTMP packet header
Closing connection... done!

Any guru with pointers please?

hyc 04-05-2010 05:57 PM

Re: BBC TV Recording with rtmpsuck


 
Run it with -z to get the debug output.

croques 04-06-2010 06:26 AM

Re: BBC TV Recording with rtmpsuck


 
The tail of the output is:-

Code:

DEBUG: HandShake: Genuine Adobe Flash Media Server
DEBUG: HandShake: Handshaking finished....
DEBUG: RTMP_Connect1, handshaked
DEBUG2: RTMP_SendPacket: fd=5, size=665
  0000:  03 00 00 01 00 02 99 14  00 00 00 00              ............     
  0000:  02 00 07 63 6f 6e 6e 65  63 74 00 3f f0 00 00 00  ...connect.?.... 
  0010:  00 00 00 03 00 03 61 70  70 02 00 9d 6f 6e 64 65  ......app...onde 
  0020:  6d 61 6e 64 3f 5f 66 63  73 5f 76 68 6f 73 74 3d  mand?_fcs_vhost= 
  0030:  63 70 34 31 37 35 32 2e  65 64 67 65 66 63 73 2e  cp41752.edgefcs. 
  0040:  6e 65 74 26 61 75 74 68  3d 64 62 45 62 6f 61 50  net&auth=dbEboaP 
  0050:  63 59 63 77 64 4e 64 6d  63 66 62 6b 62 69 61 43  cYcwdNdmcfbkbiaC 
  0060:  61 6f 63 33 64 50 62 63  64 47 63 66 2d 62 6c 55  aoc3dPbcdGcf-blU 
  0070:  59 7a 51 2d 63 30 2d 64  30 69 5f 2d 46 6e 6d 46  YzQ-c0-d0i_-FnmF 
  0000:  c3                                                .               
  0000:  41 70 79 71 4f 45 70 47  73 78 43 26 61 69 66 70  ApyqOEpGsxC&aifp 
  0010:  3d 76 30 30 31 26 73 6c  69 73 74 3d 73 65 63 75  =v001&slist=secu 
  0020:  72 65 2f 62 30 30 30 6d  6d 6e 38 64 48 32 36 34  re/b000mmn8dH264 
  0030:  31 35 31 34 33 37 34 33  36 00 08 66 6c 61 73 68  151437436..flash 
  0040:  56 65 72 02 00 0d 4c 4e  58 20 31 30 2c 30 2c 34  Ver...LNX 10,0,4 
  0050:  35 2c 32 00 06 73 77 66  55 72 6c 02 00 34 68 74  5,2..swfUrl..4ht 
  0060:  74 70 3a 2f 2f 77 77 77  2e 62 62 63 2e 63 6f 2e  tp://www.bbc.co. 
  0070:  75 6b 2f 65 6d 70 2f 31  30 70 6c 61 79 65 72 2e  uk/emp/10player. 
  0000:  c3                                                .               
  0000:  73 77 66 3f 72 65 76 69  73 69 6f 6e 3d 31 38 31  swf?revision=181 
  0010:  38 32 00 05 74 63 55 72  6c 02 00 b8 72 74 6d 70  82..tcUrl...rtmp 
  0020:  3a 2f 2f 39 32 2e 31 32  33 2e 31 35 33 2e 31 34  ://92.123.153.14 
  0030:  30 3a 31 39 33 35 2f 6f  6e 64 65 6d 61 6e 64 3f  0:1935/ondemand? 
  0040:  5f 66 63 73 5f 76 68 6f  73 74 3d 63 70 34 31 37  _fcs_vhost=cp417 
  0050:  35 32 2e 65 64 67 65 66  63 73 2e 6e 65 74 26 61  52.edgefcs.net&a 
  0060:  75 74 68 3d 64 62 45 62  6f 61 50 63 59 63 77 64  uth=dbEboaPcYcwd 
  0070:  4e 64 6d 63 66 62 6b 62  69 61 43 61 6f 63 33 64  NdmcfbkbiaCaoc3d 
  0000:  c3                                                .               
  0000:  50 62 63 64 47 63 66 2d  62 6c 55 59 7a 51 2d 63  PbcdGcf-blUYzQ-c 
  0010:  30 2d 64 30 69 5f 2d 46  6e 6d 46 41 70 79 71 4f  0-d0i_-FnmFApyqO 
  0020:  45 70 47 73 78 43 26 61  69 66 70 3d 76 30 30 31  EpGsxC&aifp=v001 
  0030:  26 73 6c 69 73 74 3d 73  65 63 75 72 65 2f 62 30  &slist=secure/b0 
  0040:  30 30 6d 6d 6e 38 64 48  32 36 34 31 35 31 34 33  00mmn8dH26415143 
  0050:  37 34 33 36 00 04 66 70  61 64 01 00 00 0c 63 61  7436..fpad....ca 
  0060:  70 61 62 69 6c 69 74 69  65 73 00 40 2e 00 00 00  pabilities.@.... 
  0070:  00 00 00 00 0b 61 75 64  69 6f 43 6f 64 65 63 73  .....audioCodecs 
  0000:  c3                                                .               
  0000:  00 40 a8 ee 00 00 00 00  00 00 0b 76 69 64 65 6f  .@.........video 
  0010:  43 6f 64 65 63 73 00 40  6f 80 00 00 00 00 00 00  Codecs.@o....... 
  0020:  0d 76 69 64 65 6f 46 75  6e 63 74 69 6f 6e 00 3f  .videoFunction.? 
  0030:  f0 00 00 00 00 00 00 00  07 70 61 67 65 55 72 6c  .........pageUrl 
  0040:  02 00 51 68 74 74 70 3a  2f 2f 77 77 77 2e 62 62  ..Qhttp://www.bb 
  0050:  63 2e 63 6f 2e 75 6b 2f  69 70 6c 61 79 65 72 2f  c.co.uk/iplayer/ 
  0060:  65 70 69 73 6f 64 65 2f  62 30 30 6d 66 33 62 6e  episode/b00mf3bn 
  0070:  2f 4d 69 63 68 61 65 6c  5f 4d 63 49 6e 74 79 72  /Michael_McIntyr 
  0000:  c3                                                .               
  0000:  65 5f 4c 69 76 65 5f 61  6e 64 5f 4c 61 75 67 68  e_Live_and_Laugh 
  0010:  69 6e 67 2f 00 00 09 01  00                        ing/.....       
DEBUG: Invoking connect
DEBUG2: RTMP_ReadPacket: fd=4
ERROR: RTMP_ReadPacket, failed to read RTMP packet header
Closing connection... done!

DEBUG: serverThread: processed request


elch 04-11-2010 08:51 AM

Re: BBC TV Recording with rtmpsuck


 
Good choice. I've also watched "Michael McIntyre: Live and Laughing". :)

This command works for me:

Code:

rtmpdump --port 1935 --protocol 0 --playpath 'mp4:iplayerstream/secure_auth/1500kbps/b000mmn8dh264_high_151437436?s=1270954121&e=1271040521&h=40203b7239a2737444b250888b79ed7e' --host bbcmedia.fcod.llnwd.net --swfUrl http://www.bbc.co.uk/emp/10player.swf\?revision=14200_14320 --tcUrl 'rtmp://bbcmedia.fcod.llnwd.net:1935/a1414/e3' --app 'a1414/e3' --timeout 10 -o '/dev/shm/iplayer_streaming_h264_flv_high.flv'
You might need to update some parameters.

hyc 04-11-2010 05:06 PM

Re: BBC TV Recording with rtmpsuck


 
Please don't specify the options in that manner, support for that style will be dropped in a future release.

Code:

rtmpdump -r rtmp://bbcmedia.fcod.llnwd.net --playpath 'mp4:iplayerstream/secure_auth/1500kbps/b000mmn8dh264_high_151437436?s=1270954121&e=1271040521&h=40203b7239a2737444b250888b79ed7e' --swfUrl http://www.bbc.co.uk/emp/10player.swf\?revision=14200_14320 --app 'a1414/e3' --timeout 10 -o '/dev/shm/iplayer_streaming_h264_flv_high.flv'

croques 04-12-2010 01:06 AM

Re: BBC TV Recording with rtmpsuck


 
@elch

Despite hyc's wristslap it works, as written, for me too! Thanks for spelling it out. :)

elch 04-12-2010 09:15 AM

Re: BBC TV Recording with rtmpsuck


 
@croques:
Great to hear.

@hyc:
What's the advantage of the new approach? BBC also saves the parameters separated in a XML file which my script just parses. Finally, it passes them on to the rtmpdump binary without doing any unnecessary concatenation etc. Actually, using separated parameters is even less confusing because you don't need to wonder if an option has higher precedence, like --host over -r.

hyc 04-12-2010 10:27 AM

Re: BBC TV Recording with rtmpsuck


 
I'm in the midst of getting librtmp supported in ffmpeg, mplayer, and XBMC. Each of these programs had completely different methods of specifying options. I've defined a single URL format that works for all of them. Better to have a single format that works consistently across all software. rtmpdump is going to migrate to that format too.

The U in URL stands for "universal" and that's the way things should be...

elch 04-12-2010 11:43 AM

Re: BBC TV Recording with rtmpsuck


 
In my opinion, it shouldn't be the task of the library to do the dirty parsing stuff. To neglect a clean API just because of badly designed applications has never been a good idea. What's wrong with making the applications only specify the values without passing inconsistent-formatted RTMP addresses to librtmp?


All times are GMT -6. The time now is 12:12 AM.