-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
I have a question regarding this attribute pos in
Impossible to use it and impossible to find "VideoClip.set_pos" details.
I want to put my clip at the center of a bigger frame
pos
A function t->(x,y) where x,y is the position of the clip when it is composed with other clips. See VideoClip.set_pos for more details
i tried this
clip = clip.pos(("center", "center"))
and also
clip = clip.pos((100, 100))
the error :
Traceback (most recent call last):
File "/Code_Diaporama/create_slideshow.py", line 100, in
create_slideshow(
File "/Code_Diaporama/create_slideshow.py", line 75, in create_slideshow
final_video = CompositeVideoClip(clips)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Code_Diaporama/.venv/lib/python3.11/site-packages/moviepy/video/compositing/CompositeVideoClip.py", line 98, in init
self.clips = sorted(self.clips, key=lambda clip: clip.layer_index)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Code_Diaporama/.venv/lib/python3.11/site-packages/moviepy/video/compositing/CompositeVideoClip.py", line 98, in
self.clips = sorted(self.clips, key=lambda clip: clip.layer_index)
^^^^^^^^^^^^^^^^
AttributeError: 'tuple' object has no attribute 'layer_index'