Cmake compile opencv report error qtcore_ DIR QtOpenglDIR QtGui_ Dir ffmpeg loading failed

CMAKE compiler OpenCV source code error
Cmake compile opencv source code error: 1.
error prompt QtGui_DIR QtOpengl_DIR QtCore_DIR errors, such as said not set QT environment error
2. F ‘fmpeg download failed (timeout)
Qtgui_dir Qtopengl_dir Qtcore_gui, etc
Solution: in opencv source code file CMakeLists. TXT file to add the following code (can be added in the file header)
according to your own error set the appropriate path, such as:
set (Qt5Core_DIR “C:/Qt/Qt5.9.6/5.9.6/mingw53_32/lib/cmake/Qt5Core”)
set (Qt5Gui_DIR “C:/Qt/Qt5.9.6/5.9.6/mingw53_32/lib/cmake/Qt5Gui”)
set (Qt5Widgets_DIR “C:/Qt/Qt5.9.6/5.9.6/mingw53_32/lib/cmake/Qt5Widgets”)
set (Qt5Test_DIR “C:/Qt/Qt5.9.6/5.9.6/mingw53_32/lib/cmake/Qt5Test”)

FFMPEG library file download failed (timeout)

/ffmpeg> Copy the three files to Source/. Cache /ffmpeg, but change the file name to the md5-file name of the file.
>
>
# do_copy “opencv_ffmpeg_64. DLL” “2 cc08fc4fef8199fe80e0f126684834f” “https://raw.githubusercontent.com/opencv/opencv_3rdparty/8041bd6f5ad37045c258904ba3030bb3442e3911/ffmpeg/opencv_ffmpeg_64.dll” “D:/workspace/opencv_contrib_3. 4.3/opencv – rule 3.4.3 – Build/3 rdparty/ffmpeg”
# missing “D:/workspace/opencv_contrib_3. 4.3/opencv – rule 3.4.3 – Build/3 rdparty/ffmpeg/opencv_ffmpeg_64. DLL”
# check_md5 “D:/workspace/opencv_contrib_3. 4.3/opencv. – rule 3.4.3 – Source/cache/ffmpeg/2 cc08fc4fef8199fe80e0f126684834f – opencv_ffmpeg_64. DLL”
The meaning of the above said from the download link https://raw.githubusercontent.com/opencv/opencv_3rdparty/8041bd6f5ad37045c258904ba3030bb3442e3911/ffmpeg/opencv_ffmpeg_64.dll copy dynamic library to D:/workspace/opencv_contrib_3. 4.3/opencv – rule 3.4.3 – Build/3 rd Party /ffmpeg folder, and give the MD5 value

opencv_ffmpeg_64.dll
opencv_ffmpeg_64.dll https://raw.githubusercontent.com/opencv/opencv_3rdparty/8041bd6f5ad37045c258904ba3030bb3442e3911/ffmpeg/opencv_ffmpeg_64.dll
opencv_ffmpeg_64. DLL md5 value is 2 cc08fc4fef8199fe80e0f126684834f
Download to Build/3 rdparty/ffmpeg/folder
after the download is
the Build/3 rdparty/ffmpeg/opencv_ffmpeg_64. DLL
manually copy files to the Source folder and name: Md5 + name of the file, like this
the Source/cache/ffmpeg/2 cc08fc4fef8199fe80e0f126684834f – opencv_ffmpeg_64. DLL.
the other opencv_ffmpeg DLL and ffmpeg_version cmake method is the same.
note that carriage return after cmake file copy link to the browser, then right click on the select save as TXT file, to Build/3 rdparty/ffmpeg/folder, and then to the folder rename file suffix. TXT, thus cmake file with respect to OK, and then copied to the Source/cache/ffmpeg/file, rename, front ➕ md5.
click Configure again with respect to OK
supported

Read More: