Functions Index :: S :: SplitVideoChannels
SplitVideoChannels(clip c, string "pixel_type")
Splits clip c into an array containing the individual clip's channels (R, G, B[, A] or Y, U, V depending on c's colorspace) and (at index 0) a pixel type string description (thus the array returned is a mixed-type array).
The optional pixel_type argument can be used to convert c to a different colorspace on the fly before returning the channels.
To access the channels inside the array it is best to use the ChannelIndex() helper function.
#open a clip and split into channels converting to YV12
ch = SplitVideoChannels(AVISource(…), "YV12")
# process the Y channel
#don't forget to update the array
yid = ChannelIndex("Y")
# do further processing
# merge channels when done
rst = MergeVideoChannels(ch)
:Batch processing of the entire array is still possible. Simply make the custom function to accept a val (ie any) Avisynth type and process an element only if IsClip returns true.