You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to create a text overlay for my video. Positioning worked well for me in moviepy 1.x, but it always sticks at middle-left after I updated to 2.x. Tried .with_position(('left', 'top')), same result. Plus, SlideIn doesn't work for me while SlideOut does. Thanks!
import moviepy as mp
base = mp.ColorClip((1920, 1080), duration=5)
title = (
mp.TextClip(
'./SmileySans-Oblique.otf',
'lorem ipsum dolor sit amet',
font_size=48,
color='#fff',
bg_color='#00000044',
stroke_color='#000',
stroke_width=2,
margin=(40, 16, 8, 8),
text_align='left',
horizontal_align='left',
vertical_align='top',
duration=5,
)
.with_position((32, 32))
.with_effects([mp.vfx.SlideIn(1, 'left'), mp.vfx.SlideOut(1, 'left')])
)
mp.CompositeVideoClip([base, title]).write_videofile('test.mp4', fps=24)
Expected Behavior
The title text ‘lorem ipsum dolor sit amet’ slides in to (32, 32) from top-left, stays there, and slides out.
Actual Behavior
The text appears at middle-left instead of top-left. It simply appears instead of sliding in. Slide out works, though.
Specifications
Python Version: 3.11.10
MoviePy Version: 2.1.2
Platform Name: Windows 11
Platform Version: 24H2
The text was updated successfully, but these errors were encountered:
I'm trying to create a text overlay for my video. Positioning worked well for me in moviepy 1.x, but it always sticks at middle-left after I updated to 2.x. Tried
.with_position(('left', 'top'))
, same result. Plus, SlideIn doesn't work for me while SlideOut does. Thanks!Expected Behavior
The title text ‘lorem ipsum dolor sit amet’ slides in to (32, 32) from top-left, stays there, and slides out.
Actual Behavior
The text appears at middle-left instead of top-left. It simply appears instead of sliding in. Slide out works, though.
Specifications
The text was updated successfully, but these errors were encountered: