Spaces:
Runtime error
Runtime error
feat: Print ffmpeg command to console before execution
Browse files
app.py
CHANGED
@@ -226,7 +226,9 @@ def update(files, prompt, top_p=1, temperature=1):
|
|
226 |
|
227 |
output_file_name = f"output_{uuid.uuid4()}.mp4"
|
228 |
output_file_path = str((Path(temp_dir) / output_file_name).resolve())
|
229 |
-
|
|
|
|
|
230 |
generated_command = f"### Generated Command\n```bash\nffmpeg {' '.join(args[1:])} -y output.mp4\n```"
|
231 |
return output_file_path, gr.update(value=generated_command)
|
232 |
except Exception as e:
|
|
|
226 |
|
227 |
output_file_name = f"output_{uuid.uuid4()}.mp4"
|
228 |
output_file_path = str((Path(temp_dir) / output_file_name).resolve())
|
229 |
+
final_command = args + ["-y", output_file_path]
|
230 |
+
print(f"\n=== EXECUTING FFMPEG COMMAND ===\nffmpeg {' '.join(final_command[1:])}\n")
|
231 |
+
subprocess.run(final_command, cwd=temp_dir)
|
232 |
generated_command = f"### Generated Command\n```bash\nffmpeg {' '.join(args[1:])} -y output.mp4\n```"
|
233 |
return output_file_path, gr.update(value=generated_command)
|
234 |
except Exception as e:
|