View Single Post
  #338  
Old 02-22-2015, 09:06 AM
Velcro Velcro is offline
Junior Member
 
Join Date: Aug 2011
Posts: 9
Velcro is on a distinguished road
Default

Re: Customized rtmpdump binaries with patch file


Hi KSV,

I came across a problem in resume feature. I'm using last version of librtmp.dll with my own C# program which can download rtmp stream the same way rtmpdump.exe does.

So, to resume a stream, I search last keyframe in the already downloaded file and when it's found, I update m_read (timestamp, nResumeTS, flags, and so on) in Rtmp structure, and "Checked keyframe successfully!" appears in log.

I understand that I should also read "Found keyframe with resume-keyframe timestamp!" when the resume phase is completed, but sometimes I don't get it (librtmp don't find the right RTMP_PACKET_TYPE_FLASH_VIDEO). Instead of that others packets are received like the ones on this post: http://lists.mplayerhq.hu/pipermail/...il/001382.html

In reality there are onMetaData packet (~500 bytes) and notification packet, and librtmp loops on every following packets until the end of the stream.

If I try to force RTMP_ConnectStream to play from previous keyframe or even from 200 or 500 millisecond back from last found keyframe, librtmp catches the good RTMP_PACKET_TYPE_FLASH_VIDEO and resume works.

How can you explain this?

Resume timestamp: 21292 ms
http://pastebin.com/uvS5LtXz

Resume timestamp: 21292 ms (with Rtmp seekTime=20792)
http://pastebin.com/TWuU5T5Y

Thanks
Reply With Quote