How to Add an SRT File to a Video
An SRT file is the most common caption file there is: plain text, a list of numbered cues, each with a start time, an end time and its words. If you are working out how to add an SRT file to a video, there are two quite different answers, depending on whether you want viewers to be able to turn the captions off. Here is what is inside the file, both routes, and the timing and encoding problems that catch people out.
This is a reference post rather than news. Nothing changed this week; the question just comes up constantly.
What is inside an SRT file
The Library of Congress describes each SRT cue as four parts:
- A sequence number for its position in the file.
- A timing line, the start and end separated by an arrow, with hours, minutes, seconds and milliseconds, and a comma before the milliseconds, as in
00:00:01,000. - One or more lines of text.
- A blank line to end the cue.
That is the whole format, and it is less tidy than it looks. The Library of Congress calls SRT "a very simple text format, but not well standardized". It has no encoding standard, and SubRip, the program it comes from, saves in Windows-1252 by default. Its styling is limited to a few HTML-like tags for bold, italic, underline and colour, and whether they show depends on the player.
WebVTT is its close relative, and the W3C specification credits the SRT format as its basis. A WebVTT file has to begin with the word WEBVTT, and its timestamps use a full stop before the milliseconds instead of a comma. Most tools that read one read the other.
Two ways to add one to a video
The choice is the same one covered in burned-in captions vs closed captions: a file that travels next to the video, or words drawn into the picture.
- Upload it next to the video. The platform's player shows the captions, and viewers can switch them off. YouTube's page on supported caption files lists SubRip (.srt) and WebVTT (.vtt) among many formats, recommends SRT for beginners, and says the file must be plain UTF-8 and that style markup is not recognised. To add one, YouTube's help page says to open Subtitles in YouTube Studio, choose the video, add a language, choose Upload file, pick With timing, and select the file. Some ad formats ask for a file too; LinkedIn video specs covers one.
- Burn it into the picture. The words become part of every frame, so they show wherever the video plays, including players that take no caption file at all, and nobody can switch them off. This is the job for a video editor.
If you have a YouTube video with captions already, YouTube's page on editing captions explains how to download a caption file from Studio, under Options and Download subtitles.
Adding an SRT file in flshy
flshy is a free editor that runs in a desktop or laptop browser, best in Chrome or Edge, and the captions it makes are burned in. The steps below were checked against the editor's own source as well as our captions guide.
- Put the clip on the timeline. Make a free account and drag the video in. flshy places each cue at the time written in the file, counted from the start of the timeline. So if the SRT was timed to the original recording, the clip needs to start at the very beginning of the timeline, untrimmed.
- Open the import. Click the video clip, open the AI tab in the inspector, expand Captions for this clip, and press Import SRT / VTT as Text. Choose a .srt or .vtt file.
- Read the message. On success it says each cue is now an editable text clip on the Captions track. If some cues could not be read, they are skipped and the message says how many. If nothing in the file could be read, the import fails and says so.
- Check how the cues were split. By default, flshy splits a long cue into shorter ones of at most five words, dividing its time by word count, so a two-line subtitle arrives as several short captions.
- Restyle them. Imported cues arrive with plain styling rather than a caption preset, so give them a look once they are in. The Properties tab in the Captions panel handles size and placement.
- Fix anything wrong. Every cue is an ordinary text clip, so you can retype it, retime it or delete it. How to edit auto-generated captions covers the correction pass.
- Export. H.264 MP4 up to 4K, with the captions burned in and no watermark.
When it goes wrong
Most problems with an imported SRT are one of four things.
- Accents and other scripts come out garbled. The file is probably not UTF-8. Open it in a plain text editor, save it as UTF-8, and import it again.
- Every caption is early or late by the same amount. The file was timed to a version that started at a different point, so check the clip sits at the very start of the timeline and has not been trimmed at the head.
- Captions drift further out of sync as the video goes on. The file was timed to a different cut, or the video was cut after the import. Use a file that matches this exact edit, or caption the finished cut afresh.
- Captions sit under the platform's buttons. Move them up in the Properties tab, especially on a vertical export. The safe zone for captions has the margins.
What flshy does not do with SRT files
flshy brings SRT and VTT files in, but it does not save one out. The captions leave the editor burned into the exported video, and there is no caption file to upload next to it.
So if you need both, decide early which file is the source of truth. An SRT you uploaded to YouTube for the original video will not match a shorter cut you make in flshy, because the timings point to moments that have moved. For a new cut, the simplest route is to caption it in flshy, where transcription runs on your own device, and use the platform's own caption tools if you also want a version viewers can switch off.
If you have no file at all, you do not need one. flshy can generate captions from the audio, which the captions guide walks through.
Sources
- SubRip Subtitle format (SRT), Library of Congress,
- WebVTT: The Web Video Text Tracks Format, W3C,
- Supported subtitle and closed caption files, YouTube Help, accessed
- Add subtitles & captions, YouTube Help, accessed
- Edit or remove captions, YouTube Help, accessed
Questions people ask
What is an SRT file?
A plain text caption file. Each cue has a sequence number, a timing line with start and end times written as hours, minutes, seconds and milliseconds, one or more lines of text, and a blank line to finish.
How do I add an SRT file to a YouTube video?
In YouTube Studio, open Subtitles, choose the video, add a language, choose Upload file, pick With timing, then select the file and save. YouTube says the file must be plain UTF-8.
Can I burn an SRT file into a video for free?
Yes. In flshy, a free browser editor, select the clip, open the AI tab, expand Captions for this clip and press Import SRT / VTT as Text. Every cue becomes an editable text clip, and the captions are burned in when you export an H.264 MP4 with no watermark.
What is the difference between SRT and VTT?
WebVTT is based on SRT. A WebVTT file has to begin with the word WEBVTT, and its timestamps use a full stop before the milliseconds where SRT uses a comma. flshy imports both.
Why are my imported captions out of sync?
Usually because the file was timed to a different version of the video. If every caption is off by the same amount, the clip does not start where the file expects. If they drift further as the video goes on, the video has been cut since the file was made.
Can flshy export an SRT file?
No. flshy imports SRT and VTT files, but its captions leave the editor burned into the video. For a caption file viewers can switch off, use the platform's own caption tools.