ariG23498 HF Staff commited on
Commit
caa691a
·
1 Parent(s): dff4c96

new video wrier codec

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -186,7 +186,8 @@ def process_video(
186
  num_frames = int(cap.get(cv2.CAP_PROP_FRAME_COUNT))
187
 
188
  # Use H.264 codec for browser compatibility
189
- fourcc = cv2.VideoWriter_fourcc(*"H264")
 
190
  temp_file = tempfile.NamedTemporaryFile(suffix=".mp4", delete=False)
191
  writer = cv2.VideoWriter(temp_file.name, fourcc, fps, (width, height))
192
  if not writer.isOpened():
 
186
  num_frames = int(cap.get(cv2.CAP_PROP_FRAME_COUNT))
187
 
188
  # Use H.264 codec for browser compatibility
189
+ # fourcc = cv2.VideoWriter_fourcc(*"H264")
190
+ fourcc = cv2.VideoWriter_fourcc(*"mp4v")
191
  temp_file = tempfile.NamedTemporaryFile(suffix=".mp4", delete=False)
192
  writer = cv2.VideoWriter(temp_file.name, fourcc, fps, (width, height))
193
  if not writer.isOpened():