forked from AvsPmod/AvsPmod
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathpreviewFilterExample.avs
66 lines (53 loc) · 4.17 KB
/
previewFilterExample.avs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*
GPo, 2021.01.03
Examples of preview filter in AvsPmod.
A 'Preview filter' allows an almost real-time view of parameter changes of a filter.
With sliders a very fast visuel adjustment of the used filters is possible. Or use 'Number wheel'
Avisynth filters that do not require a high CPU load are suitable as preview filters. The faster the avisynth filters are, the faster the preview can be created.
It doesn't make sense to use MCTemporalDenoise in a preview filter. Suitable filters are sharpness, colors or similar filters.
Preview filters are always processed as last filter, but 'prefetch' in the preview area only affects the preview filter. Outside of this, 'prefetch' only affects the source filter.
The frame count of the preview filter must match the frame count of the source, or an error message is shown.
Up to 5 filter sets can be created, each preview filter set must be declared as follows.
*/
# Youre source and source filters.
#AviSource("Bla Bla.avi")
#MCTemporalDenoise()
# and now the fast preview filters
/**avsp_filter
Levels(0, 1.000, 255, 0, 255, coring=true)
Tweak(hue=0.0, sat=1.0, bright=0, cont=1.0, coring=True, sse=False, startHue=0, endHue=360, maxSat=150, minSat=0, interp=16)
**/
/*
The sliders are only updated automatically when a preview filter is selected, or with a normal script update (refresh, reload, etc.)
Or you must enable or disable the Preview Filter for an slider update. And there is also the possibility to read only the slider again (slider context menu)
A possibility to see your own name in the 'Preview filter' menu. (multiple same names allowed)
You just have to write something after 'avsp_filter' and the text in this line must be longer than 19 characters (including /**avsp_filter)
Don't use an '&' in the name. I haven't checked all the characters, one or the other can cause problems. Use something else.
*/
/**avsp_filter color + sharpen
#SmoothLevels(input_low=16, gamma=1.00, input_high=235, output_low=16, output_high=235, TVrange=True, Lmode=0, darkSTR=100, brightSTR=100, debug=False)
#SmoothTweak(brightness=0, contrast=1.00, saturation=1.00, hue1=0, hue2=0, TVrange=True, Lmode=0, limitSTR=100, debug=False)
#SmoothCurve(Ycurve="0-0;255-255", Ucurve="0-0;255-255", Vcurve="0-0;255-255", debug=False)
#Highlighter(gblur=100, gradient=True, threshold=100, twopass=False, amount=20, method=0)
#HighlightLimiter(gblur=100.0, gradient=True, threshold=160, twopass=False, amount=20, method=0)
Sharpen(0.40)
#NonlinUSM(z=3, str=2.0, rad=0.6) #sharpen
#NonlinUSM(z=1.0, pow=1.2, str=0.2, rad=120.0) #contrast
#NonlinUSM(z=3, pow=1.2, str=0.25, rad=6) #sharp+
#UnsharpMask(strength=60, radius=3, threshold=8)
#TUnSharp(strength=80, thresholdL=6, thresholdU=40, radius=2, type=0, map=0, lim=2, gui=false)
#SharpenComplex2(str0=2.0, str1=1.125, k0="3 14 3", k1="1 1 1", edgethr=0.2, debug=false)
**/
/*
If you now open the video menu 'Preview filter', these two filter sets should now be displayed.
With a selection one of these filters becomes active. I have defined Ctrl + 'Numpad 0' to 'Numpad 5' to change the filter, change it yourself.
You can save the filters, 'Preview filter' > 'Save preview filters' , but note! All previously saved filters will be deleted!
You can restore all saved or individual sets (will be written into the script at last position).
You can save or restore more then 5 filter sets, but only directly select the first 5 sets.
You can also write the preview filter set in the first line and then the source filter, it makes no difference.
In the event of a refresh or if the script has changed outside of the preview filter area, the preview filter is restored now since version 2.7.2.1
When you are done with the settings, simply remove the filter flag start and end or set a comment flag # at the beginning of the line.
And a final remark. For avisynth the area is only a block comment,
for AvsPmod it is a filter, and no matter what is written in this area, an attempt is made to create a clip.
I hope that I was understandable.
*/