wiki:

HowToBurnSubtitlesIntoVideo


Version 2 (modified by ubitux, 5 years ago) (diff)

indicate --enable-libass and subtitles convert

Using FFmpeg's ass video filter, we can draw text of the subtitles into the movie, like this:

ffmpeg -i video.avi -vf "ass=subtitle.ass" out.avi

Note: you need to have ffmpeg build with --enable-libass (if you are building FFmpeg yourself, look for the libass package, or libass-dev package on debian-like distributions).

If your subtitle is in SubRip?, MicroDVD or any other supported text subtitles, you have to convert it to ASS before using the vf-ass filter:

ffmpeg -i subtitle.srt subtitle.ass