I'm sure this is a stupid question. Is
TFM().TDecimate()
The same as
TFM()
TDecimate()
I see both on here often. I'm assuming you can use a "." instead of a line break? Am I understanding this wrong?
+ Reply to Thread
Results 1 to 7 of 7
-
-
No.
dot basically means that what is before the dot it the first parameter for what comes after the dot.
To make more sense of this you need to be aware of that Avisynth uses an implicit 'last' variable.
(if it was simply a replacement for a new line, something like ...TFM()... should work)
so:
TFM()
<> last = TFM(last)
<> last = last.TFM()
TFM().TDecimate()
<> last = TFM(last)
last = Decimate(last)
<> TFM()
Decimate()
so writing
filter1().filter2().filter3()
is the same as applying
last = filter1(last)
last = filter2(last)
last = filter3(last)
or
filter1()
filter2()
filter3()
Cu Selurusers currently on my ignore list: deadrats, Stears555 -
-
The period pipes the data from the filter on the left to the filter on the right (corrected), without naming it. Otherwise the name "last" is assumed for inputs and outputs. The final result is the same within your simple examples but the mechanism is slightly different. There are cases where there is a difference.
Last edited by jagabo; 12th Sep 2023 at 20:20.
-
-
Sometimes it's practical to chain functions together with dots, especially when there's more than one video in a script (or the filtering needs to change for some sections). For example:
Code:Vid = last Clip1 = Vid.SomeFilter().AnotherFilter().OneMoreFunction() Clip2 = Vid.SomeFilter().AnotherFilter(DoThis=false).OneMoreFunction(Something=true) Clip1.Trim(0,999) + Clip2.Trim(1000,1087) + Clip1.Trim(1088,0)
Code:Vid = last Clip1 = Vid\ .SomeFilter()\ .AnotherFilter()\ .OneMoreFunction() Clip2 = Vid\ .SomeFilter()\ .AnotherFilter(DoThis=false)\ .OneMoreFunction(Something=true) Clip1.Trim(0,999) + Clip2.Trim(1000,1087) + Clip1.Trim(1088,0)
Avisynth functions Resize8 Mod - Audio Speed/Meter/Wave - FixBlend.zip - Position.zip
Avisynth/VapourSynth functions CropResize - FrostyBorders - CPreview (Cropping Preview)
Similar Threads
-
ffmpeg 5.0 new syntax breaks scripts, especially QSV
By BartZLederman in forum User guidesReplies: 6Last Post: 29th Mar 2022, 14:39 -
Avisynth reviving old scripts
By Leo48 in forum Newbie / General discussionsReplies: 2Last Post: 24th Dec 2021, 11:05 -
Any way to copy line breaks from another srt file?
By seanmcnally in forum SubtitleReplies: 4Last Post: 10th Dec 2020, 03:46 -
Best way to detelecine in Avisynth & a few examples of scripts I've tried.
By LaserBones in forum Newbie / General discussionsReplies: 3Last Post: 27th Jul 2020, 00:03 -
AviSynth scripts always output GREEN SCREEN
By rilopes64 in forum Newbie / General discussionsReplies: 0Last Post: 11th Dec 2019, 07:39