pythonmoviepy

Aligning to "North west" in moviepy


I am new to moviepy and have a question. I want to know whether it is possible to align TextClip both to north and west

title_clip = TextClip(title, font="Inter-SemiBold", size=(1002, 88), method="caption", align="west", fontsize=36,
color='rgba(0,0,0,0.75)')
title_clip = title_clip.set_position((226, 803)).set_duration(duration)


detail_clip = TextClip(news, font="Rubik-Regular", size=(1469, 474), method="caption", align=("north", "west"), fontsize=34,
color='rgb(103,103,103)')
detail_clip = detail_clip.set_position((226, 226)).set_duration(duration)

Solution

  • Reading the moviepy and imagemagick docs, it looks like the way to specify that would be to set align="NorthWest".

    Example:

    detail_clip = TextClip(news, font="Rubik-Regular", size=(1469, 474), method="caption", align="NorthWest, fontsize=34,
    

    I think this would work because align is passed to ImageMagick, and the documentation on the -gravity option in ImageMagick says that NorthWest can be used.