Spaces:
Runtime error
Runtime error
roychao19477
commited on
Commit
·
fead3e6
1
Parent(s):
aa84fde
Add limitations
Browse files
app.py
CHANGED
|
@@ -195,6 +195,7 @@ def extract_faces(video_file):
|
|
| 195 |
[cv2.cvtColor(cv2.resize(f, (224, 224)), cv2.COLOR_BGR2RGB) for f in frames],
|
| 196 |
fps=fps
|
| 197 |
)
|
|
|
|
| 198 |
|
| 199 |
# Save audio from original, resampled to 16kHz
|
| 200 |
audio_path = os.path.join(tmpdir, "audio_16k.wav")
|
|
|
|
| 195 |
[cv2.cvtColor(cv2.resize(f, (224, 224)), cv2.COLOR_BGR2RGB) for f in frames],
|
| 196 |
fps=fps
|
| 197 |
)
|
| 198 |
+
clip.write_videofile(output_path, codec="libx264", audio=False, fps=25)
|
| 199 |
|
| 200 |
# Save audio from original, resampled to 16kHz
|
| 201 |
audio_path = os.path.join(tmpdir, "audio_16k.wav")
|