qqwjq1981 commited on
Commit
a7604c5
·
verified ·
1 Parent(s): bdcd45c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -102,7 +102,7 @@ def add_transcript_to_video(video_path, translated_json, output_path):
102
  # Ensure `entry` is a dictionary with keys "start", "end", and "translated"
103
  if isinstance(entry, dict) and "translated" in entry:
104
  txt_clip = TextClip(
105
- text=entry["translated"], method='caption', color='white', bg_color='black', size=video.size
106
  ).set_start(entry["start"]).set_duration(entry["end"] - entry["start"]).set_position(('bottom')).set_opacity(0.7)
107
  text_clips.append(txt_clip)
108
  else:
 
102
  # Ensure `entry` is a dictionary with keys "start", "end", and "translated"
103
  if isinstance(entry, dict) and "translated" in entry:
104
  txt_clip = TextClip(
105
+ text=entry["translated"], font='Arial', method='caption', color='white', bg_color='black', size=video.size
106
  ).set_start(entry["start"]).set_duration(entry["end"] - entry["start"]).set_position(('bottom')).set_opacity(0.7)
107
  text_clips.append(txt_clip)
108
  else: