【问题标题】:how do i install pyffmpeg on windows 10我如何在 Windows 10 上安装 pyffmpeg
【发布时间】:2016-04-15 09:19:14
【问题描述】:

谁能指出我在 Windows 10 计算机上安装 pyffmpeg 的正确方向。我似乎遇到了一些麻烦。这需要cython吗?请所有输入表示赞赏。

**更新我安装了 cython,但它卡在 setup.py 上

在第 84 行安装时卡住了

Traceback (most recent call last):
  File ".\setup.py", line 84, in <module>
incdir = incdir + list(nd.get_numpy_include_dirs())
TypeError: cannot concatenate 'str' and 'list' objects

ffmpeg 版本是 ffmpeg-20160415-git-21acc4d-win32-static

我确实也更改了它的文件路径

【问题讨论】:

  • 你尝试了什么,有什么问题?
  • @Selcuk 我刚刚更新了
  • 您必须发布错误的完整回溯。 “卡住了”不是调试提示。
  • @Seluck 刚刚搞定
  • 你的 ffmpeg 版本是多少?它不适用于较新版本的 ffmpeg:github.com/mhaller/pyffmpeg/issues/1

标签: python windows ffmpeg cython pyffmpeg


【解决方案1】:

setup.py中的这一行

    incdir = path_join(ffmpegpath, 'include')

不行,因为incdir 需要在这里是一个数组:

if (with_numpy):
    incdir = incdir + list(nd.get_numpy_include_dirs())

所以,

if sys.platform in [ 'win32', 'win64' ] :
    libs = static_resolver(libs)
    libinc += [ r'/mingw/lib' ] # it seems some people require this
    incdir = [ path_join(ffmpegpath, 'include') ]
else:
    incdir = [ path_join(ffmpegpath, 'include'), "/usr/include" , "./include" ]

这可能对您没有多大帮助,因为可能需要旧版本的 ffmpeg。

【讨论】:

    猜你喜欢
    • 2019-12-06
    • 2020-02-16
    • 2020-01-27
    • 2016-05-03
    • 2020-12-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多