How to Change FFmpeg Burned Subtitle Position

Burning subtitles directly into a video (hardsubbing) is a reliable way to ensure they display correctly on any media player. This guide explains how to change the vertical alignment and position of these subtitles using FFmpeg’s subtitles filter and the force_style parameter. You will learn how to adjust vertical margins and change text alignment for both SRT and ASS subtitle formats.

The force_style Option

When burning subtitles using the subtitles filter, FFmpeg allows you to override the subtitle styles using SubStation Alpha (ASS) style properties. To change the vertical position, you will primarily use the MarginV and Alignment properties.

Method 1: Adjusting the Vertical Margin (Moving Subtitles Up or Down)

To move bottom-aligned subtitles higher up the screen, increase the MarginV value. The default value is usually around 10 to 15 pixels.

Run the following command to lift the subtitles 80 pixels from the bottom of the screen:

ffmpeg -i input.mp4 -vf "subtitles=subs.srt:force_style='MarginV=80'" output.mp4

To move the subtitles even higher, simply increase the MarginV value:

ffmpeg -i input.mp4 -vf "subtitles=subs.srt:force_style='MarginV=150'" output.mp4

Method 2: Changing the Vertical Alignment (Top, Middle, Bottom)

To position subtitles at the top or center of the screen, you must change the Alignment property. The alignment numbers are based on the standard numpad layout:

Burn Subtitles at the Top of the Video

To place the subtitles at the top-center of the video, set Alignment=6. When alignment is set to the top, the MarginV value controls the distance from the top edge of the video frame.

ffmpeg -i input.mp4 -vf "subtitles=subs.srt:force_style='Alignment=6,MarginV=40'" output.mp4

Burn Subtitles in the Exact Middle of the Video

To place the subtitles in the vertical center of the frame, set Alignment=10:

ffmpeg -i input.mp4 -vf "subtitles=subs.srt:force_style='Alignment=10'" output.mp4

Styling SRT vs. ASS Subtitles