写入文件时出现ffmpeg osx错误:"无法识别的选项'preset'.错误拆分参数列表:找不到选项

asa*_*bah 1 python ffmpeg moviepy osx-elcapitan

我有以下简单的Python代码:

yellow_output = 'test_videos_output/solidYellowleft.mp4'
clip1 = VideoFileClip("test_videos/solidYellowLeft.mp4")
yellow_clip = clip1.fl_image(process_image)
yellow_clip.write_videofile(yellow_output, audio=False)
Run Code Online (Sandbox Code Playgroud)

"process_image"函数只返回您提供的内容(为测试目的而创建).

在OSX 10.11.6上运行Python 3.5.4,ffmpeg 2.8.6

我收到错误:

OSError: [Errno 32] Broken pipe

MoviePy error: FFMPEG encountered the following error while writing file test_videos_output/solidWwhiteright.mp4:

 b"Unrecognized option 'preset'.\nError splitting the argument list: Option not found\n"
Run Code Online (Sandbox Code Playgroud)

视频文件未生成; 如何摆脱这个错误; 所以我可以生成MP4文件?

注意:相同的代码在Ubuntu 16.04上运行愉快

Bus*_*cat 5

可能与此处提到的问题相同:https: //github.com/Zulko/moviepy/issues/657

请从以下评论中尝试以下内容:https: //github.com/Zulko/moviepy/issues/657#issuecomment-355858936

conda install -c conda-forge ffmpeg


pat*_*_ai 5

为我

conda install -c conda-forge ffmpeg

哪个安装了pytorch::ffmpeg-4.3-hf484d3e_0

具体来说没有用

然而只是简单地做

conda update ffmpeg

哪个安装了pkgs/main::ffmpeg-4.2.2-h20bf706_0

为我解决了这个问题。