moviepy
moviepy copied to clipboard
Resize with lamda and set_position don't work together correctly
from moviepy import *
textPosition = (random.uniform(-0.15, 0.15), random.uniform(-0.15, 0.15))
textClip = TextClip(txt="Test", size=(1920, 1080), color="white", stroke_color="black", stroke_width=5, fontsize=200)
textClip = textClip.set_position('center')
textClip = textClip.set_position(textPosition, relative=True)
textClip = textClip.resize(lambda t : 1 + zoomFactor * t)
Expected Behavior
Text is slightly offset from the center and zooms in over time.
Actual Behavior
The text starts slightly offset from the center, zooms in, and moves to the bottom right corner of the screen over time.
Specifications
- Python : 3.9.7 (tags/v3.9.7:1016ef3, Aug 30 2021, 20:19:38) [MSC v.1929 64 bit (AMD64)]
- Moviepy Version: 1.0.3
- Platform Name: Windows 10
- Platform Version: 10.0.19043-SP0
I ran into the same issue. Are there any updates or workarounds?