SRT vs VTT comes down to where you will play the subtitles: SRT is a common choice for desktop players and editors, while WebVTT works with the HTML5 <track> element. To attach SRT to MP4 or MKV, select the external subtitle explicitly in FFmpeg so an existing embedded track does not take its place.
Key Takeaways
- SRT is widely supported by desktop players; WebVTT is built for the web. Use SRT for desktop players and video files, and WebVTT for the HTML5
<track>element. - Basic cues look similar. WebVTT adds a
WEBVTTheader line and uses a period instead of a comma in timestamps. - WebVTT defines cue positioning and CSS styling; SRT has no standardized equivalent. Some players honour informal SRT tags such as
<i>and<b>. - Soft subtitles are a separate track you can switch off; hardcoded subtitles are burned into the picture. Adding soft subtitles does not itself require video re-encoding; burning in does.
- Select the supplied SRT with
-map 1:s:0. MP4 needs it encoded asmov_textin the example below; MKV keeps it as SRT. Video and audio can be copied when compatible.
SRT vs VTT at a Glance
SubRip (SRT) is a plain-text format without a single formal standard. A typical cue has a number, a time range, the text, and a separating blank line. WebVTT is a W3C text format built for HTML5 video. The WebVTT format is what browsers read through the <track> element.
An SRT cue:
1
00:00:01,000 --> 00:00:03,500
Welcome back.
The same cue in WebVTT:
WEBVTT
00:00:01.000 --> 00:00:03.500
Welcome back.
| SRT | WebVTT | |
|---|---|---|
| File extension | .srt | .vtt |
| Header | None | WEBVTT first line |
| Millisecond separator | Comma | Period |
| Cue numbers | Conventionally numbered | Optional identifiers |
| Positioning and styling | Not defined; a few informal tags | Cue settings and CSS ::cue styling |
| Comments | No | NOTE blocks |
| Best for | Players, video files, editors | Web pages and HTML5 video |
If you only need text at the right time, either works. Choose WebVTT when the subtitles will be loaded by a web page and you want control over placement or appearance. Choose SRT for a commonly supported option across desktop players and editing tools.
FFmpeg can convert a basic SRT file to WebVTT. Do not assume a round trip preserves WebVTT positioning or styling that SRT cannot represent:
ffmpeg -i subs.srt subs.vtt
Soft Subtitles vs Hardcoded Subtitles
The other choice is how the subtitles travel with the video.
Soft subtitles are stored as their own track, either in a sidecar file next to the video or inside the container. A compatible player can turn them on or off, switch between available subtitle languages, and often restyle them. Adding them does not itself require changing the video stream.
Hardcoded subtitles (burned-in) are drawn onto the picture itself. They show everywhere, even in players with no subtitle support, but they cannot be turned off or edited as a separate track, and creating them means re-encoding the video. If you are unsure what that costs, our guide on remux vs re-encode explains how soft tracks avoid video re-encoding.
Rule of thumb: keep soft subtitles for anything you will keep or reuse, and burn in only when the destination cannot display a separate track.
Which Containers Carry Which Subtitle Formats
Subtitle support is a container question as much as a format question; for the general picture, see video containers vs codecs.
- MKV (Matroska) is the flexible choice. Its subtitle documentation lists SRT-style text, WebVTT, and styled formats such as ASS/SSA, so you can usually keep the original subtitle track.
- MP4 is stricter. A common text subtitle format in MP4 is MPEG-4 Timed Text (
tx3g), which FFmpeg encodes asmov_text. The MP4 example below converts SRT to this format. Support for embedded subtitles varies by player, so check your target player even when usingmov_text.
How to Add SRT to MP4 or MKV
Without explicit stream mapping, FFmpeg can choose an existing embedded subtitle instead of subs.srt. The commands below select the external file explicitly, following FFmpeg’s stream-selection documentation.
Add SRT to MP4 as a soft track:
ffmpeg -i video.mp4 -i subs.srt -map 0:v:0 -map "0:a?" -map 1:s:0 -c copy -c:s mov_text -metadata:s:s:0 language=eng out.mp4
Add SRT to MKV, encoding the selected subtitle as SRT:
ffmpeg -i video.mkv -i subs.srt -map 0:v:0 -map "0:a?" -map 1:s:0 -c copy -c:s srt -metadata:s:s:0 language=eng out.mkv
Input indexes start at zero: the video file is input 0; subs.srt is input 1. The maps keep the first video stream (0:v:0), all audio streams if present (0:a?), and the first subtitle stream from the external file (1:s:0). Quotes protect the optional audio marker from shell expansion. Use "0:a:0?" instead if you want only the first audio stream.
Existing embedded subtitles, additional video streams, attachments and data streams are deliberately omitted. These examples do not preserve every track. The eng tag labels the supplied subtitles as English; change it to match their actual language. It does not translate the text.
-map chooses streams; -c copy chooses how to handle them. The later -c:s option overrides copying for the selected subtitle only. Video and audio stay unchanged. For MP4, those copied codecs must already suit the container and target player; changing an arbitrary MKV input to MP4 is not guaranteed to work. Re-encode incompatible streams separately or keep MKV.
Verify the Subtitle Track
Inspect the result before replacing your original file:
ffprobe -v error -show_entries stream=index,codec_type,codec_name:stream_tags=language -of json out.mp4
Use out.mkv for the MKV result. Check for one video stream, the expected audio streams, and one subtitle stream (mov_text for MP4 or subrip for MKV), with the language tag you set. Then open the output in your intended player, select that subtitle track, and check its text and timing. Metadata alone cannot confirm that the captions match the video.
Burn Subtitles into the Picture
To burn subtitles in instead, use the subtitles filter. This re-encodes the video, which generally takes longer than copying it and can reduce quality with a lossy encoder:
ffmpeg -i video.mp4 -vf subtitles=subs.srt -c:a copy out.mp4
Burning in requires an FFmpeg build with subtitle rendering (libass) enabled; if the filter is missing, use a soft track instead.
Common Problems
- Garbled characters: open the SRT using its actual character encoding, check that the text displays correctly, then save it as UTF-8. Misreading the encoding can break accented or non-Latin text.
- Subtitles ignored in a browser: browsers load WebVTT, not SRT, through
<track>; convert first. - Missing or wrong subtitles after conversion: map the supplied file with
-map 1:s:0and, for MP4, encode it asmov_text. A codec option alone does not select that file. - Timing drift: the subtitles may have been timed for a different cut or playback speed of the video. Correct the timing in the subtitle file or a subtitle editor.
Keep Videos and Subtitle Files Together
Whichever format you choose, the subtitle file needs to match the video. If you keep an offline library, store each video with its .srt or .vtt file under the same base name so players that support automatic sidecar loading can find it. VidMost is a desktop app for keeping personal offline copies of videos; you can learn more at vidmost.com.