new video wrier codec
Browse files
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():
|