artificialguybr commited on
Commit
bc5e2dc
·
1 Parent(s): 740becd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -82,6 +82,7 @@ def process_video(Video, target_language):
82
  print("Arquivo de legenda não foi criado.")
83
 
84
  output_video = "output_video.mp4"
 
85
  print("Validating FFmpeg command for subtitle embedding...")
86
  try:
87
  result = run(["ffmpeg", "-i", Video, "-vf", f"subtitles={temp_translated_file.name}", output_video])
@@ -91,6 +92,7 @@ def process_video(Video, target_language):
91
  print(f"FFmpeg failed with return code {result.returncode}.")
92
  except Exception as e:
93
  print(f"Exception occurred: {e}")
 
94
 
95
  os.unlink(temp_transcript_file.name)
96
  os.unlink(temp_translated_file.name)
 
82
  print("Arquivo de legenda não foi criado.")
83
 
84
  output_video = "output_video.mp4"
85
+ # Debugging: Validate FFmpeg command for subtitle embedding
86
  print("Validating FFmpeg command for subtitle embedding...")
87
  try:
88
  result = run(["ffmpeg", "-i", Video, "-vf", f"subtitles={temp_translated_file.name}", output_video])
 
92
  print(f"FFmpeg failed with return code {result.returncode}.")
93
  except Exception as e:
94
  print(f"Exception occurred: {e}")
95
+
96
 
97
  os.unlink(temp_transcript_file.name)
98
  os.unlink(temp_translated_file.name)