<p>If you're familiar with an ass file, you can position your text by using <code>\pos(150,250)</code>.</p>
<p>Example:</p>
<pre><code>Dialogue: 0,0:01:00.00,0:01:15.00,Default,,0,0,0,,{\fad(500,500)\pos(150,250)}{\i1}{\b1}Your Text
</code></pre>
<p>The first number is from the left, and the second one is from the top of the video.</p>
<p>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.</p>

CC BY-SA 4.0
2021-05-10T13:04:04.057Z
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
CC BY-SA 4.0
2021-05-10T02:40:03.963Z
2021-05-16T19:54:52.097Z
2021-05-16T19:54:52.097Z
1957classic
<p>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,</p>
<pre><code>+---------------------------------+
|           This is               |
|           what I want           |
+---------------------------------+
</code></pre>
<p>However, either specify <code>Alignment</code> in <code>Style</code> definition or using <code>\a</code> switch inside a piece of subtitle results in either entirely left-justified or centered line in the container.</p>
<pre><code>+---------------------------------+
|Entirely left-justified          |
|        Entirely centered        |
+---------------------------------+
</code></pre>
<p>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 <code>ffmpeg</code>.</p>

<ffmpeg><subtitles><recommendation>
ASS subtitle - Different alignment at block and inner level
SuibianP
# ASS subtitle - Different alignment at block and inner level

(Asked by: username_0 on 2021-05-09)

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.

**Tags:** ffmpeg, subtitles, recommendation


---

## 1 answers

### Answer by username_1 on 2021-05-10. Score: 1

If you're familiar with an ass file, you can position your text by using \pos(150,250).
Example:
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.

> **Comments:**
> **username_0**: 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...  

---

