-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overlay video with .webm format video with transparent background #2008
Comments
Show both videos for better help. |
You can set param: has_mask=True ,like this: background = VideoFileClip("background.mp4")
layer = VideoFileClip("overlay.mov", has_mask=True)
CompositeVideoClip([background, layer]).write_videofile("out.mp4", codec='libx264') |
This does not show the background video. Transparency does not seem to work. webm video : https://rotato.netlify.app/alpha-demo/movie-webm.webm See web view showing transparency: https://codepen.io/mortenjust/pen/BaLrjzm Any solution/work around? |
If you install the Pull Request #2229 , or you wait until the approval and update of moviepy, you can set parameters decoder="libvpx-vp9" and has_mask=True in VideoFIleClip like this: from moviepy.editor import VideoFileClip, CompositeVideoClip
[...]
clip2 = VideoFileClip("transparent.webm", has_mask=True, decoder="libvpx-vp9")
[...] |
Fixed with v2.1.2 |
Hello, I have a video in .webm format with a transparent background(clip2) and a normal mp4 video(clip1). I want to overlay clip2 video on clip1 video, but when I do that, the transparent feature in the background of clip2 disappears and a red beam of light comes on.
Here is my code:
The text was updated successfully, but these errors were encountered: