Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 13921

How to set position moviepy?

$
0
0

I want to сhange video resolution and then superimpose it on the picture in the center.

`

from moviepy.editor import *img = ImageClip("image.png")video2 = VideoFileClip("down.mp4")video2.set_position(("center", 0.6), relative=True)video2.subclip().fx(vfx.resize, width=885, height=825)video2.set_position(("center", 0.6), relative=True)final = CompositeVideoClip([img, video2]).set_duration(20)final.write_videofile("finall.mp4", audio=False)

`

I tried .set_position(("center", "center")), .set_position((0.5, 0.5)), .set_position(("center", 0.5)), .set_position((500, 500)) and others, but it didn't work.


Viewing all articles
Browse latest Browse all 13921

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>