I am trying to achieve an ASS subtitle that aligns the rectangular bounding block at the horizontal center of the window, while maintaining left-justification inside that block for multiline subtitle entries. Below is an ASCII art illustration,

|           This is               |
|           what I want           |

However, either specify Alignment in Style definition or using \a switch inside a piece of subtitle results in either entirely left-justified or centered line in the container.

|Entirely left-justified          |
|        Entirely centered        |

My apologies if I missed something obvious in the specification. I am also open to other text-based subtitle format that is capable of this and supported by ffmpeg.

1 Answer 1


If you're familiar with an ass file, you can position your text by using \pos(150,250).


Dialogue: 0,0:01:00.00,0:01:15.00,Default,,0,0,0,,{\fad(500,500)\pos(150,250)}{\i1}{\b1}Your Text

The first number is from the left, and the second one is from the top of the video.

An easier solution, rather than write each line yourself, is to download Aegisub to make the ass files for you. Using Aegisub, you can drag the text lines to the position you need.

  • I know that it is possible to individually position the entries. Nonetheless, I want to know if there is a generalised way to do this :) Doing it one by one would be tiring (imagine positioning thousands of entries for a movie) and error-prone (hard to be exact, need to redo in case resolution changes). I can write a script to automate it but it just does not feel like the right way...
    – SuibianP
    May 10, 2021 at 13:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.