artificialguybr commited on
Commit
232ad15
β€’
1 Parent(s): d20794a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -130,6 +130,7 @@ def process_video(radio, video, target_language, has_closeup_face):
130
  except subprocess.CalledProcessError as e:
131
  if "Face not detected! Ensure the video contains a face in all the frames." in str(e.stderr):
132
  # Fallback to FFmpeg merge
 
133
  cmd = f"ffmpeg -i {video_path} -i {run_uuid}_output_synth.wav -c:v copy -c:a aac -strict experimental -map 0:v:0 -map 1:a:0 {run_uuid}_output_video.mp4"
134
  subprocess.run(cmd, shell=True)
135
  else:
 
130
  except subprocess.CalledProcessError as e:
131
  if "Face not detected! Ensure the video contains a face in all the frames." in str(e.stderr):
132
  # Fallback to FFmpeg merge
133
+ gr.Warning("Wav2lip didn't detect a face. Please try again with the option disabled.")
134
  cmd = f"ffmpeg -i {video_path} -i {run_uuid}_output_synth.wav -c:v copy -c:a aac -strict experimental -map 0:v:0 -map 1:a:0 {run_uuid}_output_video.mp4"
135
  subprocess.run(cmd, shell=True)
136
  else: