>FFmpegLab Start free
FFmpeg Guide

Add text & subtitles to video with FFmpeg

Titles, lower-thirds, and captions from the command line: the drawtext filter for on-screen text, plus burning in or attaching SRT/ASS subtitle files.

There are two jobs people call "adding text": graphic text baked onto the frame (titles, watermarks, lower-thirds) via drawtext, and subtitles from an .srt/.ass file that can be burned in or kept as a toggleable track. This guide covers both.

Key takeaways

A simple title with drawtext

Draw centered white text with a semi-transparent box behind it:

ShareRenders{ } CodeConfig
Generated CodeLogsCustomize
ffmpeg -i in.mp4 -vf "drawtext=\
text='FFmpegLab':fontcolor=white:fontsize=64:\
box=1:[email protected]:boxborderw=12:\
x=(w-text_w)/2:y=h-160" -c:a copy out.mp4

Point fontfile=/path/to/Font.ttf at a specific typeface if the default isn't what you want.

Make text appear only for a few seconds

The enable expression toggles the overlay on a time window — perfect for a lower-third that shows from 2s to 7s:

ShareRenders{ } CodeConfig
Generated CodeLogsCustomize
drawtext=text='Jane Doe — Director':
  fontcolor=white:fontsize=40:
  x=80:y=h-140:
  enable='between(t,2,7)'

Burn in subtitles from an SRT file

Burning ("hardcoding") makes subtitles permanent and guaranteed to display anywhere:

ShareRenders{ } CodeConfig
Generated CodeLogsCustomize
ffmpeg -i in.mp4 -vf "subtitles=captions.srt" -c:a copy out.mp4

Style them with an ASS file or inline force_style: subtitles=captions.srt:force_style='Fontsize=24,PrimaryColour=&Hffffff&'.

Attach soft (toggleable) subtitles

Soft subtitles ride along as a track viewers can turn on/off — no re-encode of the video:

ShareRenders{ } CodeConfig
Generated CodeLogsCustomize
ffmpeg -i in.mp4 -i captions.srt \
  -c copy -c:s mov_text \
  -metadata:s:s:0 language=eng out.mp4

Combine with other effects

Because drawtext is just another filter, it chains inside a filter_complex graph alongside scaling, overlays, and color grading — one render, many effects.

Caption visually, export anywhere

FFmpegLab lets you place titles and captions on a timeline and writes the matching drawtext/subtitles command for you. It runs offline and private, so transcripts and footage stay on your machine. Then compress and convert for delivery.

✦  Fresh from the render queue

Better FFmpeg workflows, delivered.

Get practical commands, new templates, and deep-dive guides for the edits that are usually hardest to get right.

✓  Copy-pasteable commands    ✓  Editor templates    ✓  No noise
One useful email at a time.

Add titles and captions — privately, in your browser.

Free in your browser — nothing to install, nothing uploaded.