import numpy as np import cv2 from utils import readb64, img2base64, binary2video, extract_frames with open("sample_files\messi_deepfake.mp4", 'rb') as f: video_data = f.read() print(type(video_data)) nparr = np.frombuffer(video_data, np.uint8) frames = [] video_stream = cv2.imdecode(nparr, cv2.IMREAD_UNCHANGED) if len(video_stream.shape) < 3: video_stream = [video_stream]