Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -349,9 +349,10 @@ def create_subtitle_clips(subtitles, videosize, fontsize, font, color, debug):
|
|
349 |
max_height = video_height * 0.2
|
350 |
#reshaped_text = arabic_reshaper.reshape(subtitle.text)
|
351 |
#bidi_text = get_display(reshaped_text)
|
352 |
-
text_clip = TextClip(font, subtitle.text, font_size=fontsize, size=(int(video_width * 0.68), int(video_height * 0.2)) ,text_align="center" ,
|
|
|
353 |
color_clip = ColorClip(size=(int(max_width), int(max_height)),
|
354 |
-
color=(0, 255, 255))
|
355 |
color_clip = color_clip.with_opacity(.6)
|
356 |
subtitle_x_position = 'center'
|
357 |
subtitle_y_position = video_height * 0.74
|
|
|
349 |
max_height = video_height * 0.2
|
350 |
#reshaped_text = arabic_reshaper.reshape(subtitle.text)
|
351 |
#bidi_text = get_display(reshaped_text)
|
352 |
+
text_clip = TextClip(font, subtitle.text, font_size=fontsize, size=(int(video_width * 0.68), int(video_height * 0.2)) ,text_align="center" ,
|
353 |
+
color=color, bg_color='black', method='caption').with_start(start_time).with_duration(duration)
|
354 |
color_clip = ColorClip(size=(int(max_width), int(max_height)),
|
355 |
+
color=(0, 255, 255)).with_start(start_time).with_duration(duration)
|
356 |
color_clip = color_clip.with_opacity(.6)
|
357 |
subtitle_x_position = 'center'
|
358 |
subtitle_y_position = video_height * 0.74
|