FFmpeg can add subtitles in two different ways: as a separate track viewers can turn on or off, or as captions rendered permanently into the video picture. Use explicit stream mapping for a selectable track; use the subtitles or ass video filter to burn captions in. The right command depends on your output container and whether you want to preserve the captions’ original styling.
Choose a subtitle workflow
| What you want | FFmpeg approach | What to know |
|---|---|---|
| Viewers can toggle captions | Add the subtitle as a separate stream with -map |
The container and playback device must support the subtitle format. |
| Captions are always visible | Render them into the video with the subtitles filter |
The video must be re-encoded; captions become part of the picture. |
| Render an ASS file with its styling | Use ass or subtitles |
The dedicated ass filter accepts ASS files only. Preview font and sizing behavior. |
FFmpeg’s current documentation lists both SubRip (SRT) and SSA/ASS as supported subtitle formats, but that does not guarantee that every container or player supports every subtitle stream. See the FFmpeg formats and protocol support documentation.
| # | Preview | Product | Price | |
|---|---|---|---|---|
| 1 |
|
SRT Creator - Create Subtitles | Buy on Amazon |
As an Amazon Associate I earn from qualifying purchases.
Add subtitles as a selectable track
Add an SRT track to an MKV
To include the video, any audio stream, and an external SRT file in an MKV:
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesffmpeg -i input.mp4 -i captions.srt
-map 0:v -map 0:a? -map 1:0
-c copy output.mkv
-map 0:v selects video streams from the first input, -map 0:a? selects its audio streams if present, and -map 1:0 selects the subtitle stream from the second input. The question mark makes the audio mapping optional, so the command can still run if the video has no audio. -c copy requests stream copying without decoding and re-encoding; it works only when the destination container accepts the input stream formats. MKV is a common choice for text subtitle streams, but check the resulting file in the player you plan to use.
#1 Best Overall
- Create subtitles with ease
- User-friendly interface
- Create SRT Files
- User can choose whether to log in using email or log in as a guest
Add an SRT track to an MP4
For MP4, encode the subtitle stream as mov_text while stream-copying video and audio:
ffmpeg -i input.mp4 -i captions.srt
-map 0:v -map 0:a? -map 1:0
-c:v copy -c:a copy -c:s mov_text output.mp4
-c:v copy and -c:a copy leave the selected video and audio streams un-re-encoded; -c:s mov_text converts the subtitle stream to the MOV text subtitle codec used here for MP4 output. Container support does not guarantee display on every device, so inspect the output and test it in the intended player. FFmpeg’s format support documentation lists capabilities for MOV/QuickTime/MP4.
Understand stream mapping
Explicit -map options control which input streams appear in the output, rather than leaving stream selection to FFmpeg’s automatic choice. FFmpeg documents -map for selecting input streams and -c copy for stream copying in its command-line documentation. If your source has multiple video, audio, or subtitle streams, specify the particular streams you want instead of assuming the first matching streams are the right ones.
Burn subtitles into the video picture
Burn an SRT file
Use the general subtitles filter for SRT:
ffmpeg -i input.mp4
-vf "subtitles=captions.srt"
-c:a copy output.mp4
The filter draws captions over the input video, so FFmpeg must render and re-encode the video frames. The command copies audio when the source audio codec is compatible with the output container. The FFmpeg subtitles filter documentation describes drawing subtitles on input video using libass and lists the required libass, libavcodec, and libavformat support.
Burn an ASS file
For an ASS file, the dedicated ass filter is an option:
ffmpeg -i input.mp4
-vf "ass=captions.ass"
-c:a copy output.mp4
FFmpeg’s documentation notes that the ass filter is limited to ASS subtitle files. For an SRT input, or when you need options available through the more general filter, use subtitles=captions.ass instead. See the FFmpeg ass filter documentation.
Check build support and handle paths
- If FFmpeg says the
subtitlesfilter is unavailable, the installed build may lack libass or the required supporting libraries. The filter’s documentation lists its dependencies. - Quote the filter argument for your shell if a filename contains spaces or punctuation. Characters such as colons may also need escaping for FFmpeg’s filter syntax; using simple filenames is a useful first troubleshooting step. See FFmpeg’s quoting and escaping guidance.
- FFmpeg options apply to the next input or output, so keep input options before the input they affect and output options before the output they control. The command-line documentation explains option order.
Verify the output
For a selectable track, confirm that the output contains the intended video, audio, and subtitle streams, then open it in the target player and test that captions can be selected. If the track is missing, check the -map values and whether the chosen container supports the stream format.
For burned-in captions, play through the video and check that captions appear, remain readable, and line up with the dialogue. If no captions appear, check the subtitle path and filter syntax, and confirm that the installed build has the required filter. ASS appearance can depend on the script’s styling, available fonts, and the video size and aspect ratio. FFmpeg documents fontsdir and original_size options for the subtitle filters; consult the filter options and preview the render. A successful conversion alone does not verify subtitle timing or translation.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




