写入文件时出现ffmpeg osx错误:“无法识别的选项'预设'。拆分参数列表时出错:找不到选项 - python

我有以下简单的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)

“ 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"

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

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

参考方案

这里可能提到的相同问题:
https://github.com/Zulko/moviepy/issues/657

请尝试此注释中的以下内容:
https://github.com/Zulko/moviepy/issues/657#issuecomment-355858936

conda install -c conda-forge ffmpeg

单行的'if'/'for'语句是否使用Python样式好? - python

我经常在这里看到某人的代码,看起来像是“单线”,这是一条单行语句,以传统的“if”语句或“for”循环的标准方式执行。我在Google周围搜索,无法真正找到可以执行的搜索类型?任何人都可以提出建议并最好举一些例子吗?例如,我可以一行执行此操作吗?example = "example" if "exam" in exam…

为什么使用'=='或'is'比较字符串有时会产生不同的结果? - python

我有一个Python程序,其中将两个变量设置为'public'值。在条件表达式中,我有比较var1 is var2失败,但如果将其更改为var1 == var2,它将返回True。现在,如果我打开Python解释器并进行相同的“是”比较,则此操作成功。>>> s1 = 'public' >>…

在返回'Response'(Python)中传递多个参数 - python

我在Angular工作,正在使用Http请求和响应。是否可以在“响应”中发送多个参数。角度文件:this.http.get("api/agent/applicationaware").subscribe((data:any)... python文件:def get(request): ... return Response(seriali…

python JSON对象必须是str,bytes或bytearray,而不是'dict - python

在Python 3中,要加载以前保存的json,如下所示:json.dumps(dictionary)输出是这样的{"('Hello',)": 6, "('Hi',)": 5}当我使用json.loads({"('Hello',)": 6,…

Python exchangelib在子文件夹中读取邮件 - python

我想从Outlook邮箱的子文件夹中读取邮件。Inbox ├──myfolder 我可以使用account.inbox.all()阅读收件箱,但我想阅读myfolder中的邮件我尝试了此页面folder部分中的内容,但无法正确完成https://pypi.python.org/pypi/exchangelib/ 参考方案 您需要首先掌握Folder的myfo…