Spaces:
Running
on
Zero
Running
on
Zero
error open
Browse files
app.py
CHANGED
@@ -179,6 +179,9 @@ def extract_frames(video_path):
|
|
179 |
frames = []
|
180 |
print(f"video path {video_path}")
|
181 |
cap = cv2.VideoCapture(video_path)
|
|
|
|
|
|
|
182 |
|
183 |
while True:
|
184 |
ret, frame = cap.read()
|
|
|
179 |
frames = []
|
180 |
print(f"video path {video_path}")
|
181 |
cap = cv2.VideoCapture(video_path)
|
182 |
+
if not cap.isOpened():
|
183 |
+
print("Error: Could not open video file.")
|
184 |
+
return []
|
185 |
|
186 |
while True:
|
187 |
ret, frame = cap.read()
|