Python 我可以将opencv VideoWriter的输出保存到AWS S3存储器中吗?
嗨,我正在尝试将Opencv VideoWriter的输出保存到AWS S3 但是这个代码似乎不起作用 您是否有任何更改VaideoWriter输出路径的想法 ''代码Python 我可以将opencv VideoWriter的输出保存到AWS S3存储器中吗?,python,opencv,Python,Opencv,嗨,我正在尝试将Opencv VideoWriter的输出保存到AWS S3 但是这个代码似乎不起作用 您是否有任何更改VaideoWriter输出路径的想法 ''代码 你能添加一个比“不工作”更详细的错误描述吗?谢谢你的评论,这段代码没有任何错误消息。但是,在AWS S3存储中,没有输出文件。似乎VideoWriter找不到路径。你应该把它添加到你的问题中。 fourcc = cv2.VideoWriter_fourcc(*'XVID') AWS_path = 'https:
你能添加一个比“不工作”更详细的错误描述吗?谢谢你的评论,这段代码没有任何错误消息。但是,在AWS S3存储中,没有输出文件。似乎VideoWriter找不到路径。你应该把它添加到你的问题中。
fourcc = cv2.VideoWriter_fourcc(*'XVID')
AWS_path = 'https://bucket.s3.ap-northeast-2.amazonaws.com/media/video/'
filename = 'temporary_video.mp4'
pull_path = AWS_path + filename
out = cv2.VideoWriter(pull_path, fourcc, fps, (int(width), int(height)))
while (cap.isOpened()):
hasframe, frame= cap.read()
if hasframe== True:
# print('떠라')
# if hasframe is None:
datum = op.Datum()
datum.cvInputData = frame
opWrapper.emplaceAndPop([datum])
# Display Image
# print("Body keypoints: \n" + str(datum.poseKeypoints))
# print("Face keypoints: \n" + str(datum.faceKeypoints))
# print("Left hand keypoints: \n" + str(datum.handKeypoints[0]))
# print("Right hand keypoints: \n" + str(datum.handKeypoints[1]))
# cv2.imshow("OpenPose 1.5.0 - Tutorial Python API", datum.cvOutputData)
# cv2.waitKey(1)
out.write(datum.cvOutputData)
else:
break
cap.release()
out.release()