I'm working on a plugin for XBMC to view content from VBS.tv and have noticed that both libRTMP and rtmpdump are stopping the download after a few seconds, regardless of swf verification. Looking at the logs, rtmpdump is reporting the wrong duration of the video. Below is verbose output along with two streams from the site to try (one that works properly and another that doesn't)<br>
<br>Not working (wrong duration): rtmp://<a href="http://cp79855.edgefcs.net/ondemand/mp4:s/htajlnOnOKcUIcrlJuJrvNCnvPzIJ2qH/DOcJ-FxaFrRg4gtGEwOjFyazptcTv29I">cp79855.edgefcs.net/ondemand/mp4:s/htajlnOnOKcUIcrlJuJrvNCnvPzIJ2qH/DOcJ-FxaFrRg4gtGEwOjFyazptcTv29I</a><br>
Working (right duration): rtmp://<a href="http://cp79855.edgefcs.net/ondemand/mp4:s/lobXdoMTrk0eUK3GR2saYRtbSR4MUQxJ/DOcJ-FxaFrRg4gtGEwOjEzYzptcTsjvV">cp79855.edgefcs.net/ondemand/mp4:s/lobXdoMTrk0eUK3GR2saYRtbSR4MUQxJ/DOcJ-FxaFrRg4gtGEwOjEzYzptcTsjvV</a><br>
<br>Verbose output:<br>--<br>RTMPDump v2.2e<br>(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL<br>DEBUG: Parsing...<br>DEBUG: Parsed protocol: 0<br>DEBUG: Parsed host : <a href="http://cp79855.edgefcs.net">cp79855.edgefcs.net</a><br>
DEBUG: Parsed app : ondemand<br>DEBUG: Protocol : RTMP<br>DEBUG: Hostname : <a href="http://cp79855.edgefcs.net">cp79855.edgefcs.net</a><br>DEBUG: Port : 1935<br>DEBUG: Playpath : mp4:s/htajlnOnOKcUIcrlJuJrvNCnvPzIJ2qH/DOcJ-FxaFrRg4gtGEwOjFyazptcTv29I<br>
DEBUG: tcUrl : rtmp://<a href="http://96.6.44.127/ondemand?_fcs_vhost=cp79855.edgefcs.net">96.6.44.127/ondemand?_fcs_vhost=cp79855.edgefcs.net</a><br>DEBUG: swfUrl : <a href="http://ak.c.ooyala.com/cacheable/dbb5e75354695298b11a159b7f828148/player_v2.swf?version=2&embedType=flashplayer.as&hide=all&autoplay=1&embedCode=htajlnOnOKcUIcrlJuJrvNCnvPzIJ2qH">http://ak.c.ooyala.com/cacheable/dbb5e75354695298b11a159b7f828148/player_v2.swf?version=2&embedType=flashplayer.as&hide=all&autoplay=1&embedCode=htajlnOnOKcUIcrlJuJrvNCnvPzIJ2qH</a><br>
DEBUG: pageUrl : <a href="http://www.vbs.tv">http://www.vbs.tv</a><br>DEBUG: app : ondemand?_fcs_host=<a href="http://cp79855.edgefcs.net">cp79855.edgefcs.net</a><br>DEBUG: live : no<br>DEBUG: timeout : 30 sec<br>
DEBUG: SWFSHA256:<br>DEBUG: 89 03 7f 73 f5 ce a5 4e 4b 47 3b 4e d7 e9 7e e1<br>DEBUG: 4e 15 76 ea 0d 43 55 93 20 d0 6f e5 39 05 72 20<br>DEBUG: SWFSize : 527362<br>DEBUG: Setting buffer time to: 36000000ms<br>Connecting ...<br>
DEBUG: RTMP_Connect1, ... connected, handshaking<br>DEBUG: HandShake: Client type: 03<br>DEBUG: HandShake: Client digest offset: 244<br>DEBUG: HandShake: Initial client digest: <br>DEBUG: 04 25 4f 49 9a c8 39 ce 1a 6c 46 84 3e 6f c4 b9<br>
DEBUG: 5b 9b a7 53 30 91 df 8c 66 3e 1d ab c0 a1 9f 85<br>DEBUG: HandShake: Type Answer : 03<br>DEBUG: HandShake: Server Uptime : 2092000712<br>DEBUG: HandShake: FMS Version : 3.5.2.1<br>DEBUG: HandShake: Calculated digest key from secure key and server digest: <br>
DEBUG: c7 cc 1f b8 4b 6a bd e0 37 37 e0 89 55 4e 8a 59<br>DEBUG: 71 41 84 20 c0 93 26 88 02 f8 8a 60 52 99 e5 5d<br>DEBUG: HandShake: Client signature calculated:<br>DEBUG: 15 81 ac 2c 3f dd ca 20 14 b7 6c 93 f6 9f a9 81<br>
DEBUG: 8e 29 80 33 7c e5 a7 00 0d 22 79 2c 39 a9 f3 2b<br>DEBUG: HandShake: Server sent signature:<br>DEBUG: 72 5d b5 92 53 82 c5 1d be ec f4 cd 2e 20 39 67<br>DEBUG: 77 4c b1 c8 13 d7 23 b7 22 3a 87 f5 b8 4e 0b 37<br>DEBUG: HandShake: Digest key: <br>
DEBUG: 93 20 55 41 56 a6 d5 ac 3c e9 07 7d 49 c7 49 4c<br>DEBUG: 54 7c 6a 9b 5f 9c c1 7a cf 33 1d 9e 28 c8 57 19<br>DEBUG: HandShake: Signature calculated:<br>DEBUG: 72 5d b5 92 53 82 c5 1d be ec f4 cd 2e 20 39 67<br>DEBUG: 77 4c b1 c8 13 d7 23 b7 22 3a 87 f5 b8 4e 0b 37<br>
DEBUG: HandShake: Genuine Adobe Flash Media Server<br>DEBUG: HandShake: Handshaking finished....<br>DEBUG: RTMP_Connect1, handshaked<br>DEBUG: Invoking connect<br>INFO: Connected...<br>DEBUG: HandleServerBW: server BW = 1250000<br>
DEBUG: HandleClientBW: client BW = 1250000 2<br>DEBUG: RTMP_ClientPacket, received: invoke 242 bytes<br>DEBUG: (object begin)<br>DEBUG: (object begin)<br>DEBUG: Property: <Name: fmsVer, STRING: FMS/3,5,3,816a><br>
DEBUG: Property: <Name: capabilities, NUMBER: 127.00><br>DEBUG: Property: <Name: mode, NUMBER: 1.00><br>DEBUG: (object end)<br>DEBUG: (object begin)<br>DEBUG: Property: <Name: level, STRING: status><br>
DEBUG: Property: <Name: code, STRING: NetConnection.Connect.Success><br>DEBUG: Property: <Name: description, STRING: Connection succeeded.><br>DEBUG: Property: <Name: objectEncoding, NUMBER: 0.00><br>
DEBUG: Property: <Name: data, OBJECT><br>DEBUG: (object begin)<br>DEBUG: Property: <Name: version, STRING: 3,5,3,816a><br>DEBUG: (object end)<br>DEBUG: (object end)<br>DEBUG: (object end)<br>
DEBUG: HandleInvoke, server invoking <_result><br>DEBUG: HandleInvoke, received result for method call <connect><br>DEBUG: sending ctrl. type: 0x0003<br>DEBUG: Invoking createStream<br>DEBUG: RTMP_ClientPacket, received: invoke 21 bytes<br>
DEBUG: (object begin)<br>DEBUG: Property: NULL<br>DEBUG: (object end)<br>DEBUG: HandleInvoke, server invoking <onBWDone><br>DEBUG: Invoking _checkbw<br>DEBUG: RTMP_ClientPacket, received: invoke 29 bytes<br>DEBUG: (object begin)<br>
DEBUG: Property: NULL<br>DEBUG: (object end)<br>DEBUG: HandleInvoke, server invoking <_result><br>DEBUG: HandleInvoke, received result for method call <createStream><br>DEBUG: SendPlay, seekTime=0, stopTime=0, sending play: mp4:s/htajlnOnOKcUIcrlJuJrvNCnvPzIJ2qH/DOcJ-FxaFrRg4gtGEwOjFyazptcTv29I<br>
DEBUG: Invoking play<br>DEBUG: sending ctrl. type: 0x0003<br>DEBUG: RTMP_ClientPacket, received: invoke 10275 bytes<br>DEBUG: (object begin)<br>DEBUG: Property: NULL<br>DEBUG: (object end)<br>DEBUG: HandleInvoke, server invoking <_onbwcheck><br>
DEBUG: Invoking _result<br>DEBUG: RTMP_ClientPacket, received: invoke 20515 bytes<br>DEBUG: (object begin)<br>DEBUG: Property: NULL<br>DEBUG: (object end)<br>DEBUG: HandleInvoke, server invoking <_onbwcheck><br>DEBUG: Invoking _result<br>
DEBUG: HandleChangeChunkSize, received: chunk size change to 4096<br>DEBUG: HandleCtrl, received ctrl. type: 4, len: 6<br>DEBUG: HandleCtrl, Stream IsRecorded 1<br>DEBUG: RTMP_ClientPacket, received: invoke 276 bytes<br>DEBUG: (object begin)<br>
DEBUG: Property: NULL<br>DEBUG: (object begin)<br>DEBUG: Property: <Name: level, STRING: status><br>DEBUG: Property: <Name: code, STRING: NetStream.Play.Reset><br>DEBUG: Property: <Name: description, STRING: Playing and resetting s/htajlnOnOKcUIcrlJuJrvNCnvPzIJ2qH/DOcJ-FxaFrRg4gtGEwOjFyazptcTv29I.><br>
DEBUG: Property: <Name: details, STRING: s/htajlnOnOKcUIcrlJuJrvNCnvPzIJ2qH/DOcJ-FxaFrRg4gtGEwOjFyazptcTv29I><br>DEBUG: Property: <Name: clientid, STRING: 5pt4Uf5m><br>DEBUG: (object end)<br>
DEBUG: (object end)<br>DEBUG: HandleInvoke, server invoking <onStatus><br>DEBUG: HandleInvoke, onStatus: NetStream.Play.Reset<br>DEBUG: HandleCtrl, received ctrl. type: 0, len: 6<br>DEBUG: HandleCtrl, Stream Begin 1<br>
DEBUG: RTMP_ClientPacket, received: invoke 270 bytes<br>DEBUG: (object begin)<br>DEBUG: Property: NULL<br>DEBUG: (object begin)<br>DEBUG: Property: <Name: level, STRING: status><br>DEBUG: Property: <Name: code, STRING: NetStream.Play.Start><br>
DEBUG: Property: <Name: description, STRING: Started playing s/htajlnOnOKcUIcrlJuJrvNCnvPzIJ2qH/DOcJ-FxaFrRg4gtGEwOjFyazptcTv29I.><br>DEBUG: Property: <Name: details, STRING: s/htajlnOnOKcUIcrlJuJrvNCnvPzIJ2qH/DOcJ-FxaFrRg4gtGEwOjFyazptcTv29I><br>
DEBUG: Property: <Name: clientid, STRING: 5pt4Uf5m><br>DEBUG: (object end)<br>DEBUG: (object end)<br>DEBUG: HandleInvoke, server invoking <onStatus><br>DEBUG: HandleInvoke, onStatus: NetStream.Play.Start<br>
Starting download at: 0.000 kB<br>DEBUG: RTMP_ClientPacket, received: notify 24 bytes<br>DEBUG: (object begin)<br>DEBUG: (object end)<br>DEBUG: ignoring too small audio packet: size: 0<br>DEBUG: RTMP_ClientPacket, received: notify 44 bytes<br>
DEBUG: (object begin)<br>DEBUG: (object begin)<br>DEBUG: Property: <Name: code, STRING: NetStream.Data.Start><br>DEBUG: (object end)<br>DEBUG: (object end)<br>DEBUG: RTMP_ClientPacket, received: invoke 30755 bytes<br>
DEBUG: (object begin)<br>DEBUG: Property: NULL<br>DEBUG: (object end)<br>DEBUG: HandleInvoke, server invoking <_onbwcheck><br>DEBUG: Invoking _result<br>DEBUG: RTMP_ClientPacket, received: notify 494 bytes<br>DEBUG: (object begin)<br>
DEBUG: (object begin)<br>DEBUG: Property: <Name: duration, NUMBER: 8.66><br>DEBUG: Property: <Name: moovPosition, NUMBER: 28.00><br>DEBUG: Property: <Name: width, NUMBER: 854.00><br>
DEBUG: Property: <Name: height, NUMBER: 480.00><br>DEBUG: Property: <Name: videocodecid, STRING: avc1><br>DEBUG: Property: <Name: audiocodecid, STRING: mp4a><br>DEBUG: Property: <Name: avcprofile, NUMBER: 77.00><br>
DEBUG: Property: <Name: avclevel, NUMBER: 51.00><br>DEBUG: Property: <Name: aacaot, NUMBER: 2.00><br>DEBUG: Property: <Name: videoframerate, NUMBER: 29.97><br>DEBUG: Property: <Name: audiosamplerate, NUMBER: 44100.00><br>
DEBUG: Property: <Name: audiochannels, NUMBER: 2.00><br>DEBUG: Property: <Name: trackinfo, OBJECT><br>DEBUG: (object begin)<br>DEBUG: (object begin)<br>DEBUG: Property: <Name: length, NUMBER: 25800.00><br>
DEBUG: Property: <Name: timescale, NUMBER: 2997.00><br>DEBUG: Property: <Name: language, STRING: und><br>DEBUG: Property: <Name: sampledescription, OBJECT><br>DEBUG: (object begin)<br>
DEBUG: (object begin)<br>DEBUG: Property: <Name: sampletype, STRING: avc1><br>DEBUG: (object end)<br>DEBUG: (object end)<br>DEBUG: (object end)<br>DEBUG: (object begin)<br>DEBUG: Property: <Name: length, NUMBER: 381952.00><br>
DEBUG: Property: <Name: timescale, NUMBER: 44100.00><br>DEBUG: Property: <Name: language, STRING: eng><br>DEBUG: Property: <Name: sampledescription, OBJECT><br>DEBUG: (object begin)<br>
DEBUG: (object begin)<br>DEBUG: Property: <Name: sampletype, STRING: mp4a><br>DEBUG: (object end)<br>DEBUG: (object end)<br>DEBUG: (object end)<br>DEBUG: (object end)<br>DEBUG: (object end)<br>DEBUG: (object end)<br>
INFO: Metadata:<br>INFO: duration 8.66<br>INFO: moovPosition 28.00<br>INFO: width 854.00<br>INFO: height 480.00<br>INFO: videocodecid avc1<br>INFO: audiocodecid mp4a<br>
INFO: avcprofile 77.00<br>INFO: avclevel 51.00<br>INFO: aacaot 2.00<br>INFO: videoframerate 29.97<br>INFO: audiosamplerate 44100.00<br>INFO: audiochannels 2.00<br>
INFO: trackinfo:<br>INFO: length 25800.00<br>INFO: timescale 2997.00<br>INFO: language und<br>INFO: sampledescription:<br>INFO: sampletype avc1<br>INFO: length 381952.00<br>
INFO: timescale 44100.00<br>INFO: language eng<br>INFO: sampledescription:<br>INFO: sampletype mp4a<br>64.000 kB / 0.77 sec (8.8%)<br>DEBUG: RTMP_ClientPacket, received: invoke 40995 bytes<br>
DEBUG: (object begin)<br>DEBUG: Property: NULL<br>DEBUG: (object end)<br>DEBUG: HandleInvoke, server invoking <_onbwcheck><br>DEBUG: Invoking _result<br>384.000 kB / 6.01 sec (69.3%)<br>DEBUG: RTMP_ClientPacket, received: invoke 51235 bytes<br>
DEBUG: (object begin)<br>DEBUG: Property: NULL<br>DEBUG: (object end)<br>DEBUG: HandleInvoke, server invoking <_onbwcheck><br>DEBUG: Invoking _result<br>576.000 kB / 7.61 sec (87.8%)<br>DEBUG: RTMP_ClientPacket, received: invoke 61475 bytes<br>
DEBUG: (object begin)<br>DEBUG: Property: NULL<br>DEBUG: (object end)<br>DEBUG: HandleInvoke, server invoking <_onbwcheck><br>DEBUG: Invoking _result<br>640.000 kB / 8.64 sec (99.7%)<br>DEBUG: ignoring too small audio packet: size: 0<br>
DEBUG: RTMP_ClientPacket, received: notify 102 bytes<br>DEBUG: (object begin)<br>DEBUG: (object begin)<br>DEBUG: Property: <Name: code, STRING: NetStream.Play.Complete><br>DEBUG: Property: <Name: level, STRING: status><br>
DEBUG: Property: <Name: duration, NUMBER: 0.00><br>DEBUG: Property: <Name: bytes, NUMBER: 665049.00><br>DEBUG: (object end)<br>DEBUG: (object end)<br>DEBUG: HandleCtrl, received ctrl. type: 1, len: 6<br>
DEBUG: HandleCtrl, Stream EOF 1<br>DEBUG: RTMP_ClientPacket, received: invoke 280 bytes<br>DEBUG: (object begin)<br>DEBUG: Property: NULL<br>DEBUG: (object begin)<br>DEBUG: Property: <Name: level, STRING: status><br>
DEBUG: Property: <Name: code, STRING: NetStream.Play.Stop><br>DEBUG: Property: <Name: description, STRING: Stopped playing s/htajlnOnOKcUIcrlJuJrvNCnvPzIJ2qH/DOcJ-FxaFrRg4gtGEwOjFyazptcTv29I.><br>
DEBUG: Property: <Name: details, STRING: s/htajlnOnOKcUIcrlJuJrvNCnvPzIJ2qH/DOcJ-FxaFrRg4gtGEwOjFyazptcTv29I><br>DEBUG: Property: <Name: clientid, STRING: 5pt4Uf5m><br>DEBUG: Property: <Name: reason, STRING: ><br>
DEBUG: (object end)<br>DEBUG: (object end)<br>DEBUG: HandleInvoke, server invoking <onStatus><br>DEBUG: HandleInvoke, onStatus: NetStream.Play.Stop<br>DEBUG: Invoking deleteStream<br>DEBUG: Got Play.Complete or Play.Stop from server. Assuming stream is complete<br>
649.769 kB / 8.64 sec (99.7%)<br>DEBUG: RTMP_Read returned: 10003<br>Download may be incomplete (downloaded about 99.70%), try resuming<br>DEBUG: Closing connection.<br><br>