VideoHelp Forum




+ Reply to Thread
Page 3 of 3
FirstFirst 1 2 3
Results 61 to 67 of 67
  1. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Originally Posted by Sharc
    While it is relative simple and reliable to discover duplicates by means of a script
    Do you have a script for spotting dupes I could try?
    Quote Quote  
  2. Originally Posted by Alwyn View Post
    Originally Posted by Sharc
    While it is relative simple and reliable to discover duplicates by means of a script
    Do you have a script for spotting dupes I could try?
    The DeDup avisynth plugin comes to my mind:
    http://avisynth.nl/index.php/DeDup

    The first pass 'DupMC' will create a log.
    A very low difference (~0%) between 2 frames indicate a duplicate. The log can be evaluated in Excel for example, or evaluated and processed in pass2 ('DeDup') for removing the duplicates.
    Last edited by Sharc; 27th Jul 2025 at 07:57.
    Quote Quote  
  3. Code:
    AviSource("filename.avi"
    WriteFileIf("Dups.txt", "YDifferenceFromPrevious<0.5", "current_frame", flush=true)
    Open the AVS file in VirtualDub then use File -> Run Video Analysis Pass. When it's done you will have a file called Dups.txt that has a list of the duplicate frames. You can change the threshold to reduce false positives or false negatives. Also note that it only compares the Y channel (not U and V).
    Quote Quote  
  4. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Thanks guys, I finally got DupMC working after seeing Jagabo's comment re running the video analysis pass. That isn't mentioned in the wiki or readme that I can see.

    @Jagabo, I'm still experimenting with your script. I haven't worked out how the "difference" parameter affects things yet.
    Quote Quote  
  5. YDifferenceFromPrevious is the average difference of the Y value of each pixel of the current frame and the previous frame. If the current frame and the previous frame are identical (as far as the Y values are concerned) the calculated value will be zero. It will be non-zero if any of the Y values is different.

    Note that compression artifacts (when using lossy compression) or other noise may cause originally identical frames to no longer be identical. That's why a non-zero value is used in the sample code. It is no longer possible to detect for certain which frames were identical before the lossy compression.
    Quote Quote  
  6. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Thanks, I'm working with analogue AVI captures.

    I've set the "Diff from Prev" to 0.0 but am getting just a list of numbers (I assume the frame numbers, looks like very frame) with no other details, as per the attached.

    The DupMC report does show the % difference between each frame.
    Image Attached Files
    Last edited by Alwyn; 28th Jul 2025 at 07:43. Reason: Clarified the DupMC report details
    Quote Quote  
  7. Originally Posted by Alwyn View Post
    I've set the "Diff from Prev" to 0.0 but am getting just a list of numbers
    Yes, that's all it shows, the frame number of frames that are duplicates of the frame before them. Oh, it also always shows frame zero as a duplicate, a false positive (as there's nothing to compare that frame to). It shouldn't show every frame is a duplicate.
    Quote Quote  



Similar Threads

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