I am adding subtitles to a video using:
ffmpeg -i "imput.mp4" -lavfi "subtitles=subtitles.srt:force_style='OutlineColour=&H100000000,BorderStyle=3,Outline=1,Shadow=0,Fontsize=18'" -crf 1 -c:a copy "output.mp4"
Which results in:
I am repositioning this using Alignment :
ffmpeg -i "imput.mp4" -lavfi "subtitles=subtitles.srt:force_style='Alignment=9,OutlineColour=&H100000000,BorderStyle=3,Outline=1,Shadow=0,Fontsize=18'" -crf 1 -c:a copy "output.mp4"
But according to the Line-Alignment ASS Tags docs, there are only 9 positions. 1: Bottom left, 2: Bottom center, 3: Bottom right, 5: Top left, 6: Top center, 7: Top right, 9: Middle left, 10: Middle center, 11: Middle right
Is there a way to tweak this positioning?
I want the subs to be left-aligned, but lower down. Like this:
Turns out the trick for doing this is to add Alignment=0. Then you can use MarginV and MarginL freely:
ffmpeg -i "imput.mp4" -lavfi "subtitles=subtitles.srt:force_style='Alignment=0,OutlineColour=&H100000000,BorderStyle=3,Outline=1,Shadow=0,Fontsize=18,MarginL=5,MarginV=25'" -crf 1 -c:a copy "output.mp4"
I have tested every alignment and made documentation with my design skills.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With