Zulko / moviepy

Video editing with Python
https://zulko.github.io/moviepy/
MIT License
12.55k stars 1.57k forks source link

Resize with lamda and set_position don't work together correctly #1675

Open doctorrmcb opened 3 years ago

doctorrmcb commented 3 years ago
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

wechtits19 commented 2 years ago

I ran into the same issue. Are there any updates or workarounds?