Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk4 min

How to Add SRT or ASS Subtitles to a Video with FFmpeg

Use FFmpeg to add SRT or ASS subtitles as a selectable stream or render them permanently into the video. Choose the right command and verify playback, mapping, and styling.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

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:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
ffmpeg -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
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

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.

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

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.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Check build support and handle paths

  • If FFmpeg says the subtitles filter 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.

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

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

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

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

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

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.