Merge
(clip1, clip2, float weight=0.5)
(clip1, clip2, float weight=1.0)
MergeChromaMergeLuma
(clip1, clip2, float weight=1.0)
These filters make it possible to merge luma or chroma or both from a videoclip into another. There is an optional weighting, so a percentage between the two clips can be specified. Merge
is present in v2.56.
clip1 is the clip that has Luma or Chroma merged INTO (based on which filter you use), that means that the OTHER channel (chroma if MergeLuma
is used, luma in MergeChroma
) is left completely untouched.
clip2 is the one from which the Luma or Chroma must be taken. In MergeChroma
, this is where the Chroma will be taken from, and vice-versa for MergeLuma
. It must be the same colorspace as clip1; i.e. you cannot merge from a YV12 clip into a YUY2 clip.
The weight defines how much influence the new clip should have. Range is 0.0 to 1.0, where 0.0 is no influence and 1.0 will completely overwrite the specified channel (default). The filter will be slightly slower when a weight other than 0.0, 0.5 or 1.0 is specified.
Also see here for the resulting clip properties.
# Will only blur the Luma channel. mpeg2source("c:\apps\avisynth\main.d2v") lumvid = Blur(1.0) MergeLuma(lumvid) # This will do a Spatial Smooth on the Chroma channel # that will be mixed 50/50 with the original image. mpeg2source("c:\apps\avisynth\main.d2v") chromavid = SpatialSmoother(2,3) MergeChroma(chromavid,0.5) # This will run a temporalsmoother and a soft spatial # smoother on the Luma channel, and a more agressive # spatial smoother on the Chroma channel. # The original luma channel is then added with the # smoothed version at 75%. The chroma channel is # fully replaced with the blurred version. mpeg2source("c:\apps\avisynth\main.d2v") luma = TemporalSmoother(2,3) luma = luma.Spatialsmoother(3,10,10) chroma = Spatialsmoother(3,40,40) MergeLuma(luma,0.75) MergeChroma(chroma) # This will average two video sources. avisource("c:\apps\avisynth\main.avi") vid2 = avisource("c:\apps\avisynth\main2.avi") Merge(vid2)
Changelog:
v2.56 | added Merge |
$Date: 2008/10/26 14:18:27 $