VideoHelp Forum




+ Reply to Thread
Results 1 to 5 of 5
  1. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    I know that virtualdub records this somewhere in the avi stream. And when you open inside vdub, and you scan (manually) through the timeline, you can find them by looking at the the status line, for the [D] code. Unforunately, to my knowledge, none of the vdubs has such a short-cut feature (ie, Ctrl+D for instance) to locate and stop at it, like you can for [K] frames, etc.

    I am guessing that vdub places the [D] only during manual scanning using the cursor left and right keys, would seem to explane lack of search feature.

    So, I decided to search around for any clues how to detect frame drops in avi's, either by source signiture (if one actaully exist) or through alternate means, by frame comparison for dups through avisynth scripts.

    (While I was at it, I decided to try some delphi coding, but the problem is, there doesn't seem to be any faster way of finding these dups in an instant other than going through the avi stream manually, frame by frame. Even using the scanline property is still too slow when you have 30k plus or more frames to scan through. But finding where the virtualdub places the framedrop signiture would more than likely be instant because i could write a routine to read the file raw)

    Then, I remember seeing a discussion on finding duplicate frames (or, frame drops) through avisynth scripts. In fact, I recall seeing a dicussion not too long ago, I think. And it had a few script snipplets, by Gavino, if I call.

    So I tried searching for anything related to that disucssion, (via google) on this board, but I can't seem to find it now, through keywords like duplicate and frame drops, unless my eyes are just heavy now after countless searches everything looks the same.

    Does anybody have any good clues how to detect dropped frames, fastest possible, either through avisynth scripts or external utility via programming code.

    Thank you,

    -vhelp 5397
    Quote Quote  
  2. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by vhelp View Post
    Then, I remember seeing a discussion on finding duplicate frames (or, frame drops) through avisynth scripts. In fact, I recall seeing a dicussion not too long ago, I think. And it had a few script snipplets, by Gavino, if I call.
    Perhaps you're thinking of this post.

    But that was for a different job, compare two clips and find the frames present in one but not in the other.

    Duplicate frames in a single clip can be detected fairly easily in Avisynth using YDifferenceFromPrevious() and ScriptClip(). The details of the code depend on what you want to do once you've detected a dup.
    Quote Quote  
  3. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    Thanks gavino. I was actually debuggin YdifferenceFromPrevious() from these resources at this link and also this link but couldn't get it work the way I thought it was suppose to work, and after a couple of hours of no success i lost interest and took a tv break. Anyway.

    I was using a simplified test clip of 30 frames with 2 purposely made dup frames, and param setup writefileif("g:\dups.txt", "YdifferenceFromPrevious < 0.001", "current_frame") the .txt file would display the same results no matter what parameter I'd feed it, 0.001, 1.0, 25, 50, 75, 100, etc..

    Reported txt file Results:

    0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19, 20,21,22,23,24,25,26,27,28,29

    but, where the dups to be reported should have been:

    -,-,-,-,D,D,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,D,D,-,-,-,-,-,-,-

    Not sure what I did wrong but frame 4 and 24 were dups of next frame. At least this is how vdub deals with drops, it copies the prev frame, I just simulated the same effect though manually for this test clip. I've never seen what an actual output looks like when conditions are met, so i'm not sure what I should be seeing though i'm gussing the above.

    I'll try again laer, or tomorrow, thank you again.

    -vhelp 5398
    Quote Quote  
  4. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    Maybe I don't know what I am talking about, but...

    how about looking at the source-code of cfr2tc.exe and tc2cfr.exe (by tritical) ???
    Last edited by El Heggunte; 13th Jun 2010 at 23:01.
    Quote Quote  
  5. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by vhelp View Post
    Thanks gavino. I was actually debuggin YdifferenceFromPrevious() from these resources at this link and also this link ...
    Yes, the thread you reference deals with exactly the problem you are interested in.
    My memory is failing - I completely forgot I'd written that stuff, and it was only two months ago.
    I was using a simplified test clip of 30 frames with 2 purposely made dup frames, and param setup writefileif("g:\dups.txt", "YdifferenceFromPrevious < 0.001", "current_frame") the .txt file would display the same results no matter what parameter I'd feed it, 0.001, 1.0, 25, 50, 75, 100, etc..
    Reported txt file Results:
    0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19, 20,21,22,23,24,25,26,27,28,29
    That should have worked, writing just 5 and 25 to the file.
    Note that WriteFile by default appends to the file, so perhaps your file starts with data from a previous run.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!