Spaces:
Sleeping
Sleeping
fix
Browse files
app.py
CHANGED
@@ -42,7 +42,7 @@ def fn(video: gr.Video):
|
|
42 |
if i % config.yield_frame_steps == 0:
|
43 |
with tempfile.NamedTemporaryFile(suffix='.jpeg') as f:
|
44 |
quality = 1
|
45 |
-
_, img_encoded = cv2.imencode('.jpg',
|
46 |
f.write(img_encoded)
|
47 |
yield f.name, None
|
48 |
processed_clip = ImageSequenceClip(processed_frames, clip.fps)
|
|
|
42 |
if i % config.yield_frame_steps == 0:
|
43 |
with tempfile.NamedTemporaryFile(suffix='.jpeg') as f:
|
44 |
quality = 1
|
45 |
+
_, img_encoded = cv2.imencode('.jpg', frame, [int(cv2.IMWRITE_JPEG_QUALITY), quality])
|
46 |
f.write(img_encoded)
|
47 |
yield f.name, None
|
48 |
processed_clip = ImageSequenceClip(processed_frames, clip.fps)
|