Open zhaoyanjoin opened 10 months ago
import cv2
import pickle
cap = cv2.VideoCapture('your_video.mp4')
frames = []
while True:
ret, frame = cap.read()
if ret:
frames.append(frame)
else:
break
with open('frames.pkl', 'wb') as f:
pickle.dump(frames, f)
have a try
Originally posted by @huangjun12 in https://github.com/PaddlePaddle/PaddleVideo/issues/571#issuecomment-1411413154