Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenCV 3.0.0 "configure" fails, ffmpeg not downloaded

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?

like image 399
S.H Avatar asked Oct 04 '15 11:10

S.H


3 Answers

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.

like image 170
jamalin Avatar answered Oct 27 '22 13:10

jamalin


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

like image 38
Richard_Mohana Avatar answered Oct 27 '22 13:10

Richard_Mohana


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

like image 33
Richard Mohana Avatar answered Oct 27 '22 13:10

Richard Mohana