gpt4 book ai didi

python - Anaconda 找不到 openh264 库

转载 作者:行者123 更新时间:2023-12-02 16:28:46 24 4
gpt4 key购买 nike

我正在尝试安装 openh264 以在 jupyter 笔记本上与 opencv 一起使用。我在 Windows 10 Pro 环境中的 anaconda 提示符下工作。我正在使用找到的推荐 channel on the Anaconda website .

对于它们中的每一个,它返回

Collecting package metadata (repodata.json): done
Solving environment: failed

PackagesNotFoundError: The following packages are not available from current channels:
- openh264

Current channels:
- https://conda.anaconda.org/conda-forge/win-64
- https://conda.anaconda.org/conda-forge/noarch
- https://repo.anaconda.com/pkgs/main/win-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/win-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/msys2/win-64
- https://repo.anaconda.com/pkgs/msys2/noarch

To search for alternate channels that may provide the conda package you're looking for, navigate to https://anaconda.org and use the search bar at the top of the page.

我还尝试将一个 channel conda-forge 添加到默认 channel 列表中:

conda config --append channels conda-forge 

然后尝试安装

conda install openh264  

但我得到了相同的结果。

pip安装

pip install openh264    

返回

Collecting openh264 ERROR: Could not find a version that satisfies the requirement openh264 (from versions: none) ERROR: No matching distribution found for openh264

初学视音频编码处理,印象中OpenH264被广泛使用。知道会发生什么吗?

最佳答案

我的设置有点不同(不使用 Jupyter notebook),但如果您从 anaconda 提示符 (python) 运行您的脚本,您应该会得到额外的错误信息,如下所示:

"Failed to load OpenH264 library: openh264-1.4.0-win64msvc.dll
Please check environment and/or download library from here: https://github.com/cisco/openh264/releases

[libopenh264 @ 000001747d1b7280] Incorrect library version loaded
Could not open codec 'libopenh264': Unspecified error"

要解决这个问题,我要做的就是去这里: https://github.com/cisco/openh264/releases

然后,下载并解压openh264-1.4.0-win64msvc.dll(7-zip适用于bz2解码),最后将请求的dll放在你的python脚本所在的目录中跑。

对于 openCV videowriter 对象,您需要的 fourCC 代码是“H264”,然后在将视频流写入文件时使用 .mkv 文件扩展名。

希望对你有帮助!

关于python - Anaconda 找不到 openh264 库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57312811/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com