【轉(zhuǎn)載】CMake opencv時(shí)Download: opencv_ffmpeg.dll逛艰、ippicv等失敗的解決方法

最近OpenCV更新到了3.4.1,下載了OpenCV3.4.1的源碼哀墓,想編譯一個(gè)VS2013X64的SDK趁餐,在CMake的時(shí)候一般會(huì)下載一些依賴(ffmpeg.dll,ippicv.zip)等。但是現(xiàn)在宿主機(jī)沒有網(wǎng)絡(luò)篮绰,CMake-Configure就會(huì)失敗···后雷,或者有時(shí)候網(wǎng)絡(luò)很差,下載速度極慢或者干脆一直下載失敗···CMake-Configure也會(huì)失敗吠各。失敗提示如下圖:

這幾個(gè)錯(cuò)誤是類似的就是Download failed臀突。那只能手動(dòng)下載了(沒網(wǎng)絡(luò)的換個(gè)有網(wǎng)的下載,下載一直失敗也直接手動(dòng)下載)贾漏,那么問題來了候学。

去哪里下載?

下載后放哪里纵散?

仔細(xì)看錯(cuò)誤信息梳码,可以打開download log file看看,如提示伍掀,我的在D:/Kits/OpenCV/opencv-source/opencv-3.4.1/build/CMakeDownloadLog.txt掰茶,打開可以看到如下內(nèi)容:

下載獲取opencv_ffmpeg.dll的過程

use_cache "D:/Kits/OpenCV/opencv-source/opencv-3.4.1/.cache"
do_copy "opencv_ffmpeg.dll" "b8120c07962d591e2e9071a1bf566fd0" "https://raw.githubusercontent.com/opencv/opencv_3rdparty/0a0e88972a7ea97708378d0488a65f83e7cc5e69/ffmpeg/opencv_ffmpeg.dll" "D:/Kits/OpenCV/opencv-source/opencv-3.4.1/build/3rdparty/ffmpeg"

missing "D:/Kits/OpenCV/opencv-source/opencv-3.4.1/build/3rdparty/ffmpeg/opencv_ffmpeg.dll"

cmake_download "D:/Kits/OpenCV/opencv-source/opencv-3.4.1/.cache/ffmpeg/b8120c07962d591e2e9071a1bf566fd0-opencv_ffmpeg.dll" "https://raw.githubusercontent.com/opencv/opencv_3rdparty/0a0e88972a7ea97708378d0488a65f83e7cc5e69/ffmpeg/opencv_ffmpeg.dll"

timeout on name lookup is not supported

Trying 151.101.0.133...

TCP_NODELAY set

Connected to raw.githubusercontent.com (151.101.0.133) port 443 (#0)

schannel: SSL/TLS connection with raw.githubusercontent.com port 443 (step 1/3)

schannel: disabled server certificate revocation checks

schannel: sending initial handshake data: sending 199 bytes...

schannel: sent initial handshake data: sent 199 bytes

schannel: SSL/TLS connection with raw.githubusercontent.com port 443 (step 2/3)

schannel: failed to receive handshake, need more data

schannel: SSL/TLS connection with raw.githubusercontent.com port 443 (step 2/3)

schannel: failed to receive handshake, SSL/TLS connection failed

Closing connection 0

schannel: shutting down SSL/TLS connection with raw.githubusercontent.com port 443

Send failure: Connection was reset

schannel: failed to send close msg: Failed sending data to the peer (bytes written: 4294967295)

schannel: clear security context handle

下載獲取opencv_ffmpeg_64.dll的過程

do_copy "opencv_ffmpeg_64.dll" "dc9c50e7b05482acc25d6ce0ac61bf1d" "https://raw.githubusercontent.com/opencv/opencv_3rdparty/0a0e88972a7ea97708378d0488a65f83e7cc5e69/ffmpeg/opencv_ffmpeg_64.dll" "D:/Kits/OpenCV/opencv-source/opencv-3.4.1/build/3rdparty/ffmpeg"

missing "D:/Kits/OpenCV/opencv-source/opencv-3.4.1/build/3rdparty/ffmpeg/opencv_ffmpeg_64.dll"

cmake_download "D:/Kits/OpenCV/opencv-source/opencv-3.4.1/.cache/ffmpeg/dc9c50e7b05482acc25d6ce0ac61bf1d-opencv_ffmpeg_64.dll" "https://raw.githubusercontent.com/opencv/opencv_3rdparty/0a0e88972a7ea97708378d0488a65f83e7cc5e69/ffmpeg/opencv_ffmpeg_64.dll"

timeout on name lookup is not supported

Trying 151.101.0.133...

TCP_NODELAY set

Connected to raw.githubusercontent.com (151.101.0.133) port 443 (#0)

schannel: SSL/TLS connection with raw.githubusercontent.com port 443 (step 1/3)

schannel: disabled server certificate revocation checks

schannel: sending initial handshake data: sending 199 bytes...

schannel: sent initial handshake data: sent 199 bytes

schannel: SSL/TLS connection with raw.githubusercontent.com port 443 (step 2/3)

schannel: failed to receive handshake, need more data

schannel: SSL/TLS connection with raw.githubusercontent.com port 443 (step 2/3)

schannel: failed to receive handshake, SSL/TLS connection failed

Closing connection 0

schannel: shutting down SSL/TLS connection with raw.githubusercontent.com port 443

Send failure: Connection was reset

schannel: failed to send close msg: Failed sending data to the peer (bytes written: 4294967295)

schannel: clear security context handle

下載獲取ffmpeg_version.cmake的過程

do_copy "ffmpeg_version.cmake" "3b90f67f4b429e77d3da36698cef700c" "https://raw.githubusercontent.com/opencv/opencv_3rdparty/0a0e88972a7ea97708378d0488a65f83e7cc5e69/ffmpeg/ffmpeg_version.cmake" "D:/Kits/OpenCV/opencv-source/opencv-3.4.1/build/3rdparty/ffmpeg"

missing "D:/Kits/OpenCV/opencv-source/opencv-3.4.1/build/3rdparty/ffmpeg/ffmpeg_version.cmake"

cmake_download "D:/Kits/OpenCV/opencv-source/opencv-3.4.1/.cache/ffmpeg/3b90f67f4b429e77d3da36698cef700c-ffmpeg_version.cmake" "https://raw.githubusercontent.com/opencv/opencv_3rdparty/0a0e88972a7ea97708378d0488a65f83e7cc5e69/ffmpeg/ffmpeg_version.cmake"

timeout on name lookup is not supported

Trying 151.101.0.133...

TCP_NODELAY set

Connected to raw.githubusercontent.com (151.101.0.133) port 443 (#0)

schannel: SSL/TLS connection with raw.githubusercontent.com port 443 (step 1/3)

schannel: disabled server certificate revocation checks

schannel: sending initial handshake data: sending 199 bytes...

schannel: sent initial handshake data: sent 199 bytes

schannel: SSL/TLS connection with raw.githubusercontent.com port 443 (step 2/3)

schannel: failed to receive handshake, need more data

schannel: SSL/TLS connection with raw.githubusercontent.com port 443 (step 2/3)

schannel: failed to receive handshake, SSL/TLS connection failed

Closing connection 0

schannel: shutting down SSL/TLS connection with raw.githubusercontent.com port 443

Send failure: Connection was reset

schannel: failed to send close msg: Failed sending data to the peer (bytes written: 4294967295)

schannel: clear security context handle

下載獲取ippicv_2017u3_win_intel64_general_20170822.zip的過程

do_unpack "ippicv_2017u3_win_intel64_general_20170822.zip" "0421e642bc7ad741a2236d3ec4190bdd" "https://raw.githubusercontent.com/opencv/opencv_3rdparty/dfe3162c237af211e98b8960018b564bc209261d/ippicv/ippicv_2017u3_win_intel64_general_20170822.zip" "D:/Kits/OpenCV/opencv-source/opencv-3.4.1/build/3rdparty/ippicv"

cmake_download "D:/Kits/OpenCV/opencv-source/opencv-3.4.1/.cache/ippicv/0421e642bc7ad741a2236d3ec4190bdd-ippicv_2017u3_win_intel64_general_20170822.zip" "https://raw.githubusercontent.com/opencv/opencv_3rdparty/dfe3162c237af211e98b8960018b564bc209261d/ippicv/ippicv_2017u3_win_intel64_general_20170822.zip"

timeout on name lookup is not supported

Trying 151.101.0.133...

TCP_NODELAY set

Connected to raw.githubusercontent.com (151.101.0.133) port 443 (#0)

schannel: SSL/TLS connection with raw.githubusercontent.com port 443 (step 1/3)

schannel: disabled server certificate revocation checks

schannel: sending initial handshake data: sending 199 bytes...

schannel: sent initial handshake data: sent 199 bytes

schannel: SSL/TLS connection with raw.githubusercontent.com port 443 (step 2/3)

schannel: failed to receive handshake, need more data

schannel: SSL/TLS connection with raw.githubusercontent.com port 443 (step 2/3)

schannel: failed to receive handshake, SSL/TLS connection failed

Closing connection 0

schannel: shutting down SSL/TLS connection with raw.githubusercontent.com port 443

Send failure: Connection was reset

schannel: failed to send close msg: Failed sending data to the peer (bytes written: 4294967295)

schannel: clear security context handle

CMake后會(huì)發(fā)現(xiàn)opencv-source根目錄下會(huì)出現(xiàn)一個(gè).cache的文件夾,里面有需要下載的內(nèi)容蜜笤,如果下載失敗所有的內(nèi)容都是0KB如下圖:

再看看CMakeDownloadLog.txt的第一句:use_cache "D:/Kits/OpenCV/opencv-source/opencv-3.4.1/.cache"說的就是這個(gè)意思濒蒋。在看看第二句:do_copy "opencv_ffmpeg.dll" "b8120c07962d591e2e9071a1bf566fd0" "https://raw.githubusercontent.com/opencv/opencv_3rdparty/0a0e88972a7ea97708378d0488a65f83e7cc5e69/ffmpeg/opencv_ffmpeg.dll" "D:/Kits/OpenCV/opencv-source/opencv-3.4.1/build/3rdparty/ffmpeg",說的是從https://raw.githubusercontent.com/opencv/opencv_3rdparty/0a0e88972a7ea97708378d0488a65f83e7cc5e69/ffmpeg/opencv_ffmpeg.dll這個(gè)網(wǎng)址下載opencv_ffmpeg.dll到D:/Kits/OpenCV/opencv-source/opencv-3.4.1/build/3rdparty/ffmpeg把兔,其MD值為b8120c07962d591e2e9071a1bf566fd0沪伙,然后拷貝到.cache對應(yīng)的文件夾下(該文件名為MD值+'-'+下載的文件名)瓮顽。那么這個(gè)文件就類似腳本進(jìn)行自動(dòng)化下載,那么我們就知道手動(dòng)要怎么搞了焰坪。

回答-去哪里下載:

https://raw.githubusercontent.com/opencv/opencv_3rdparty/0a0e88972a7ea97708378d0488a65f83e7cc5e69/ffmpeg/opencv_ffmpeg.dll

回答-下載后放哪里:

很顯然下載后放.cache下對應(yīng)的地方趣倾,然后改其名字為MD值+'-'+下載的文件名。比如opencv_ffmpeg.dll這個(gè)文件下載后凡在.cache下的ffmpeg下某饰,然后改名為b8120c07962d591e2e9071a1bf566fd0-opencv_ffmpeg.dll替換原來0KB的那個(gè)文件儒恋。

好了,接下來就是重復(fù)以上步驟黔漂,將opencv_ffmpeg_64.dll诫尽,ffmpeg_version.cmake,ippicv_2017u3_win_intel64_general_20170822.zip到對應(yīng)的網(wǎng)址下載并放到.cache下對應(yīng)的文件夾下然后改名字炬守。最終效果如下圖:





最后再次CMake-Configure就成功通過了牧嫉!

————————————————
版權(quán)聲明:本文為CSDN博主「KayChanGeek」的原創(chuàng)文章,遵循CC 4.0 BY-SA版權(quán)協(xié)議减途,轉(zhuǎn)載請附上原文出處鏈接及本聲明酣藻。
原文鏈接:https://blog.csdn.net/KayChanGEEK/article/details/79919417

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個(gè)濱河市鳍置,隨后出現(xiàn)的幾起案子辽剧,更是在濱河造成了極大的恐慌,老刑警劉巖税产,帶你破解...
    沈念sama閱讀 218,525評(píng)論 6 507
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件怕轿,死亡現(xiàn)場離奇詭異,居然都是意外死亡辟拷,警方通過查閱死者的電腦和手機(jī)撞羽,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,203評(píng)論 3 395
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來衫冻,“玉大人诀紊,你說我怎么就攤上這事∮绶” “怎么了渡紫?”我有些...
    開封第一講書人閱讀 164,862評(píng)論 0 354
  • 文/不壞的土叔 我叫張陵,是天一觀的道長考赛。 經(jīng)常有香客問我惕澎,道長,這世上最難降的妖魔是什么颜骤? 我笑而不...
    開封第一講書人閱讀 58,728評(píng)論 1 294
  • 正文 為了忘掉前任唧喉,我火速辦了婚禮,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘八孝。我一直安慰自己董朝,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,743評(píng)論 6 392
  • 文/花漫 我一把揭開白布干跛。 她就那樣靜靜地躺著子姜,像睡著了一般。 火紅的嫁衣襯著肌膚如雪楼入。 梳的紋絲不亂的頭發(fā)上哥捕,一...
    開封第一講書人閱讀 51,590評(píng)論 1 305
  • 那天,我揣著相機(jī)與錄音嘉熊,去河邊找鬼遥赚。 笑死,一個(gè)胖子當(dāng)著我的面吹牛阐肤,可吹牛的內(nèi)容都是我干的凫佛。 我是一名探鬼主播,決...
    沈念sama閱讀 40,330評(píng)論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼孕惜,長吁一口氣:“原來是場噩夢啊……” “哼愧薛!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起衫画,我...
    開封第一講書人閱讀 39,244評(píng)論 0 276
  • 序言:老撾萬榮一對情侶失蹤厚满,失蹤者是張志新(化名)和其女友劉穎,沒想到半個(gè)月后碧磅,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 45,693評(píng)論 1 314
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡遵馆,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,885評(píng)論 3 336
  • 正文 我和宋清朗相戀三年鲸郊,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片货邓。...
    茶點(diǎn)故事閱讀 40,001評(píng)論 1 348
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡秆撮,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出换况,到底是詐尸還是另有隱情职辨,我是刑警寧澤,帶...
    沈念sama閱讀 35,723評(píng)論 5 346
  • 正文 年R本政府宣布戈二,位于F島的核電站舒裤,受9級(jí)特大地震影響,放射性物質(zhì)發(fā)生泄漏觉吭。R本人自食惡果不足惜腾供,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,343評(píng)論 3 330
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧伴鳖,春花似錦节值、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,919評(píng)論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至须肆,卻和暖如春匿乃,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背休吠。 一陣腳步聲響...
    開封第一講書人閱讀 33,042評(píng)論 1 270
  • 我被黑心中介騙來泰國打工扳埂, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留,地道東北人瘤礁。 一個(gè)月前我還...
    沈念sama閱讀 48,191評(píng)論 3 370
  • 正文 我出身青樓阳懂,卻偏偏與公主長得像,于是被迫代替她去往敵國和親柜思。 傳聞我的和親對象是個(gè)殘疾皇子岩调,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,955評(píng)論 2 355