Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -138,7 +138,12 @@ def predict_fn(filepath, start_sec, duration):
|
|
138 |
audio_all = np.hstack((audio_all, audio))
|
139 |
|
140 |
print(f"💾 Writing output video...")
|
141 |
-
|
|
|
|
|
|
|
|
|
|
|
142 |
|
143 |
print(f"✅ Done!")
|
144 |
del video_all
|
|
|
138 |
audio_all = np.hstack((audio_all, audio))
|
139 |
|
140 |
print(f"💾 Writing output video...")
|
141 |
+
|
142 |
+
try:
|
143 |
+
write_video('out.mp4', video_all, fps=fps, audio_array=audio_all, audio_fps=audio_fps, audio_codec='aac')
|
144 |
+
except:
|
145 |
+
print("❌ Error when writing with audio...trying without audio")
|
146 |
+
write_video('out.mp4', video_all, fps=fps)
|
147 |
|
148 |
print(f"✅ Done!")
|
149 |
del video_all
|