View Single Post
  #6  
Old 10-19-2010, 02:14 PM
Ed999 Ed999 is offline
Senior Member
 
Join Date: Feb 2009
Posts: 115
Ed999 is on a distinguished road
Default

Re: rtmpdump and data loss


How are your programing skills?

Modifying rtmpdump is beyond me. But do you actually need to?

It seems to me that you might interrogate the server, using a simple Perl script. You could periodically ask it for the dropped frame count (say, every 60 seconds), to compare against the desired value of nil, and then fork.

If the result is nil, rtmpdump contains a --resume option which will enable you to resume the interrupted download at the point at which it left off to interrogate the server.

If the result is not nil, do not resume the download. Go to EXIT instead.

Sorry, my scripting days are over. But this seems like something Perl could do. All you are doing is launching the download using Perl (which is what Perl scripts such as get_iplayer.pl do), then stopping the download after 60 seconds, and then immediately interrogating the server. On receiving the response, Perl either issues a resume command (the original download command plus --resume) or it exits (and, optionally, tries again: which is just a matter of issuing the original download command again, but without adding the --resume option).

If you want to examine the Perl script called get_iplayer.pl (a popular choice for downloading rtmp from the BBC in London, under either Windows or Linux), to see how RTMP downloading is done using an ActivePerl script, search in Google for author "Phil Lewis" or for "GET_IPLAYER".

But are you overlooking an easier solution? RTMPDUMP doesn't seem to use the concept of a single stream. Because it's capable of resuming, it has no need to bother with that concept. Looking at your command line, it actually contains a potentially serious flaw, in that you don't include the standard --resume switch. Try including it. That switch is the built-in protection that's designed to prevent the loss of frames/packets.
Reply With Quote