Docs: HowToBurnSubtitlesIntoVideo – FFmpeg
subtitles
filter
Draw subtitles on top of input video using the libass library. This filter requires
ffmpeg
to be compiled with--enable-libass
. See the subtitles video filter documentation for more details.If the subtitle is a separate file called
subtitle.srt
, you can use this command:
ffmpeg -i video.avi -vf subtitles=subtitle.srt out.avi
ass
filter
Same as the subtitles filter, except that it doesn’t require libavcodec and libavformat to work. This filter requires
ffmpeg
to be compiled with--enable-libass
. On the other hand, it is limited to ASS (Advanced Substation Alpha) subtitles files. See the ass video filter documentation for more details.
ffmpeg -i video.avi -vf "ass=subtitle.ass" out.avi