0

I want to create a subtitleclip that's position on the video is little right to the center but, the text should be aligned to the center.

So here's my code

    generator = lambda txt, font_size: TextClip(txt, font='Arial-Rounded-MT-Bold', fontsize=font_size, color='white', align="center")
    subs = [(text, start_end, font_size) for (start_end, text, font_size) in words]
    subtitles = SubtitlesClip(subs, generator)
    subtitles = subtitles.set_pos((950, 'center'))

The position works fine, subtitles show as it supposed to, but the aligment of those textclip is to the left even through I have added align = 'center' in the code. The aligment stays centered when I use the position like the following,

subtitles = subtitles.set_pos(('center', 'center'))

But it goes to left aligment when I change the x position value.

How do I fix this?

Bucky
  • 1,116
  • 2
  • 18
  • 34

0 Answers0