Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -200,15 +200,15 @@ def analyze_stream(prompt, chatbot):
|
|
200 |
fps = cap.get(cv2.CAP_PROP_FPS)
|
201 |
cap.set(cv2.CAP_PROP_POS_FRAMES, video_start*fps)
|
202 |
|
203 |
-
print("
|
204 |
|
205 |
frames = []
|
206 |
start_time = time.time()
|
207 |
id = 0
|
208 |
while not stop_capture:
|
209 |
ret, frame = cap.read()
|
210 |
-
if not ret:
|
211 |
-
|
212 |
frames.append(frame)
|
213 |
|
214 |
# Sample the frames every 5 seconds
|
|
|
200 |
fps = cap.get(cv2.CAP_PROP_FPS)
|
201 |
cap.set(cv2.CAP_PROP_POS_FRAMES, video_start*fps)
|
202 |
|
203 |
+
print("Video start", video_start, fps, base_start_time)
|
204 |
|
205 |
frames = []
|
206 |
start_time = time.time()
|
207 |
id = 0
|
208 |
while not stop_capture:
|
209 |
ret, frame = cap.read()
|
210 |
+
# if not ret:
|
211 |
+
# cap.set(cv2.CAP_PROP_POS_FRAMES, 0)
|
212 |
frames.append(frame)
|
213 |
|
214 |
# Sample the frames every 5 seconds
|