10

I get the following error when trying to configure OpenCV using CMAKE on windows:

CMake Warning at cmake/OpenCVUtils.cmake:865 (message):
Download: Local copy of opencv_ffmpeg.dll has invalid MD5 hash:
d41d8cd98f00b204e9800998ecf8427e (expected:
89c783eee1c47bfc733f08334ec2e31c)

Call Stack (most recent call first):
3rdparty/ffmpeg/ffmpeg.cmake:10 (ocv_download)
cmake/OpenCVFindLibsVideo.cmake:193 (include)
CMakeLists.txt:527 (include)


Downloading opencv_ffmpeg.dll...
CMake Error at cmake/OpenCVUtils.cmake:888 (file):
file DOWNLOAD MD5 mismatch

for file: [C:/research/opencv300/sources/3rdparty/ffmpeg/downloads/89c783eee1c47bfc733f08334ec2e31c/opencv_ffmpeg.dll]
expected MD5 sum: [89c783eee1c47bfc733f08334ec2e31c]
actual MD5 sum: [d41d8cd98f00b204e9800998ecf8427e]

Call Stack (most recent call first):
3rdparty/ffmpeg/ffmpeg.cmake:10 (ocv_download)
cmake/OpenCVFindLibsVideo.cmake:193 (include)
CMakeLists.txt:527 (include)


CMake Error at cmake/OpenCVUtils.cmake:892 (message):
Failed to download opencv_ffmpeg.dll.  Status=1;"unsupported protocol"
Call Stack (most recent call first):
3rdparty/ffmpeg/ffmpeg.cmake:10 (ocv_download)
cmake/OpenCVFindLibsVideo.cmake:193 (include)
CMakeLists.txt:527 (include)


Configuring incomplete, errors occurred!

I tried downloading opencv_ffmpeg.dll manually, but the configure process didn't work.

Can you help me, how to fix that?

S.H
  • 875
  • 2
  • 11
  • 27

5 Answers5

3

Had the same problem recently with opencv 3.1.0. Resolved the situation by using corresponding dll(s) from the ./build/bin directory of an opencv extract. As for ffmpeg_version.cmake, grabbed it from the link given. Replace the files under ./sources/3rd party/ffmpeg then reconfigure cmake.

jamalin
  • 76
  • 3
2

You have to copy the files into your source folder, where you want to built from.

In my case it is then

C:\opencv_source\3rdparty\ffmpeg\downloads\35fe6ccdda6d7a04e9056b0d73b98e76

C:\opencv_source\3rdparty\ffmpeg\downloads\89c783eee1c47bfc733f08334ec2e31c

C:\opencv_source\3rdparty\ffmpeg\downloads\8606f947a780071f8fcce8cbf39ceef5

An they include these files in the same order

opencv_ffmpeg_64.dll
opencv_ffmpeg.dll
ffmpeg_version.cmake

Have a look into the file ffmpeg_cmake what CMake expects as md5-hash as folder label

ΦXocę 웃 Пepeúpa ツ
  • 47,427
  • 17
  • 69
  • 97
1

Iam running into the same issue. In my opinion it is an issue through our company network and proxyserver.

So i tried to download the file manually from home and put it on my USB flash drive. Please look into your OpenCV source path. There you can find an structure like ...

"...\3rdparty\ffmpeg\downloads\HASH\opencv_ffmpeg.dll"

CMake tries to download the file, but can't pass through proxy, so the file is 0 Byte and md5 checksum fails.

In "...\OpenCV_SOURCE_FOLDER\3rdparty\ffmpeg" you can find a makefile named "ffmpeg.cmake" with the URL CMake tries to download from. In my case I downloaded the file from the following URL:

https://raw.githubusercontent.com/Itseez/opencv_3rdparty/89c783eee1c47bfc733f08334ec2e31c/ffmpeg/opencv_ffmpeg.dll

Your checksum parameter could be different (depending probably on your OpenCV version)! It is possible that you have to do the same for "opencv_ffmpeg_64.dll" and "ffmpeg_version.cmake".

Best regards

  • 1
    Richard Mohana, how did you proceed? just copy the file to the destination folder? In my case, cmake then tries to download it again and its again 0Bytes... – S.H Oct 18 '15 at 09:37
  • Opening the link that you have provided only gives me an empty browser page with the only content "NOT FOUND" – S.H Nov 01 '15 at 18:24
0

I had the same problem; when I switched to Ubuntu, I didn't have this problem anymore. Maybe you can change your OS?

black
  • 1,151
  • 3
  • 18
  • 46
0

The checksum error happens because it is an issue in the software package and the files might not be there in the directory but openCV will download it in the process, just make sure that you are connected to internet without using VPN or proxy as it will get blocked by the firewall.

Abhishek Rathore
  • 1,016
  • 1
  • 11
  • 13