Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
21st January 2024, 17:12 | #1 | Link |
Registered User
Join Date: May 2022
Location: Brazil
Posts: 38
|
How can i add an image with alpha in Vapoursynth?
I'm trying to add an RGB with alpha image.
Code:
wm = core.lsmas.LWLibavSource(r"watermarkhd.png") wm.set_output() But with the "wm[1]" as output, trying to get the alpha (Gray), did not output an preview and showed this error. Code:
Failed to evaluate the script: Python exception: List index out of bounds Traceback (most recent call last): File "src\\cython\\vapoursynth.pyx", line 3124, in vapoursynth._vpy_evaluate File "src\\cython\\vapoursynth.pyx", line 3125, in vapoursynth._vpy_evaluate File "", line 28, in File "src\\cython\\vapoursynth.pyx", line 2187, in vapoursynth.VideoNode.__getitem__ IndexError: List index out of bounds |
21st January 2024, 18:08 | #2 | Link |
Registered User
Join Date: Sep 2007
Posts: 5,374
|
Use PropToClip
http://www.vapoursynth.com/doc/funct...roptoclip.html Code:
wm = core.lsmas.LWLibavSource(r"watermarkhd.png") alpha = core.std.PropToClip(wm) # alpha.set_output() #view alpha # wm[0].set_output() #view RGB or YUV channels of source (ie. not the alpha) # wm[0].set_output(alpha=alpha) #output with alpha eg.. vspipe Code:
vspipe --info script.vpy |
Thread Tools | Search this Thread |
Display Modes | |
|
|