View Full Version : Find different frame in 2 clips
ruanova
26th September 2006, 13:41
Hi ...
I need to find the first different frame between 2 clips.
Any filter to do this...?
Any C++/C# ... etc function to do this...?
Thanks...
ruanova
27th September 2006, 08:15
Nothing ? :scared:
Any idea please...?
cockpit
27th September 2006, 09:13
maybe if you explained more in detail what you want?
stickboy
27th September 2006, 09:21
Use Subtract, use Levels to increase the contrast, scan through the clip until you find a difference.
Possibly FrameEvaluate or something might be helpful, but I'm not familiar enough with it to say.
Mug Funky
27th September 2006, 10:00
this is what i do to compare encodes and see where the differences are:
IF NOT EXIST "%~dpn1.d2v" "C:\Program Files\AviSynth 2.5\plugins\DGIndex.exe" -SD=" -OM=0 -AIF="%~1" -OF="%~dpn1" -HIDE -exit
IF NOT EXIST "%~dpn2.d2v" "C:\Program Files\AviSynth 2.5\plugins\DGIndex.exe" -SD=" -OM=0 -AIF="%~2" -OF="%~dpn2" -HIDE -exit
(
ECHO.loadplugin^("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll"^)
ECHO.
ECHO.angle1=mpeg2source^("%~dpn1.d2v",idct=7,cpu=0^)
ECHO.
ECHO.angle2=mpeg2source^("%~dpn2.d2v",idct=7,cpu=0^)
ECHO.
ECHO.mt_lutxy^(angle1,angle2,expr="x y - abs",y=3^)
ECHO.WriteFileIf^(last, "%~dp1\differences.txt", "yplanemax(.5) > 16", "current_frame", """ ":" """, "yplanemax(.5)"^)
) > "%~dp1\compare.avs"
ECHO Comparing "%~1" and "%~2">"%~dp1\differences.txt"
avsutil "%~dp1\compare.avs" play
you'll need avsutil and masktools 2.0
just copypasta that into an empty .bat file, and drag 2 m2v's onto it from an explorer window.
it'll spit out a text file with framenumbers of parts that are (significantly) different, and the max difference measured.
it'll ignore a small amount of noise (like DCT blocks), so you wont have a huge long useless list.
[edit]
you'll probably have to change the paths in the batch file above - i keep my DGindex in my plugins folder for ease of installing all my crap on everyone else's machines.
also, it can be easily modified to handle avi files, or whatever else you have.
ruanova
27th September 2006, 10:54
Thanks, Thanks, Thanks ....
Now I try it and report you...
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.