VideoHelp Forum
+ Reply to Thread
Results 1 to 5 of 5
Thread
  1. Is there a filter for Avisynth that can compare frames? It takes two values ​​(int - the position of the first frame, int - the position of the second frame), and returns bool (true or false)? And to test with 100% veracity.
    Quote Quote  
  2. I'm not sure I understand. If you're looking to find out if one frame is a true duplicate of another then, yes, the first pass of the 2-pass MultiDecimate can do that. It creates an mfile.txt with metrics and frame numbers which can be studied for true duplicates.

    But, no true or false. It's 100% accurate and when you see 0.000000 (I forget the exact number of zeroes), you can be sure that frame is an exact duplicate of the frame before. You have to run that first pass on the whole video, or trim off just the parts you want to study.

    TDecimate(Display=True) does something similar, showing 5 frames at a time with the one most like a duplicate being marked. Those are only to two decimal points and I don't know if that's accurate enough for you. I'm sure there are others. If this isn't what you had in mind, maybe provide more information. I'm sure others have other ideas.
    Quote Quote  
  3. You might find some help here:

    Comparing frames from two videos

    Syncing Two Videos

    This isn't quite as close to your question, but still might be of some value:

    MatchFrames/LocateFrames v1.06

    Do a search at doom9.org for what you are looking for, but restrict it to user name "StainlessS". He has written a LOT of AVISynth functions that let you compare and sync two clips.
    Quote Quote  
  4. Set FRAME1 and FRAME2 to the numbers of the frames you want to compare:

    Visually (any deviation from flat grey indicates they are not identical)
    Code:
    FRAME1=100
    FRAME2=200
    f1= Trim(FRAME1, FRAME1)
    f2= Trim(FRAME2, FRAME2)
    Subtract(f1,f2).Levels(120,1,136,0,255)
    Numerically (only average Y values are compared, non zero indicates difference):
    Code:
    FRAME1=100
    FRAME2=200
    f1= Trim(FRAME1, FRAME1)
    f2= Trim(FRAME2, FRAME2)
    Interleave(v1,v2)
    ScriptClip(clip, "Subtitle(String(YDifferenceToNext))")
    Last edited by jagabo; 9th Mar 2018 at 09:01.
    Quote Quote  
  5. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    For an even greater visual check to add to Jagabo's script you can use a 'Quadrophonic?' scrip[t for more detail.

    Code:
    v1=directshowsource("C:\PathToVideo\[dp]Manjandani-1.mp4", audio=false).ConvertToYV12()
    v2=directshowsource("C:\PathToVideo\[dp]Manjandani-1_2.mp4", audio=false).ConvertToYV12()
    sub = v1.subtract(v2)
    substrong = sub.levels (122,1,132,0,255)
    StackVertical (StackHorizontal (v1.subtitle ("original"),v2.subtitle("encoded")), StackHorizontal(sub.subtitle("Difference"),substrong.subtitle("Difference amplified")))
    And then inspect the video as it plays:

    Image
    [Attachment 44876 - Click to enlarge]
    Quote Quote  



Similar Threads

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