Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

With FFmpeg, you can add an SRT or ASS file as a selectable subtitle track, or burn its captions directly into the video picture. Choose a track if viewers should be able to turn captions on and off; burn them in if they must always appear. The commands below show both approaches and account for the differences between MKV and MP4 output.

Choose a subtitle workflow

What you want FFmpeg approach What to know
Viewers can toggle subtitles Add a subtitle stream with explicit -map options. The output container and playback device must support the subtitle format.
Captions always appear in the picture Render them with the subtitles video filter. The video must be encoded again; the captions are no longer a separate selectable track.
Render an ASS file’s styling Use the ass filter or the more general subtitles filter. The ass filter accepts ASS files only. Font availability and sizing can affect the result.

FFmpeg’s current documentation lists SRT (SubRip) and SSA/ASS support for muxing, demuxing, encoding, and decoding. That general support does not guarantee that every container or player can use or display a particular subtitle track. FFmpeg format and codec support

Add subtitles as a selectable track

A subtitle track is a separate output stream. Explicit mapping lets you choose the video’s streams and subtitle input instead of relying on FFmpeg’s automatic stream selection. In these examples, 0 refers to the video file and 1 to the subtitle file; -map 0:a? includes audio if the first input has it.

Add an SRT track to an MKV

ffmpeg -i input.mp4 -i captions.srt 
  -map 0:v -map 0:a? -map 1:0 
  -c copy output.mkv

-c copy requests stream copying: the selected streams are not decoded and re-encoded. It works only when the destination container accepts the source stream formats. MKV is a common option for retaining text subtitle streams, but check the resulting file in the player where you intend to use it. FFmpeg documents stream selection and stream copying in its command-line documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
SRT Creator - Create Subtitles
  • 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

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

For this MP4 example, FFmpeg encodes the SRT subtitle stream as mov_text, a MOV subtitle codec, while copying video and audio. Support varies by container and player, so a successful command alone does not prove the track will display on a particular device. Inspect the output streams and test playback in the intended player. The FFmpeg documentation describes MOV/QuickTime/MP4 support and subtitle formats.

Burn subtitles into the video picture

Burning renders captions over the video frames. Because the frames change, the video must be encoded again; the examples copy audio, provided its format is compatible with the output container.

Burn an SRT file

ffmpeg -i input.mp4 
  -vf "subtitles=captions.srt" 
  -c:a copy output.mp4

The subtitles filter draws captions using libass. The FFmpeg build must include the filter’s required libass, libavcodec, and libavformat support. See the FFmpeg filters documentation.

Burn an ASS file

ffmpeg -i input.mp4 
  -vf "ass=captions.ass" 
  -c:a copy output.mp4

The dedicated ass filter is limited to ASS subtitle files. For SRT files, or when you need the more general filter’s options, use subtitles=captions.ass for an ASS input instead. ASS appearance can depend on the script’s styling, available fonts, and intended video dimensions. FFmpeg documents font-directory and original-size options for its filters; preview the rendered result before delivery. FFmpeg filter options

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Quick Recap

Bestseller No. 1
SRT Creator - Create Subtitles
SRT Creator - Create Subtitles
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
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Handle paths and command-line syntax

  • Quote the filter argument so the shell treats it as one argument. If a path contains punctuation that FFmpeg’s filter syntax interprets specially, escape those characters too; colons may need escaping.
  • For initial troubleshooting, use simple filenames in the current working directory, such as captions.srt.
  • Keep input options before the input they affect and output options before the output they control. FFmpeg options generally apply to the next input or output.

Check the output and troubleshoot problems

  • The subtitle track is missing: Check the -map options and confirm the destination container accepts the subtitle format. Inspect the output streams, then test the file in the target player.
  • The subtitles filter is unavailable: The installed FFmpeg build may not include libass or the required libraries. Check the build’s filter support and use a build configured with the documented dependencies.
  • Burned captions do not appear: Confirm the subtitle filename and filter syntax, and make sure the command uses a build with the required filter. The subtitles filter needs a subtitle filename.
  • ASS styling, font, or size looks wrong: Check whether the script’s fonts are available and whether the filter’s original_size option should match the resolution for which the script was composed. Preview the encoded video.
  • Captions appear but timing or translation is wrong: FFmpeg’s successful processing does not validate subtitle content. Watch the output and compare the captions with the dialogue.

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.