我正在尝试从 Google Cloud Storage url 打开视频并在云功能中处理它 - 该文件是公开可用的。但v.read()
回报None
。
示例视频网址:https ://storage.googleapis.com/dev-brdu1976/268.mov
v = cv2.VideoCapture(request.json['Source_Storage_Path'])
print(v)
frameNum = -1
while (True):
ret_value,frame = v.read()
if ret_value == False or frame is None:
print('Frame is None')
break
frameNum += 1
#do stuff