Open ItachiUchiha5277 opened 1 year ago
Please ignore the "66.7%" on the 2nd image
In the txt_1 object, you passed a parameter size
whose value is vid.size
but it should be less than the size of the video for example if the size of the video is (1080, 1920)
then the size of TextClip should be (800, 1920)
. Note: height doesn't matter much if method
is set to caption
.
Now the text will only be written in 800 pixels as you pass another parameter method=caption
, it'll wrap the text within 800 pixels. you can pass size=(800, 1000)
or size=(800, vid.size[-1])
or size=(800, None)
(to auto adjust height).
Next: to position it you should use pixels, instead of passing ('center', 'top')
, you could use ('center', 100)
. And if you want your text 2 to be placed 100 pixels from text 1 then you can use (for text 2) ('center', txt_1.h+100)
. Note: to use txt.h+100
the height of the first text should be None
so that it'll auto determine height, eg: size=(800, None)
.
I hope you find it well, Thanks.
moviepy version: 1.0.3 python version: 3.8.0 OS: Windows 11 ImageMagick Version 7.1.1
I have a
VideoClip
on which I am trying to put multipleTextClips
Expected Result:
Actual Result: