Functions Index :: F :: FilterVarChain

[<< up one level]


filters :: utility


FilterVarChain(clip c, string filter, string var_times, string var_params)


Applies filter with varying arguments on each call with a varying number of times for each call.


c: The clip to apply filter to.

filter: The filter to apply to clip c. It can be a built-in or plugin filter or any user-defined function.

var_times: An array whose elements is the number of times to apply filter with the parameters contained at the corresponding var_params array's element.

var_params: A CR/LF delimited array (ie a multiline Avisynth string) containing at each line the arguments to be passed to filter as an argument list (separated with commas).

Notes and conditions on arguments relations:

1]: If for a filter 's invocation the associated element of var_params is "" then filter is called with clip c as its sole argument.

2]: If for a filter 's invocation the associated element of var_times is zero or less, the filter is not applied for that invocation.

3]: The first filter's argument (clip c) must not be included in var_params's elements.


# trim-out ranges [50..100), [150..175), [200..225), [500..537)

# apply a dissolve in the last trim-out

# note that ops are applied successively, thus framenumbers

# must be recalculated on each invocation

vars = """50,25



400,37,EDOP_DISS,"10" """

clp = AviSource(...)

clp2 = FilterVarChain(clp, "EditDelete", "2,1,1,1", vars)


[<< top]