Update app.py
Browse files
app.py
CHANGED
|
@@ -351,7 +351,7 @@ def create_subtitle_clips(subtitles, videosize, fontsize, font, color, debug):
|
|
| 351 |
max_height = video_height * 0.2
|
| 352 |
#reshaped_text = arabic_reshaper.reshape(subtitle.text)
|
| 353 |
#bidi_text = get_display(reshaped_text)
|
| 354 |
-
text_clip = TextClip(font, subtitle.text, font_size=fontsize, size=(int(video_width * 0.8), int(video_height * 0.2)) ,text_align="center" ,color=color,
|
| 355 |
subtitle_x_position = 'center'
|
| 356 |
subtitle_y_position = video_height * 0.68
|
| 357 |
text_position = (subtitle_x_position, subtitle_y_position)
|
|
|
|
| 351 |
max_height = video_height * 0.2
|
| 352 |
#reshaped_text = arabic_reshaper.reshape(subtitle.text)
|
| 353 |
#bidi_text = get_display(reshaped_text)
|
| 354 |
+
text_clip = TextClip(font, subtitle.text, font_size=fontsize, size=(int(video_width * 0.8), int(video_height * 0.2)) ,text_align="center" ,color=color, method='caption').with_start(start_time).with_duration(duration)
|
| 355 |
subtitle_x_position = 'center'
|
| 356 |
subtitle_y_position = video_height * 0.68
|
| 357 |
text_position = (subtitle_x_position, subtitle_y_position)
|