View Full Version : How does ScriptClip get Average Luma
vcmohan
14th June 2005, 03:44
In the writeup of ScriptClip the example shows script for using Fadein and subtitle to get AverageLuma value. It also states that it can be used (for other functions) if the functions returns a value. How does Fadein return AverageLuma?
Is there a way to return a value by one function to other functions (or ScriptClip) so that they can be used to subtitle?
Finally is scriptclip a regular filter (as I am thinking it to be) or a script function?
Wilbert
14th June 2005, 09:26
In the writeup of ScriptClip the example shows script for using Fadein and subtitle to get AverageLuma value.
Which example?
Is there a way to return a value by one function to other functions (or ScriptClip) so that they can be used to subtitle?
Did you read the examples in the docs?
http://www.avisynth.org/ConditionalFilter
Finally is scriptclip a regular filter (as I am thinking it to be) or a script function?
Yes, it's a regular filter.
vcmohan
15th June 2005, 03:32
In the docs folder I got along with the Avisynth 2.5.5 (sep 04) the usage example of scriptclip used the fadein and averageluma as below. This is under scripting .
Runtime Functions
There are now Conditional Filters which evaluate scripts when a frame is processed, so you can change variables on a per-frame basis.
To have more applications there have to be Runtime Functions which evaluate the content of the clip and return a value. v2.5
ScriptClip(" Subtitle(String(AverageLuma())) ") # evaluate Subtitle(...) for each frame
# the output of AverageLuma is converted to a string
# and Subtitled on the input clip
It did not give more info.
Sorry I missed the scriptclip entry under filters, and so checked thru scripting where I got this reference. This was also the reason why I had a doubt whether it is a filter or script function.
Thanks for the clarification.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.