victor HF staff commited on
Commit
bcdd585
1 Parent(s): 3c641c9

feat: Print ffmpeg command to console before execution

Browse files
Files changed (1) hide show
  1. app.py +3 -1
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
- subprocess.run(args + ["-y", output_file_path], cwd=temp_dir)
 
 
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: