tomerk commited on
Commit
7f6879d
·
verified ·
1 Parent(s): 4e3189d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -183,7 +183,8 @@ def process_clip_from_file(prompt, frames, chatbot, fps, video_path, id):
183
  def analyze_stream(prompt, chatbot):
184
  global stop_capture
185
  stop_capture = False
186
- stream = "https://streamapi2.eu.loclx.io/video_feed/101"
 
187
 
188
 
189
  cap = cv2.VideoCapture(stream or WEBCAM)
@@ -193,7 +194,7 @@ def analyze_stream(prompt, chatbot):
193
  while not stop_capture:
194
  ret, frame = cap.read()
195
  if not ret:
196
- break
197
  frames.append(frame)
198
 
199
  # Sample the frames every 5 seconds
 
183
  def analyze_stream(prompt, chatbot):
184
  global stop_capture
185
  stop_capture = False
186
+ # stream = "https://streamapi2.eu.loclx.io/video_feed/101"
187
+ stream = "https://uqnmqpvwlbpmdvutucia.supabase.co/storage/v1/object/public/videos_test/junction.mp4?t=2024-12-26T09%3A58%3A11.931Z"
188
 
189
 
190
  cap = cv2.VideoCapture(stream or WEBCAM)
 
194
  while not stop_capture:
195
  ret, frame = cap.read()
196
  if not ret:
197
+ cap.set(cv2.CAP_PROP_POS_FRAMES, 0)
198
  frames.append(frame)
199
 
200
  # Sample the frames every 5 seconds