> subtitles
Subtitle work in ffmpeg splits into two paths: burning captions permanently into the pixels (hardsubs) versus muxing a selectable track the player can toggle (softsubs). This category covers both, plus extracting embedded subtitle streams out of a container and converting between text formats like SRT and ASS.
// subtitles
4 commands$ ffmpeg -i input.mp4 -vf "subtitles=subtitles.srt" output.mp4$ ffmpeg -i input.mp4 -i subtitles.srt -c copy -c:s mov_text output.mp4$ ffmpeg -i input.mp4 -map 0:s:0 subtitles.srt$ ffmpeg -i subtitles.srt subtitles.ass// faq
How do I burn subtitles into a video with ffmpeg?
Use the subtitles video filter: ffmpeg -i input.mp4 -vf "subtitles=subs.srt" output.mp4. This renders the text into the frames permanently, so the video is always re-encoded and the captions can't be turned off in the player.
What's the difference between burned-in and selectable (soft) subtitles?
Burned-in subs (via -vf subtitles) are baked into the video pixels and force a re-encode, while soft subs are muxed as a separate stream (-c:s mov_text for MP4, or copied into MKV) that the viewer can toggle on or off. Soft subs let you keep the original video stream with -c copy, so they're faster and lossless.
Why won't ffmpeg extract subtitles to an SRT file?
SRT is a text format, so ffmpeg can only write it from text-based source subtitles. If the embedded track is bitmap-based (DVD VobSub or Blu-ray PGS), the extraction fails because ffmpeg can only convert text-to-text or bitmap-to-bitmap, not image glyphs to text without OCR.