moviepy==1.0.2
正常画中画
#画中画
from moviepy.editor import VideoFileClip, CompositeVideoClip
from moviepy.video.fx.resize import resize
main_clip = VideoFileClip("1222.mp4") # 主要视频
pip_clip = VideoFileClip("122.mp4") # 画中画视频
pip_clip = resize(pip_clip, width=300)
pip_clip = pip_clip.set_position(("right", "bottom")).set_duration(main_clip.duration)
final_clip = CompositeVideoClip([main_clip, pip_clip])
final_clip.write_videofile("output_video.mp4", codec="libx264", fps=24)
圆形画中画
# 画中画圆形视频
标签:moviepy,clip,画中画,width,完成,pip,import
From: https://www.cnblogs.com/msmsga/p/18591135