View Full Version : Different filtering on different parts
tormento
4th September 2021, 14:18
I have an anime, with a very noisy part in the beginning (i.e. credits) and then it's all digital art (noiseless).
Is it possible to use AVS+ to apply different (or no) filters to different parts or have I to use different .avs files, each with its own range?
videoh
4th September 2021, 14:29
Sure you can. Here's a script that denoises the first 250 frames only of your lighthouse clip.
src=dgsource("The lighthouse.dgi")
vid1=src.trim(0,249).dgdenoise()
vid2=src.trim(250,576)
vid1++vid2
tormento
4th September 2021, 14:57
Sure you can. Here's a script that denoises the first 250 frames only of your lighthouse clip.
Thanks!
StainlessS
4th September 2021, 19:32
ClipClop,
https://forum.doom9.org/showthread.php?t=162266
Example usage script using NickNames:
Avisource("D:\avs\test.avi")
ORG=Last
#some kind of editing, clips
V1 = FFT3DFilter(Plane=0,Sigma=1.6) # Light Luma
V2 = FFT3DFilter(Plane=0,Sigma=2.0) # Med Luma
V3 = FFT3DFilter(Plane=0,Sigma=4.0) # High Luma
V4 = FFT3DFilter(Plane=3,Sigma=1.6) # Light Chroma
V5 = FFT3DFilter(Plane=3,Sigma=2.0) # Med Chroma
V6 = FFT3DFilter(Plane=3,Sigma=4.0) # High Chroma
V7 = FFT3DFilter(Plane=4,Sigma=1.6) # Light Luma+Chroma
V8 = FFT3DFilter(Plane=4,Sigma=2.0) # Med Luma+Chroma
V9 = FFT3DFilter(Plane=4,Sigma=4.0) # High Luma+Chroma
V10= FlipHorizontal() # Flip-H
V11= FlipVertical() # Flip-V
V12= Invert() # Invert
NickNames =""" # Psuedonyms for clip index number
L0 = 1 # Light Luma
L1 = 2 # Med Luma
L2 = 3 # High Luma
C0 = 4 # Light Chroma
C1 = 5 # Med Chroma
C2 = 6 # High Chroma
LC0 = 7 # Light Luma + Chroma
LC1 = 8 # Med Luma + Chroma
LC2 = 9 # High Luma + Chroma
FH = 10 # Flip-H
FV = 11 # Flip-V
INV = 12 # Invert
"""
# actual editing commands, frames/ranges not edited/mentioned are as source [below demo, all are edited]
SCMD=""" # Clip editing commands in string, can also use commands in file
C0 0,99 # Light Chroma frames @ 0 -> 99
L0 100,-200 # Light Luma frames @ 100, 200 frames ie frames 100->299
INV 300,399 # Invert 300->399
L0 400,499 # Light Luma frames 400->499
FH 500,599 # Flip-H 500->599
LC2 600,699 # High Luma + Chroma
C1 800 # Med Chroma, Single frame
1 900,999 # Light Luma, We used the clip number instead of a NickName
FV 1000,1099 # Flip-V
LC1 2000,0 # Med Luma + Chroma, 2000 -> lastframe
"""
SHOW=True
ClipClop(ORG,V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,scmd=SCMD,nickname=NickNames,show=SHOW)
Supports up to 255 replacement [edited/denoised or whatever] clips.
EDIT: If only 2 sections, then as VideoH said is probably easier, use ClipClop where many edits as trim/splice quickly gets awkward.
GMJCZP
5th September 2021, 00:51
Or directly:
ApplyRange(start_frame, end_frame, "Your Denoiser", arguments for your Denoiser)
Videoh's suggestion is more academic and TinMan's suggestion is for more complex cases.
hello_hello
5th September 2021, 05:16
MeGUI's AVS Cutter can be useful for that sort of thing. It opens a script with a preview, so you can navigate through the video while specifying the start and end frames for each trim (very much like specifying start and end editing points with VirtualDub). It can be handy if you need to divide the video up into many parts, and obviously you have to find each sections start and end frame number anyway, so you can add the trims while you're at it.
I had a dream that one day the AVSCutter would include the ability to specify the filtering to be used with each trim, but I doubt it'll ever happen. They look like this. It's easy enough to tack-on the appropriate filtering once they're saved to the script.
__film = last
__t0 = __film.trim(0, 2840)
__t1 = __film.trim(2841, 6451)
__t2 = __film.trim(6452, 11024)
__t3 = __film.trim(11025, 16271)
__t0 ++ __t1 ++ __t2 ++ __t3
gispos
5th September 2021, 08:54
With AvsPmod it is also possible with preview.
Various options are also offered, and the selection can be saved in the script for later editing.
c0 = Trim(522, 801)
c1 = Trim(1053, 1236)
c2 = Trim(1454, 1733)
c3 = Trim(1959, 2203)
c4 = Trim(2464, 2647)
c0 ++ c1 ++ c2 ++ c3 ++ c4
https://i.postimg.cc/w3xmFXQR/TrimEdit.jpg (https://postimg.cc/w3xmFXQR)
tormento
5th September 2021, 10:09
Thanks everybody!
videoh
5th September 2021, 12:58
When your problem is a nail, any hammer will do.
StainlessS
5th September 2021, 16:51
When your problem is a nail, any hammer will do.
Or a reasonably heavy screwdriver can work also.
videoh
5th September 2021, 18:27
For sure. OJ and vodka lubricates all tasks!
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.