cmake 编译opencv 缺失opencv_ffmpeg.dll 、 opencv_ffmpeg_64.dll、ffmpeg_version.cmake等问题

  • Post author:
  • Post category:其他


使用cmake 编译opencv编译opencv时会出现这样的警告提示

在这里插入图片描述

打开记录日记后时发现是因为网络连接问题缺失部分文件

在这里插入图片描述

#use_cache “C:/Users/rgzn/Desktop/opencv/opencv-3.4.3/.cache”

#do_copy “opencv_ffmpeg.dll” “fa5a2a4e2f37defcb95bde8ed145c2b3” “https://raw.githubusercontent.com/opencv/opencv_3rdparty/8041bd6f5ad37045c258904ba3030bb3442e3911/ffmpeg/opencv_ffmpeg.dll” “C:/Users/rgzn/Desktop/opencv/vs_opencv/3rdparty/ffmpeg”

#missing “C:/Users/rgzn/Desktop/opencv/vs_opencv/3rdparty/ffmpeg/opencv_ffmpeg.dll”

#check_md5 “C:/Users/rgzn/Desktop/opencv/opencv-3.4.3/.cache/ffmpeg/fa5a2a4e2f37defcb95bde8ed145c2b3-opencv_ffmpeg.dll”

#mismatch_md5 “C:/Users/rgzn/Desktop/opencv/opencv-3.4.3/.cache/ffmpeg/fa5a2a4e2f37defcb95bde8ed145c2b3-opencv_ffmpeg.dll” “d41d8cd98f00b204e9800998ecf8427e”

#delete “C:/Users/rgzn/Desktop/opencv/opencv-3.4.3/.cache/ffmpeg/fa5a2a4e2f37defcb95bde8ed145c2b3-opencv_ffmpeg.dll”


#cmake_download “C:/Users/rgzn/Desktop/opencv/opencv-3.4.3/.cache/ffmpeg/fa5a2a4e2f37defcb95bde8ed145c2b3-opencv_ffmpeg.dll” “https://raw.githubusercontent.com/opencv/opencv_3rdparty/8041bd6f5ad37045c258904ba3030bb3442e3911/ffmpeg/opencv_ffmpeg.dll”


timeout on name lookup is not supported

Trying 0.0.0.0…

TCP_NODELAY set

connect to 0.0.0.0 port 443 failed: Address not available

Failed to connect to raw.githubusercontent.com port 443: Address not available

Closing connection 0

以其中一例解释 看日志我们可以得到信息

  1. 缺失的部分是

    opencv_ffmpeg.dll
  2. 在哪里下载?


    https://raw.githubusercontent.com/opencv/opencv_3rdparty/8041bd6f5ad37045c258904ba3030bb3442e3911/ffmpeg/opencv_ffmpeg.dll
  3. 怎么命名? md5-文件名

    fa5a2a4e2f37defcb95bde8ed145c2b3-opencv_ffmpeg.dll
  4. 放在哪里?

    “C:/Users/rgzn/Desktop/opencv/opencv-3.4.3/.cache/ffmpeg/fa5a2a4e2f37defcb95bde8ed145c2b3-opencv_ffmpeg.dll”

后面的都一样一个一个下载就ok


访问不了raw.githubusercontent.com 怎么办


https://site.ip138.com/raw.Githubusercontent.com/

输入raw.githubusercontent.com

查询IP地址

修改hosts

打开C:\Windows\System32\drivers\etc\hosts,(需要使用管理员权限打开)

添加以下内容保存即可 (

IP地址查询后相应修改,可以ping不同IP的延时 选择最佳IP地址

# GitHub Start
52.74.223.119 github.com
192.30.253.119 gist.github.com
54.169.195.247 api.github.com
185.199.111.153 assets-cdn.github.com
==151.101.76.133 raw.githubusercontent.com==
151.101.108.133 user-images.githubusercontent.com
151.101.76.133 gist.githubusercontent.com
151.101.76.133 cloud.githubusercontent.com
151.101.76.133 camo.githubusercontent.com
151.101.76.133 avatars0.githubusercontent.com
151.101.76.133 avatars1.githubusercontent.com
151.101.76.133 avatars2.githubusercontent.com
151.101.76.133 avatars3.githubusercontent.com
151.101.76.133 avatars4.githubusercontent.com
151.101.76.133 avatars5.githubusercontent.com
151.101.76.133 avatars6.githubusercontent.com
151.101.76.133 avatars7.githubusercontent.com
151.101.76.133 avatars8.githubusercontent.com
# GitHub End

下载后放置原位重新编译即可!

缺失的文件也可以直接在这里下载


https://download.csdn.net/download/jjookkeerr95/12810003



版权声明:本文为jjookkeerr95原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。