cv2.VideoCapture无法读取远程视频文件

时间:2019-11-29 09:01:15

标签: python opencv

我有一个视频文件,需要用OpenCV加载它。

import cv2
cap = cv2.VideoCapture('http://xx.xx.xxx.xxx:8080/xxx/2019-11-29.3gp')
print(vc.isOpened()) # get False

但是,出现以下错误

[tcp @ 000001a19a548b00] Connection to tcp://xx.xx.xxx.xxx:8080 failed: Error number -138 occurred
warning: Error opening file (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:901)
warning: http://xx.xx.xxx.xxx:8080/xxx/2019-11-29.3gp 
(/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:902)

我该如何解决?

0 个答案:

没有答案