Log in

View Full Version : Layer usage


Mounir
8th September 2017, 10:50
Can someone show on how to use the Layer filter (http://avisynth.nl/index.php/Layer)

I want to use a .bmp image and overlay it over a video in yv12 preferably with the substract effect

Thanks for your help

raffriff42
8th September 2017, 11:28
Layer works only in YUY2 or RGB32, so some conversion is needed.
I recommend converting both sources to RGB32, then converting the result back to YV12.A = clip.ConvertToRGB32(matrix="Rec709")

B = ImageSource("example.bmp", pixel_type="RGB32")

Layer(A, B, "subtract").ConvertToYV12(matrix="Rec709")
If the image is not the same width & height as the video, you probably want to specify x and y position.Layer(A, B, "subtract", x=100, y=100).ConvertToYV12(matrix="Rec709")