qqwjq1981 commited on
Commit
681c11a
·
verified ·
1 Parent(s): ae74fc5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -315,12 +315,11 @@ def process_entry(entry, i, video_width, video_height, add_voiceover, target_lan
315
  txt_clip = TextClip(
316
  txt=entry["translated"],
317
  font="./NotoSansSC-Regular.ttf",
318
- method='caption',
319
  color='yellow',
320
- stroke_color='black', # Border color
321
- stroke_width=2, # Border thickness
322
  fontsize=int(video_height // 20),
323
- size=(int(video_width * 0.8), None)
324
  ).with_start(entry["start"]).with_duration(entry["end"] - entry["start"]).with_position(('bottom')).with_opacity(0.8)
325
 
326
  audio_segment = None
 
315
  txt_clip = TextClip(
316
  txt=entry["translated"],
317
  font="./NotoSansSC-Regular.ttf",
 
318
  color='yellow',
319
+ stroke_color='black',
320
+ stroke_width=2,
321
  fontsize=int(video_height // 20),
322
+ method="label" # <-- Use this instead of "caption"
323
  ).with_start(entry["start"]).with_duration(entry["end"] - entry["start"]).with_position(('bottom')).with_opacity(0.8)
324
 
325
  audio_segment = None