Format code (#441)

This commit is contained in:
Liangsheng Yin
2024-05-14 22:40:46 +08:00
committed by GitHub
parent 664287b2a7
commit 690d162d97
17 changed files with 68 additions and 50 deletions

View File

@@ -138,6 +138,7 @@ def encode_frame(frame):
def encode_video_base64(video_path, num_frames=16):
import cv2
cap = cv2.VideoCapture(video_path)
if not cap.isOpened():
raise IOError(f"Could not open video file:{video_path}")