qqwjq1981 commited on
Commit
7963262
·
verified ·
1 Parent(s): 92c645e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -365,9 +365,9 @@ def create_subtitle_clip_pil(text, start_time, end_time, video_width, video_heig
365
  subtitle_width = int(video_width * 0.8)
366
  aspect_ratio = video_height / video_width
367
  if aspect_ratio > 1.2: # Portrait video
368
- subtitle_font_size = int(video_width // 18)
369
  else: # Landscape video
370
- subtitle_font_size = int(video_height // 20)
371
 
372
  font = ImageFont.truetype(font_path, subtitle_font_size)
373
 
 
365
  subtitle_width = int(video_width * 0.8)
366
  aspect_ratio = video_height / video_width
367
  if aspect_ratio > 1.2: # Portrait video
368
+ subtitle_font_size = int(video_width // 22)
369
  else: # Landscape video
370
+ subtitle_font_size = int(video_height // 24)
371
 
372
  font = ImageFont.truetype(font_path, subtitle_font_size)
373