RageshAntony commited on
Commit
b7bb869
·
verified ·
1 Parent(s): 48e710c

error open

Browse files
Files changed (1) hide show
  1. app.py +3 -0
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()