win10+VS2017+cuda 安装opencv遇到的错误
opencv版本4.4 opencv_contrib-4.4.0 .cache文件
在用cmake编译opencv时,遇到了“FFMPEG: Download failed: 6;“Couldn’t resolve host name””错误
打开build(cmake设定的文件夹)文件下的CMakeDownloadLog.txt,找到跟ffmpeg相关的三个链接 打开ghproxy.com ,输入下面三个链接,会下载三个文件,分别是fmpeg_version.cmake,opencv_videoio_ffmpeg_64.dll,opencv_videoio_ffmpeg.dll
这是我的链接,可能你的不一样,但ffmpeg_version.cmake,opencv_videoio_ffmpeg_64.dll,opencv_videoio_ffmpeg.dll一定是网址的尾部。
链接https://raw.githubusercontent.com/opencv/opencv_3rdparty/1df9bf0c0c6c2cf225bd3d8e4cf5985198352454/ffmpeg/ffmpeg_version.cmake https://raw.githubusercontent.com/opencv/opencv_3rdparty/1df9bf0c0c6c2cf225bd3d8e4cf5985198352454/ffmpeg/opencv_videoio_ffmpeg_64.dll
https://raw.githubusercontent.com/opencv/opencv_3rdparty/1df9bf0c0c6c2cf225bd3d8e4cf5985198352454/ffmpeg/opencv_videoio_ffmpeg.dll
###第二步 将三个文件放入opencv的**.cache/ffmpeg**文件夹中,打开终端(cmd)
终端指令:cd D:\opencv\sources\.cache\ffmpeg
终端指令:certutil -hashfile ffmpeg_version.cmake MD5
结果:一串字符
终端指令:certutil -hashfile opencv_videoio_ffmpeg_64.dll MD5
结果:一串字符例如 3a46d6356220796e044817ae3a21cc31
终端指令:certutil -hashfile opencv_videoio_ffmpeg.dll MD5
结果:一串字符
把opencv_videoio_ffmpeg_64.dll重命名为3a46d6356220796e044817ae3a21cc31-opencv_videoio_ffmpeg_64.dll 终端得到的字符加上原文件名 其他两个文件同理 参考1 安装opencv参考视频 参考链接 备注:在VS里编译的时候,会有一些warning,而且开始进度条很慢,我大概花了两个小时才成功
|