Hello, I need to apply some filters to different parts of a video, these are the segments and the filters to apply
9414-12897 mClean
20799-21008 f3kdb Neo
22727-32001 mClean
36902-37071 mClean
42534-45354 mClean
47349-47894 SMDegrain
47895-51022 mClean
52771-54297 mClean
56833-57076 mClean
60841-61341 SMDegrain
61550-68318 mClean
71004-71762 SMDegrain
73551-76972 SMDegrain
78804-79569 neo_f3kdb
80854-81520 mClean
82504-84289 SMDegrain
84785-85576 Spotless
88640-90931 SMDegrain
93481-97177 SMDegrain
99952-101543 SMDegrain
107042-107469 mClean
110778-110474 SMDegrain
11449-114220 SMDegrain
114637-114868 mClean
114869-115165 SMDegrain
121607-122577 SMDegrain
123517-123716 SMDegrain
123717-124310 mClean
124311-126070 SMDegrain
127144-127360 SMDegrain
128430-131478 SMDegrain
131479-132287 mClean
These are the filters settings
neo_f3kdb(preset="high", output_depth=8)
SMDegrain(tr=6, thSAD=600, contrasharp=true, refinemotion=true)
mClean(thSAD=400, chroma=true, sharp=10, rn=14, deband=4, depth=0, strength=20)
Total number of frames in the clip; 140.772
Could someone help me to create the script?, I've no idea how to do it. Thanks in advance for any help.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 1 to 7 of 7
Thread
-
Last edited by TGB; 1st Apr 2024 at 16:21.
-
Applyrange can do that but it has limitations (memory leak error possible if too many instances used)
example for fft3dfilter (you have to explicitly put all the args)
# filtering on frames range 265-278
ApplyRange(265,278,"fft3dfilter",19,1.0,3,48,48,4, 16,16,2.0,0,0.3,1.0,4.0,20.0)
for Tweak:
ApplyRange(0,35,"Tweak",0.0,1.0,12,0.9)
For coloryuv:
ApplyRange(100,101,"colorYUV",-3, 0, 0, 25, 0, 8, 0, 0, -8)*** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE -
But ApplyRange it's applied on each segment you want to be filtered? I mean, if I've 32 segments to filter do I need 32 instances of applyrange with all the args for each filter?
Isn't there any other way to apply different filters to a set of segments?Last edited by TGB; 1st Apr 2024 at 16:39.
-
You can use trim() to specify a range of frames and associated actions,
then alignedsplice() to join the sections back together -
yeah trim can help aswell (can be more more work depending how many filters you have)
v = AVISource("C:\MyVideo.avi")
vid1 = v.trim(0,100).filter1().filter2().filter3()....
vid2 = v.trim(101,200).filter1().filter2().filter3()....
vid3 = v.trim(201,300).filter1().filter2().filter3()....
vid1 ++ vid2 ++ vid3*** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE -
I use ReplaceFramesSimple for this sort of thing. It comes as a part of the RemapFrames package. Here's an example:
A=Last
B=A.SMDegrain(tr=6, thSAD=600, contrasharp=true, refinemotion=true)
ReplaceFramesSimple(A,B,Mappings="[47349 47894] [60841 61341] [71004 71762] [73551 76972] [82504 84289] ")
The benefits of doing it this way are fairly obvious. You only have to write the filter once and only fill in the ranges. And you don't have to mention the parts not being filtered at all. -
Just fill in the rest of the frames you need each filtered for. I finished the neo3kdb one for you and gave you 3 examples for the others. That should be enough for you to understand how to specify the rest of the frames for smdegrain and mclean on your own.
Code:smdegrain = last.SMDegrain(tr=6, thSAD=600, contrasharp=true, refinemotion=true) mclean = last.mClean(thSAD=400, chroma=true, sharp=10, rn=14, deband=4, depth=0, strength=20) neof3kdb = last.neo_f3kdb(preset="high", output_depth=8) ReplaceFramesSimple(last, smdegrain, mappings="[47349 47894] [60841 61341] [71004 71762]") ReplaceFramesSimple(last, mclean, mappings="[9414 12897] [22727 32001] [36902 37071]") ReplaceFramesSimple(last, neof3kdb, mappings="[20799 21008] [78804 79569]")
Last edited by killerteengohan; 5th Apr 2024 at 14:01.
Similar Threads
-
Apply cube lut with Staxrip
By salvo00786 in forum Video ConversionReplies: 1Last Post: 19th Sep 2023, 11:58 -
Best way to apply 3:2 pulldown in Premiere?
By g0ren in forum EditingReplies: 8Last Post: 9th Aug 2023, 08:33 -
How to apply the same transition to multiple clips in Kinemaster
By frank1492 in forum EditingReplies: 5Last Post: 8th Dec 2022, 00:34 -
How to apply a specific setting to all subtitles in Aegisub?
By untymage in forum SubtitleReplies: 4Last Post: 23rd Mar 2020, 12:29 -
How to apply a filter to only one part of a video.
By Fraugster in forum EditingReplies: 26Last Post: 13th Sep 2019, 13:14