Update app.py
Browse files
app.py
CHANGED
@@ -122,7 +122,7 @@ def add_transcript_to_video(video_path, translated_json, output_path):
|
|
122 |
# Ensure `entry` is a dictionary with keys "start", "end", and "translated"
|
123 |
if isinstance(entry, dict) and "translated" in entry:
|
124 |
txt_clip = TextClip(
|
125 |
-
text=entry["translated"], font=font_path, method='caption', color='
|
126 |
).with_start(entry["start"]).with_duration(entry["end"] - entry["start"]).with_position(('bottom')).with_opacity(0.7)
|
127 |
text_clips.append(txt_clip)
|
128 |
else:
|
|
|
122 |
# Ensure `entry` is a dictionary with keys "start", "end", and "translated"
|
123 |
if isinstance(entry, dict) and "translated" in entry:
|
124 |
txt_clip = TextClip(
|
125 |
+
text=entry["translated"], font=font_path, method='caption', color='yellow', size=video.size
|
126 |
).with_start(entry["start"]).with_duration(entry["end"] - entry["start"]).with_position(('bottom')).with_opacity(0.7)
|
127 |
text_clips.append(txt_clip)
|
128 |
else:
|