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

Specify the tcURL or rtmpdump might not work

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

WatchbbcDotOrg 11-04-2011 04:25 PM

Specify the tcURL or rtmpdump might not work


 
Found a nasty bug in rtmpdump. The buffer that is used internally to construct the tcUrl, if it isn't explicitily passed, is too small. Here's an example from the BBC. First what I passed rtmpdump and then you can see the information it echoed back. That's not just a truncated display of the tcUrl, that's actually what it is passing the server. The work-around is to explicitly pass the tcUrl, and everything is dandy.

rtmpdump -a "a1414/e3?as=adobe-hmac-sha256&av=1&te=connect&mp=iplayerstream/secure_auth/480kbps/MP/b00tyr8w_1320405462.mp4,iplayerstream/secure_auth/480kbps/MP/b00tyr8w_1320405462.mp4,iplayerstream/secure_auth/1500kbps/MP/b00tyr8w_1320405154.mp4,iplayerstream/secure_auth/400kbps/b00tyr8w_1320405462.mp4,iplayerstream/secure_auth/800kbps/MP/b00tyr8w_1320405470.mp4,iplayerstream/secure_auth/1500kbps/MP/b00tyr8w_1320405154.mp4,iplayerstream/secure_auth/800kbps/MP/b00tyr8w_1320405470.mp4,iplayerstream/secure_auth/100kbps/b00tyr8w_1320405462.mp4,prod_3gp_mpeg4_med/iplayerstream/prod_3gp_mpeg4_med/wifi_CBeebies_Bedtime_Stories_Episode_179_b00tyr8w _1320405462.mp4&et=1320450031&fmta-token=22853c1460014856485cfba5469a8b4014e6434ef464 a015f6fb0ef6d6ec4432" --host "bbcmedia.fcod.llnwd.net" --playpath "mp4:iplayerstream/secure_auth/1500kbps/MP/b00tyr8w_1320405154.mp4" -s "http://www.bbc.co.uk/emp/iplayer/revisions/617463_618125_3/617463_618125_3_emp.swf" --port 1935 --protocol "rtmp" -o activedl.flv


RTMPDump v2.3
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
DEBUG: Protocol : RTMP
DEBUG: Hostname : bbcmedia.fcod.llnwd.net
DEBUG: Port : 1935
DEBUG: Playpath : mp4:iplayerstream/secure_auth/1500kbps/MP/b00tyr8w_1320405154.mp4
DEBUG: tcUrl : rtmp://bbcmedia.fcod.llnwd.net:1935/a1414/e3?as=adobe-hmac-sha256&av=1&te=connect&mp=iplayerstream/secure_auth/480kbps/MP/b00tyr8w_1320405462.mp4,prod_3gp_mpeg4_med/iplayerstream/prod_3gp_mpeg4_med/wifi_CBeebies_Bedtime_Stories_Episode_179_b00tyr8w _1320405462.mp4,iplayerstream/secure_auth/1500kbps/MP/b00tyr8w_1320405154.mp4,iplayerstream/secure_auth/400kbps/b00tyr8w_1320405462.mp4,iplayerstream/secure_auth/800kbps/MP/b00tyr8w_1320405470.mp4,iplayerstream/secure_auth/100kbps/b00tyr8w_1320405462.mp4,iplayer
DEBUG: swfUrl : http://www.bbc.co.uk/emp/iplayer/rev...8125_3_emp.swf
DEBUG: pageUrl : http://www.bbc.co.uk/iplayer/episode..._Perfect_Baby/
DEBUG: app : a1414/e3?as=adobe-hmac-sha256&av=1&te=connect&mp=iplayerstream/secure_auth/480kbps/MP/b00tyr8w_1320405462.mp4,prod_3gp_mpeg4_med/iplayerstream/prod_3gp_mpeg4_med/wifi_CBeebies_Bedtime_Stories_Episode_179_b00tyr8w _1320405462.mp4,iplayerstream/secure_auth/1500kbps/MP/b00tyr8w_1320405154.mp4,iplayerstream/secure_auth/400kbps/b00tyr8w_1320405462.mp4,iplayerstream/secure_auth/800kbps/MP/b00tyr8w_1320405470.mp4,iplayerstream/secure_auth/100kbps/b00tyr8w_1320405462.mp4,iplayerstream/secure_auth/480kbps/MP/b00tyr8w_1320405462.mp4,iplayerstream/secure_auth/1500kbps/MP/b00tyr8w_1320405154.mp4,iplayerstream/secure_auth/800kbps/MP/b00tyr8w_1320405470.mp4&et=1320449266&fmta-token=cfbab6649ad53ebf96a89308615c66c7849520b86a9a c12c2c25d49dcfcad134
DEBUG: live : yes
DEBUG: timeout : 30 sec
DEBUG: Setting buffer time to: 36000000ms
Connecting ...
DEBUG: RTMP_Connect1, ... connected, handshaking
DEBUG: HandShake: Type Answer : 03
DEBUG: HandShake: Server Uptime : 189404762
DEBUG: HandShake: FMS Version : 4.0.3.1
DEBUG: HandShake: Handshaking finished....
DEBUG: RTMP_Connect1, handshaked

KSV 11-05-2011 12:02 AM

Re: Specify the tcURL or rtmpdump might not work


 
yeah buffer size is 512 bytes and it fells short for long auth string. after increasing it to 1024 bytes everything works fine. you should also post the bug report at rtmpdump official mailing list.

karlo2105 11-05-2011 08:22 AM

Re: Specify the tcURL or rtmpdump might not work


 
Why don't you check with the latest rtmpdump 2.4?

KSV 11-06-2011 06:14 AM

Re: Specify the tcURL or rtmpdump might not work


 
Quote:

Originally Posted by karlo2105 (Post 34124)
Why don't you check with the latest rtmpdump 2.4?

problem is with the latest version too. though i have increased buffer size in my local sources you have to report it to mailing list to get it fixed in official version.

karlo2105 11-06-2011 04:30 PM

Re: Specify the tcURL or rtmpdump might not work


 
As you are deeply involved into rtmpdump development, I think your releases should be official releases of rtmpdump. ;-)

hyc 11-08-2011 03:28 AM

Re: Specify the tcURL or rtmpdump might not work


 
Quote:

Originally Posted by WatchbbcDotOrg (Post 34105)
Found a nasty bug in rtmpdump. The buffer that is used internally to construct the tcUrl, if it isn't explicitily passed, is too small. Here's an example from the BBC. First what I passed rtmpdump and then you can see the information it echoed back. That's not just a truncated display of the tcUrl, that's actually what it is passing the server. The work-around is to explicitly pass the tcUrl, and everything is dandy.

rtmpdump -a "a1414/e3?as=adobe-hmac-sha256&av=1&te=connect&mp=iplayerstream/secure_auth/480kbps/MP/b00tyr8w_1320405462.mp4,iplayerstream/secure_auth/480kbps/MP/b00tyr8w_1320405462.mp4,iplayerstream/secure_auth/1500kbps/MP/b00tyr8w_1320405154.mp4,iplayerstream/secure_auth/400kbps/b00tyr8w_1320405462.mp4,iplayerstream/secure_auth/800kbps/MP/b00tyr8w_1320405470.mp4,iplayerstream/secure_auth/1500kbps/MP/b00tyr8w_1320405154.mp4,iplayerstream/secure_auth/800kbps/MP/b00tyr8w_1320405470.mp4,iplayerstream/secure_auth/100kbps/b00tyr8w_1320405462.mp4,prod_3gp_mpeg4_med/iplayerstream/prod_3gp_mpeg4_med/wifi_CBeebies_Bedtime_Stories_Episode_179_b00tyr8w _1320405462.mp4&et=1320450031&fmta-token=22853c1460014856485cfba5469a8b4014e6434ef464 a015f6fb0ef6d6ec4432" --host "bbcmedia.fcod.llnwd.net" --playpath "mp4:iplayerstream/secure_auth/1500kbps/MP/b00tyr8w_1320405154.mp4" -s "http://www.bbc.co.uk/emp/iplayer/revisions/617463_618125_3/617463_618125_3_emp.swf" --port 1935 --protocol "rtmp" -o activedl.flv


RTMPDump v2.3
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
DEBUG: Protocol : RTMP
DEBUG: Hostname : bbcmedia.fcod.llnwd.net
DEBUG: Port : 1935
DEBUG: Playpath : mp4:iplayerstream/secure_auth/1500kbps/MP/b00tyr8w_1320405154.mp4
DEBUG: tcUrl : rtmp://bbcmedia.fcod.llnwd.net:1935/a1414/e3?as=adobe-hmac-sha256&av=1&te=connect&mp=iplayerstream/secure_auth/480kbps/MP/b00tyr8w_1320405462.mp4,prod_3gp_mpeg4_med/iplayerstream/prod_3gp_mpeg4_med/wifi_CBeebies_Bedtime_Stories_Episode_179_b00tyr8w _1320405462.mp4,iplayerstream/secure_auth/1500kbps/MP/b00tyr8w_1320405154.mp4,iplayerstream/secure_auth/400kbps/b00tyr8w_1320405462.mp4,iplayerstream/secure_auth/800kbps/MP/b00tyr8w_1320405470.mp4,iplayerstream/secure_auth/100kbps/b00tyr8w_1320405462.mp4,iplayer
DEBUG: swfUrl : http://www.bbc.co.uk/emp/iplayer/rev...8125_3_emp.swf
DEBUG: pageUrl : http://www.bbc.co.uk/iplayer/episode..._Perfect_Baby/
DEBUG: app : a1414/e3?as=adobe-hmac-sha256&av=1&te=connect&mp=iplayerstream/secure_auth/480kbps/MP/b00tyr8w_1320405462.mp4,prod_3gp_mpeg4_med/iplayerstream/prod_3gp_mpeg4_med/wifi_CBeebies_Bedtime_Stories_Episode_179_b00tyr8w _1320405462.mp4,iplayerstream/secure_auth/1500kbps/MP/b00tyr8w_1320405154.mp4,iplayerstream/secure_auth/400kbps/b00tyr8w_1320405462.mp4,iplayerstream/secure_auth/800kbps/MP/b00tyr8w_1320405470.mp4,iplayerstream/secure_auth/100kbps/b00tyr8w_1320405462.mp4,iplayerstream/secure_auth/480kbps/MP/b00tyr8w_1320405462.mp4,iplayerstream/secure_auth/1500kbps/MP/b00tyr8w_1320405154.mp4,iplayerstream/secure_auth/800kbps/MP/b00tyr8w_1320405470.mp4&et=1320449266&fmta-token=cfbab6649ad53ebf96a89308615c66c7849520b86a9a c12c2c25d49dcfcad134
DEBUG: live : yes
DEBUG: timeout : 30 sec
DEBUG: Setting buffer time to: 36000000ms
Connecting ...
DEBUG: RTMP_Connect1, ... connected, handshaking
DEBUG: HandShake: Type Answer : 03
DEBUG: HandShake: Server Uptime : 189404762
DEBUG: HandShake: FMS Version : 4.0.3.1
DEBUG: HandShake: Handshaking finished....
DEBUG: RTMP_Connect1, handshaked

This is moronic. You should have been using a URL argument from the very beginning: -r rtmp://blahblahblah instead of the separate --host, --port, and --protocol options. Then it's all already there in a single option. Why do you guys use these obsolete options? I think it's time to delete them from the codebase, they cause more problems than they're worth.

Whatever you're using to generate this stream info needs to be smarter too. You don't need multiple copies of "iplayerstream/secure_auth/480kbps/MP/b00tyr8w_1320405462.mp4" in the URL. Just pick the single string for the bitrate you wanted to play and drop the others.

bat999 11-08-2011 05:10 AM

Re: Specify the tcURL or rtmpdump might not work


 
Quote:

Originally Posted by hyc (Post 34181)
... Whatever you're using to generate this stream info needs to be smarter too. You don't need multiple copies of "iplayerstream/secure_auth/480kbps/MP/b00tyr8w_1320405462.mp4" in the URL...

Hi
rtmpsrv generates all those strings.
Using this page:- ____http://www.bbc.co.uk/programmes/p00l79x0

rtmpsrv generated output is here:- ____http://pastebin.com/pVmeyggG
It shows an 800Kbps string and a 1500Kbps string too.

hyc 11-08-2011 04:07 PM

Re: Specify the tcURL or rtmpdump might not work


 
rtmpsrv doesn't generate anything. It merely reports what the Adobe client sent. If you haven't figured out by now, Adobe code is pathetically inefficient.


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