moviepy icon indicating copy to clipboard operation
moviepy copied to clipboard

Resize with lamda and set_position don't work together correctly

Open doctorrmcb opened this issue 3 years ago • 1 comments

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

doctorrmcb avatar Oct 25 '21 05:10 doctorrmcb

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

wechtits19 avatar May 05 '22 20:05 wechtits19