[問題] opencv Couldn't read movie file
環境如下:
IDE:Pycharm
python 2.7
ffmpeg v.2.5
OS: OSX 10.10.1
import numpy as np
import cv2
cap = cv2.VideoCapture('/Users/../test.mkv') <=這邊是用絕對路徑
while(cap.isOpened()):
ret, frame = cap.read()
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
cv2.imshow('frame',gray)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
cap.release()
cv2.destroyAllWindows()
========================================================
但是run下去結果是WARNING: Couldn't read movie file
請問要怎麼改善Orz
嘗試了很多種GOOGLE到的方法還是不行
感謝
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 125.224.183.199
※ 文章網址: http://www.ptt.cc/bbs/Python/M.1418574512.A.25E.html
→
12/16 22:20, , 1F
12/16 22:20, 1F
→
12/22 16:32, , 2F
12/22 16:32, 2F
→
12/22 16:32, , 3F
12/22 16:32, 3F
Python 近期熱門文章
PTT數位生活區 即時熱門文章