lets say that from frame 0 to 34067 i want to use like 5 filters and then from 34068,34314 a different one and then join them
what is the easiest way to do it?
EDIT:
source=Mpeg2Source("D:\VIDEO_TS.d2v", CPU2="ooooxx").TFM().TDecimate(Mode=1).ColorMatrix (mode="rec.601->rec.709").ColorYUV(cont_y=5, cont_u=-60, cont_v=0,gamma_y=-30)
a=Trim(source,0,34067)
b=Trim(source,34068,34313)
c=Trim(source,34314,0)
a = a.Hysteria(strength=6.0, maxchg=26, lowthresh=15, highthresh=20).McTemporalDenoise(settings="high"). nnedi3_rpow2(2, cshift="spline36resize", fwidth=1280, fheight=720).Hysteria(strength=5.0, maxchg=28).Dehalo_alpha(rx=3, ry=3, darkstr=0.3, brightstr=0.3).nnedi3_rpow2(2, cshift="spline36resize", fwidth=1920, fheight=1080).Blur(1.0)
b = b.nnedi3_rpow2(2, cshift="spline36resize", fwidth=1280, fheight=720).nnedi3_rpow2(2, cshift="spline36resize", fwidth=1920, fheight=1080)
c = c.Hysteria(strength=6.0, maxchg=26, lowthresh=15, highthresh=20).McTemporalDenoise(settings="high"). nnedi3_rpow2(2, cshift="spline36resize", fwidth=1280, fheight=720).Hysteria(strength=5.0, maxchg=28).Dehalo_alpha(rx=3, ry=3, darkstr=0.3, brightstr=0.3).nnedi3_rpow2(2, cshift="spline36resize", fwidth=1920, fheight=1080).Blur(1.0)
a+b+c
its this ok ? (a and c are one line it just doesnt fit here)
+ Reply to Thread
Results 1 to 2 of 2
-
Last edited by zanzar; 1st Dec 2016 at 19:58.
-
Yes, it's OK - but I suggest you organize your code into functions, like this:
Code:Mpeg2Source("D:\VIDEO_TS.d2v", CPU2="ooooxx") TFM TDecimate(Mode=1) ColorMatrix(mode="rec.601->rec.709") ColorYUV(cont_y=5, cont_u=-60, cont_v=0, gamma_y=-30) return \ fa.Trim(0, 34067) \ + fb.Trim(34068, 34313) \ + fa.Trim(34314, 0) function fa(clip C) { C Hysteria(strength=6.0, maxchg=26, lowthresh=15, highthresh=20) McTemporalDenoise(settings="high") nnedi3_rpow2(2, cshift="spline36resize", fwidth=1280, fheight=720) Hysteria(strength=5.0, maxchg=28) Dehalo_alpha(rx=3, ry=3, darkstr=0.3, brightstr=0.3) nnedi3_rpow2(2, cshift="spline36resize", fwidth=1920, fheight=1080) Blur(1.0) return Last } function fb(clip C) { C nnedi3_rpow2(2, cshift="spline36resize", fwidth=1280, fheight=720) nnedi3_rpow2(2, cshift="spline36resize", fwidth=1920, fheight=1080) return Last } #function fc(clip C) #{ # C # Hysteria(strength=6.0, maxchg=26, lowthresh=15, highthresh=20) # McTemporalDenoise(settings="high") # nnedi3_rpow2(2, cshift="spline36resize", fwidth=1280, fheight=720) # Hysteria(strength=5.0, maxchg=28) # Dehalo_alpha(rx=3, ry=3, darkstr=0.3, brightstr=0.3) # nnedi3_rpow2(2, cshift="spline36resize", fwidth=1920, fheight=1080) # Blur(1.0) # return Last #}
You will also get better error feedback: the line number will usually point to the exact filter that is causing the trouble.
Note use of "\" for line continuation, and the implicit Last variable.
After re-formatting the code this way, it became obvious that fa() and fc() were identical, so fc() was commented out and fa() called twice.
Similar Threads
-
VirtualDub: Apply audio filters (time stretch) to a special range of video
By DerMoment1608 in forum EditingReplies: 5Last Post: 13th Dec 2015, 13:32 -
Apply filters on interlaced fields
By Lumbermatt in forum RestorationReplies: 2Last Post: 2nd Feb 2014, 07:01 -
Help to apply filters
By charlesn73z in forum DVD RippingReplies: 40Last Post: 24th Jul 2013, 17:23 -
youtube and trimmed video file
By Timothy Schmits in forum Newbie / General discussionsReplies: 2Last Post: 26th Jun 2013, 02:09 -
applying different filters to different sections in a clip (via avisynth)
By unclescoob in forum RestorationReplies: 28Last Post: 30th Jan 2012, 13:50