How to hardcode subtitle into a video with FFmpeg? by Ciro Santilli 34 Updated 2024-11-19 Created 1970-01-01
On Ubuntu 20.10, just:
ffmpeg -i input.mp4 -vf "subtitles=subtitle.srt" output.mp4
To change font size: stackoverflow.com/questions/21363334/how-to-add-font-size-in-subtitles-in-ffmpeg-video-filter
The default appears to be 24, so just multiply that by whatever seems like a reasonable factor.
ffmpeg -i input.mp4 -vf "subtitles=subtitle.srt:force_style='Fontsize=64'" output.mp4
Note howver that .ass subtitle files can contain style information, which ffmpeg respects. Aegisub can produce and preview such styles, making .ass one of the best options.