SPACERUNNER99 commited on
Commit
b67e600
·
verified ·
1 Parent(s): 69a4e18

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -186,9 +186,9 @@ def create_subtitle_clips(subtitles, videosize, fontsize, font, color, debug):
186
  video_width, video_height = videosize
187
  #reshaped_text = arabic_reshaper.reshape(subtitle.text)
188
  #bidi_text = get_display(reshaped_text)
189
- text_clip = TextClip(font, subtitle.text, font_size=fontsize, size=(int(video_width*3/4), None), margin=(5,5) ,text_align="center" ,color=color, bg_color='black', method='label').with_start(start_time).with_duration(duration)
190
  subtitle_x_position = 'center'
191
- subtitle_y_position = video_height * 4 / 5
192
  text_position = (subtitle_x_position, subtitle_y_position)
193
  subtitle_clips.append(text_clip.with_position(text_position))
194
  return subtitle_clips
 
186
  video_width, video_height = videosize
187
  #reshaped_text = arabic_reshaper.reshape(subtitle.text)
188
  #bidi_text = get_display(reshaped_text)
189
+ text_clip = TextClip(font, subtitle.text, font_size=fontsize, size=(int(video_width * 0.8, None) ,text_align="center" ,color=color, bg_color='black', dmethod='caption').with_start(start_time).with_duration(duration)
190
  subtitle_x_position = 'center'
191
+ subtitle_y_position = video_height * 0.8
192
  text_position = (subtitle_x_position, subtitle_y_position)
193
  subtitle_clips.append(text_clip.with_position(text_position))
194
  return subtitle_clips