Qt构建OpenCV3.1CMake报错Failed to download opencv_ffmpeg.dll

解决方案: 转自http://stackoverflow.com/questions/32932915/opencv-3-0-0-configure-fails-ffmpeg-not-downloaded/33095689#33095689

1、将opencv\build\bin\下的opencv_ffmpeg310.dll改名为opencv_ffmpeg.dll;opencv_ffmpeg310_64.dll改名为opencv_ffmpeg_64.dll拷贝到opencv\sources\3rdparty\ffmpeg\

2、将opencv\sources\3rdparty\ffmpeg\ffmpeg.cmake文件内容用记事本修改为

set(HAVE_FFMPEG 1)
set(HAVE_FFMPEG_CODEC 1)
set(HAVE_FFMPEG_FORMAT 1)
set(HAVE_FFMPEG_UTIL 1)
set(HAVE_FFMPEG_SWSCALE 1)
set(HAVE_FFMPEG_RESAMPLE 0)
set(HAVE_GENTOO_FFMPEG 1)

set(ALIASOF_libavcodec_VERSION 56.41.100)
set(ALIASOF_libavformat_VERSION 56.36.101)
set(ALIASOF_libavutil_VERSION 54.27.100)
set(ALIASOF_libswscale_VERSION 3.1.101)
set(ALIASOF_libavresample_VERSION 2.1.0)
3、在Qt  Creator中点击执行Cmake

你可能感兴趣的:(OpenCV)