Moviepy - TypeError: Can't convert 'bytes' object to str implicitly

Moviepy - TypeError: Can't convert 'bytes' object to str implicitly

from moviepy.editor import *
clip = VideoFileClip("vid.mov")
clip.write_videofile("movie.mp4")

^ 报错

TypeError: Can't convert 'bytes' object to str implicitly.

正常打印"Building video movie.mp4"和"Writing audio in movieTEMP_MPY_wvf_snd.mp3"。

我正在使用 python 3.2 和 Raspian Wheezy。 怎么了?当然它应该是一个简单的程序...

编辑: 如果将 audio = false 添加到 write_videofile 参数,它可以正常工作。问题出在音频的某个地方。

根据 this answer, the issue was that there is an error in the moviepy script which generates an incorrect error output. The correct output indicates that I had not install the libmp3lame codec when I installed ffmpeg, so it could not write audio. See 了解如何使用上述编解码器正确安装 ffmpeg 的详细信息。