moviepy textclip不能在centos7或amazon Linux上渲染,但在mac上渲染得非常好



生成带有文本、背景和图像的简单mp4电影的代码

from moviepy.editor import *
image = ImageClip("res/pagan.png")
image = image.set_duration(5)
image = image.set_position((50, "center"))
backgroundImage = ImageClip("res/background.png")
backgroundImage = backgroundImage.set_duration(5)
fromText = TextClip("From: " , fontsize=70, color="white")
fromText = fromText.set_position((800, 320))
fromText = fromText.set_duration(5)
comp =  CompositeVideoClip([backgroundImage, image, fromText])
output = comp.set_duration(5)
output.write_videofile("tmp.mp4", audio_codec="aac", fps=24)

电影在macbook pro和centos7上都没有任何错误。但是,文本不能在centos7服务器或amazon linux上正确呈现。它只是显示为模糊的白线。以前有人遇到过类似的问题吗?我已经提出这是一个错误的电影,以及,但想到张贴在这里,看看是否有人面临类似的问题在过去。

问题似乎与两个环境之间的Imagemagick版本有关。看起来我需要ImageMagick 7.1.0。有关我如何缩小范围的详细信息,请参阅github.com/Zulko/moviepy/issues/1647。

相关内容

最新更新