Skip to content

Burn Styled Subtitles with FFmpeg

Updated: at 05:04 AM

At BetaSeries, we often need to provide our professional clients with videos that have embedded subtitles. This ensures that the subtitles are always visible, regardless of the player or device used. One efficient way to achieve this is by using FFmpeg, a powerful multimedia framework. Here’s a quick guide on how you can burn subtitles onto your videos using a simple FFmpeg command.

The Command

Here is the FFmpeg command we use:

ffmpeg -i input.mp4 -filter_complex "'BackColour=&HA0000000,BorderStyle=4,Fontsize=18'" output.mp4

Breakdown of the Command

Customizing Subtitles

The force_style option allows a wide range of customizations to ensure that subtitles are clear and aesthetically pleasing. Here are a few more options you can experiment with:

Example of Customization

If you want to change the font to Arial and the text color to white, the command would look like this:

ffmpeg -i input.mp4 -filter_complex "'BackColour=&HA0000000,BorderStyle=4,Fontsize=18,FontName=Arial,PrimaryColour=&H00FFFFFF'" output.mp4

For more detailed options and configurations, refer to the FFmpeg documentation.