Bruno,
You wanna give this a go [MDEC2 v1.03Beta1] :-
http://www.mediafire.com/file/cb6i7m...00609.zip/file
Should now work with all four decimate modes of Multidecimate.
Rate arg now does nothing.
Dir arg default no longer 'C:\', dont work on Vista+, also '.\' current directory broken on vista+, both fixed with new default of current script directory, ie '.\'
Code:
Modified by StainlessS, metrics from FDecimate by Donald A. Graft (Neuron2).
v1.00, 9 Aug 2013. Early release.
v1.01, 30 Mar 2015. Recompile v2.6 dll with Avisynth Version 6 Header.
v1.02, 26 Apr 2018. Fix pitch can change. Add x64 dll. Recompile VS2008.
v1.03, 09 June 2020.
Changed default directory Dir=".\", ie current directory, old default "C:\" not good under Vista+.
Fix current directory relative. (Broken/changed under Vista/W7+).
Ignore Rate arg, calc new rate using vi.MulDivFPS(output_frame_count,input_frame_count).
Code:
MDec2 by StainlessS
MDec2, MultiDecimate like decimating filter.
Planar, YUY2, RGB, no change to audio.
MDEC2(clip c,float "rate"=24.0,bool "show"=false,bool "create"=false,string "dir"="C:\",bool "chroma"=true,bool "ver"=false)
MDec2 is a 2 pass decimating filter, acting much like the Multidecimate filter by Donald A. Graft.
Requires MultiDecimate.Exe & ProcessMD.Exe from MultiDecimate package.
Args:-
c, clip. No default
Rate=24.0, final output frame rate, used only on 2nd pass. ### v1.03, IGNORED, auto calculated from input framerate, input & output framecount.
show=false. 1st pass, shows metrics on frame, 2nd pass shows frame being used.
create=false. Set true for 1st pass, false on 2nd pass after using MultiDecimate.Exe.
dir=".\". Path to data files (mfile.txt, cfile.txt, dfile.txt). ### v1.03, Now '.\' current directory, old 'C:\' broken by Vista+, cant write to 'C:\'.
chroma=true. If false then only use luma for metrics. (RGB not used).
ver=false. True shows version on frame.
See MultiDecimate docs for further info.
V2.60 std colorspaces only. [Multidecimate YUY2 only]
Give it a whirl please.
EDIT: Also note,
Could use with Avs+ additional PLANAR colorspaces in Pass 2 (I think, untested, so long as SHOW=FALSE, ie no metrics on frame), and
use something like ConvertToYV12 for Pass 1.
EDIT:
PASS 1: (Create=true)
Code:
AviSource("D:\Parade.avi")
Assumefps(30.0,sync_audio=true)
Mdec2(create=true,show=true) # Show onframe metrics not necessary
Debugview
Code:
00000077 0.16522254 MDEC2: Dir FullPath=D:\DUPES\mfile.txt
00000078 0.16527906 MDEC2: create=true, Pass 1, create multidecimate file 'D:\DUPES\mfile.txt'
00000079 0.16536927 MDEC2: Pass 1 Alloc arrays OK
00000080 23.46486092 MDEC2: File write OK # After full clip scan
00000081 23.46486092 'D:\DUPES\mfile.txt'
Choosing Multidecimate.Exe Mode 2, 1 in 5 decimate.
PASS 2: (Create=false)
Code:
AviSource("D:\Parade.avi")
Assumefps(30.0,sync_audio=true)
Mdec2(show=true) # Show onframe metrics not necessary
Debugview, all from filter constructor
Code:
00000238 0.16752903 MDEC2: Dir FullPath=D:\DUPES\dfile.txt
00000239 0.16759570 MDEC2: create=false, Pass 2, reading decimation file 'D:\DUPES\dfile.txt'
00000240 0.16772106 MDEC2: From File: mode=2 cycle=5 remove=1 num_iframes=7373 num_oframes=5898
00000241 0.16777469 MDEC2: From Clip: num_frames=7373
00000242 0.16940221 MDEC2: Output 5898 frames at 23.998 FPS # input was not an exact multiple of Cycle(5) frames (might ideally be 24.0 FPS).
00000243 0.16945148 MDEC2: Pass 2 Read decimation file OK
EDIT:
Quote:
23.998 FPS # input was not an exact multiple of Cycle(5) frames (might ideally be 24.0 FPS).
|
With longer clip (source was about 4 mins, 7373 frames), variation from ideal FPS would be lesser where source not multiple of cycle.