The photo contains a transparent shadow generated with PIL. It's imported as a PNG.
It should overlay over the video like so and slowly grow in size:
Actual Behavior
Instead, the overlay does increase is size however the transparent pixels disappear:
Steps to Reproduce the Problem
Import video and photo with transparent pixels
Increase the photo over time with lambda and .resize()
Composite the two together
Export the result
import moviepy.editor as moviepy
#import base video and image with transparent pixels
input_vid = moviepy.VideoFileClip("input.mp4").set_duration(5)
opaque_img = moviepy.ImageClip('./subtitles/1.png').set_duration(3)
#overlay the two together and resize the overlay with lambda animation
output_vid = moviepy.CompositeVideoClip([ input_vid, opaque_img.resize(lambda t: 1+t).set_position(('center', 'center')) ])
#export
output_vid.write_videofile("output.mp4",codec='libx264')
Below is simplified code for a script I'm programming to overlay PNG files with subtitles over a video:
-->
Expected Behavior
The photo contains a transparent shadow generated with PIL. It's imported as a PNG.
It should overlay over the video like so and slowly grow in size:
Actual Behavior
Instead, the overlay does increase is size however the transparent pixels disappear:
Steps to Reproduce the Problem
Specifications