Log in

View Full Version : Problem with DeDup


JeanMarc
22nd July 2009, 20:24
I am trying to use DeDup, which seemed straightforward, but I am missing something!
I want to drop frames that differ from the previous one by less than 11%.
This is my script:

Pass 1 I run Vdub with this script, and save as AVI uncompressed:
LoadPlugin("K:\Program Files\AviSynth 2.5\plugins\DeDup.dll")
AVISource("L:\_videos to do\Surv_videos\test_july18.avi")
ConverttoYUY2()
DupMC(log="july18.dup.text")
As a result, I get a second identical version of the video (unnecessary but I am not sure how to avoid it), plus the log "july18.dup.text" which contains one line per frame, needed for the second pass:
DeDup 0.17 by Loren Merritt, based on Dup 2.20 beta 1 by Donald Graft/Klaus Post, Copyright 2004
frm 0: diff from frm 1 = 11.4524% at (320,64)
frm 1: diff from frm 2 = 5.3487% at (256,32)
frm 2: diff from frm 3 = 4.0966% at (128,96)
frm 3: diff from frm 4 = 6.1661% at (320,64)
frm 4: diff from frm 5 = 5.2099% at (256,32)
frm 5: diff from frm 6 = 3.4271% at (448,96)
frm 6: diff from frm 7 = 4.4236% at (448,96)
frm 7: diff from frm 8 = 3.8643% at (256,64)
frm 8: diff from frm 9 = 8.1171% at (256,64)
frm 9: diff from frm 10 = 15.9009% at (320,64)
etc...

Pass 2 I run Vdub with the following script, and save as AVI:
LoadPlugin("K:\Program Files\AviSynth 2.5\plugins\DeDup.dll")
AVISource("L:\_videos to do\Surv_videos\test_july18.avi")
ConverttoYUY2()
DeDup(threshold=0.11, maxcopies=12, maxdrops=6, log="july18.dup.text", times="test_july18.times.txt")

I tried several times with different parameters. I always get the same number of frames as the original video, although when I run DeDup with show=true, I see that a majority of frames satisfy the test, and should be dropped. Based on an analysis of the log, at least 90% of the frames should be dropped.

I am obviously missing something big. PLEASE HELP!

Keiyakusha
22nd July 2009, 22:49
Maybe threshold=11 but not 0.11?

threshold:
range: 0 - 100

Gavino
22nd July 2009, 23:02
Maybe threshold=11 but not 0.11?
You missed this line:
default: 0.3

JeanMarc
23rd July 2009, 00:54
Maybe threshold=11 but not 0.11?

You were totally right. I still had to set the trigger2 at a higher level than threshold for Dedup to work, but it is actually dropping all the frames I expected it to do.
So my basic script for pass 2 is now:
LoadPlugin("K:\Program Files\AviSynth 2.5\plugins\DeDup.dll")
AVISource("L:\_videos to do\Surv_videos\test_july18.avi")
ConverttoYUY2()
DeDup(threshold=11.0, trigger2=20.0, maxcopies=12, maxdrops=6, log="july18.dup.text",times="test_july18.times.txt")
:thanks:

Keiyakusha
23rd July 2009, 01:47
You missed this line:
Sorry I don't understand what do you mean...

Gavino
23rd July 2009, 08:45
Sorry I don't understand what do you mean...
Sorry, I misunderstood you.
I thought you were suggesting that since the range was 0-100, a value of 0.11 was necessarily wrong. I was just pointing out that the default value of 0.3 suggests otherwise. I see now that you meant the value is a percentage, so 11.0 was what the OP needed.