Audio/video stream recording forums

Attention Visitor:
You may have to register or log in before you can post:
  • Click the register link to sign up.
  • Registered members please fill in the form below and click the "Log in" button.
To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Audio/video stream recording forums > Streaming media recording forum > rtmpdump
Register FAQ Members List Calendar Mark Forums Read

Reply Post New Thread
 
Thread Tools Display Modes
  #1  
Old 11-04-2014, 11:44 PM
hsl hsl is offline
Junior Member
 
Join Date: Nov 2014
Posts: 2
hsl is on a distinguished road
Default

rtmpdump corruption prevention


Are there any known methods on how to guarantee rtmpdump's output to be fully corruption free? My understanding of the problem is that corruptions sometimes happen when rtmpdump drops the connection and resumes (could someone clarify on this part?).

My current script uses the following algorithm to run rtmpdump:
Code:
while True:
    rtmpdump //start a fresh rtmpdump download
    rtmpdump --resume //resume if necessary
    rtmpdump --resume //resume if necessary
    output = rtmpdump --resume //do a final check with resume
    if output contains "Already Completed":
        break
So if a video cannot be completed in 4 resumes, it starts a fresh download. From personal experience, this prevents quite a bit of corruption; however, it's not perfect.

I was doing some research and I found K-S-V's FlvFixer.php script. I'm not sure exactly sure how it works, but I was wondering what if I used it to augment my current code to make it like this:
Code:
while True:
    rtmpdump //start a fresh rtmpdump download
    call FlvFixer.php on partially/fully completed file
    rtmpdump --resume //resume if necessary
    call FlvFixer.php on partially/fully completed file
    rtmpdump --resume //resume if necessary
    call FlvFixer.php on partially/fully completed file
    output = rtmpdump --resume //do a final check with resume
    if output contains "Already Completed":
        break
Would this be able to prevent all corruptions? What do you think?

Thanks.
Reply With Quote
  #2  
Old 11-05-2014, 02:47 PM
troller12 troller12 is offline
Senior Member
 
Join Date: Sep 2013
Posts: 433
troller12 is on a distinguished road
Default

Re: rtmpdump corruption prevention


Hi,

if you want to download any video files with rtmpdump then use the --resume or -e paramater if necessary.In some cases you get corrupted files durring live recordings.So to fix these corrupted files you can try different tools.One tool is called yaflvfix.exe where you just need to drag & drop your video into the file icon but also this tool dosen't work always (50 % maybe).On the other hand you could try a other tool called "Machete" where you can load your file and save it new without any changes.So the tool does rewrite the video header index (keyframe fix).Just try this so for me it works.

greetz
Reply With Quote
  #3  
Old 11-05-2014, 03:53 PM
hsl hsl is offline
Junior Member
 
Join Date: Nov 2014
Posts: 2
hsl is on a distinguished road
Default

Re: rtmpdump corruption prevention


Quote:
Originally Posted by troller12 View Post
Hi,

if you want to download any video files with rtmpdump then use the --resume or -e paramater if necessary.In some cases you get corrupted files durring live recordings.So to fix these corrupted files you can try different tools.One tool is called yaflvfix.exe where you just need to drag & drop your video into the file icon but also this tool dosen't work always (50 % maybe).On the other hand you could try a other tool called "Machete" where you can load your file and save it new without any changes.So the tool does rewrite the video header index (keyframe fix).Just try this so for me it works.

greetz
Thanks for the reply. As you can see from my original post, I am most definitely taking advantage of the --resume/-e parameter. It's just that sometimes when resume, corruption like this still happens:



When I mention corruption, I mean corruption like the picture above. rtmpdump will run till completion. It doesn't tell you that the video is corrupted.
Reply With Quote
  #4  
Old 11-05-2014, 04:09 PM
troller12 troller12 is offline
Senior Member
 
Join Date: Sep 2013
Posts: 433
troller12 is on a distinguished road
Default

Re: rtmpdump corruption prevention


Hi again,

oh so you mean video information corruption itself if so.Ok listen,so this could also be a player (set filters) issue itself so mostly I get this too in VLC player right after seeking (not happens in other players).So you should try to verify it to see whether the problem was really a broken download.Try to stream the videolink in your player (VLC or MPC etc) and jump to the same time maker where you see the corruption in your downloaded file.Just check this first at same time code so maybe the frame corruption is also in the original file too (saved).Also you can try to download the video again and then check the same time code again.If you get the same problem at same time code then the corruption should be inside of the video and no download issue.If not then it could be a download issue (bad or not constant connection etc) so you will maybe know this problem if you download a packet (rar / zip) files which you can't unrar (CRC error) after.In some cases it can happen so that you need to re-download the file (if the file itself is not broken).

greetz
Reply With Quote
Reply Post New Thread
Tags: ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 11:50 PM.


Powered by All-streaming-media.com; 2006-2011
vB forum hacked with Zoints add-ons