Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,10 +13,11 @@ if video_file is not None:
|
|
| 13 |
cap = cv2.VideoCapture(video_path)
|
| 14 |
|
| 15 |
# Get the frames per second (fps) of the video
|
| 16 |
-
fps = cap.get(cv2.CAP_PROP_FPS)
|
|
|
|
| 17 |
|
| 18 |
# Calculate the interval to capture one frame per second
|
| 19 |
-
interval = int(round(1
|
| 20 |
|
| 21 |
# Initialize a counter for frames
|
| 22 |
frame_count = 0
|
|
|
|
| 13 |
cap = cv2.VideoCapture(video_path)
|
| 14 |
|
| 15 |
# Get the frames per second (fps) of the video
|
| 16 |
+
fps = (cap.get(cv2.CAP_PROP_FPS))
|
| 17 |
+
st.write(fps)
|
| 18 |
|
| 19 |
# Calculate the interval to capture one frame per second
|
| 20 |
+
interval = int(round(fps/1))
|
| 21 |
|
| 22 |
# Initialize a counter for frames
|
| 23 |
frame_count = 0
|