Hear2Text

How to Create an SRT File From Scratch or From Audio

An SRT file is four lines of plain text per subtitle. Here is the exact format, the Notepad and TextEdit settings that keep it valid, how to generate one from a recording, and where to load it once it exists.

Published: 13 min read
A laptop showing timeline strips, next to a notepad and pencil
On this page
  1. What an SRT file contains
  2. Write one by hand in a text editor
  3. Generate one from audio or video
  4. Edit it so it reads well
  5. Add the SRT to your video

An SRT file is plain text, so you can create one in Notepad or TextEdit and have a working subtitle file in a few minutes for a short clip. For anything longer than a minute or two, writing the timecodes by hand is the slow part, and the practical route is to transcribe the audio, export the SRT, and fix the lines that need it. Both routes end with the same kind of file, so the format comes first, then the two ways of producing it, then how to make it read well and where to load it.

What an SRT file contains

Here is a complete, valid SRT file for a made-up 15-second clip. Paste it into a text editor, save it as clip.srt, and any player that reads subtitles will accept it:

1
00:00:00,500 --> 00:00:03,200
Before you buy a third microphone,
try moving the first one closer.

2
00:00:03,400 --> 00:00:06,900
Most of what sounds like a bad mic
is a mic that is too far away.

3
00:00:07,100 --> 00:00:09,000
Fifteen centimetres. That's it.

4
00:00:09,800 --> 00:00:14,600
Record the same sentence at arm's length
and at fifteen centimetres, then compare.

Each subtitle, called a cue, is a block of three parts separated from the next block by one empty line. The empty line is not decoration; it is how the player knows one cue has ended. There is no header, no footer and no settings section, which is why the format has survived since the SubRip program that gave it its name.

Sequence number

The first line of every block is a whole number, starting at 1 and going up by one each time. Most players ignore the numbers and go by the timecodes, so a gap in the numbering rarely breaks anything, but a few strict parsers and some upload forms do check them. Keep them sequential. When you insert a cue in the middle of a file, renumber everything after it.

Timecode

The second line is the start time, a space, two hyphens and a greater-than sign, a space, and the end time:

00:00:03,400 --> 00:00:06,900

Each time is hours, minutes, seconds and milliseconds, always two digits for the first three and three for the last, with a comma before the milliseconds. The comma is the detail people get wrong most often, because the closely related WebVTT format uses a full stop in the same position. 00:00:03.400 is a VTT time, and a strict SRT parser will refuse it. The hours are required even when they are zero. The end time must be later than the start time, and the next cue should start after this one ends.

Text

The third part is the subtitle itself, one or two lines, exactly as it should appear on screen. The line breaks you type are the line breaks the viewer sees. There is no official styling in SRT. Many desktop players honour <i>, <b> and <u> tags, and some honour a font colour tag, but YouTube's supported formats page says that only basic SRT is supported and style markup is not recognised, so a file that has to work everywhere has no tags in it.

Write one by hand in a text editor

Writing an SRT by hand makes sense for a short clip, for a handful of corrections to an existing file, or when the "audio" is a silent video that needs on-screen text at known moments. The only tool you need is a plain-text editor, and the only skill is being careful with the save dialog.

For the timing, open the video in a player that shows the current position to the second (VLC does, in the bottom-left corner), play, pause at the start of a sentence, write the time down, pause at the end, write that down. Half-second precision is fine for a first pass; you can tighten the times later once the file loads.

On Windows, Notepad works. Type the cues, then press Ctrl+Shift+S for Save as. In the dialog, set Save as type to All files, type the name with its extension, clip.srt, and check the Encoding dropdown at the bottom reads UTF-8. Microsoft made UTF-8 without a byte order mark the default for new Notepad files in Windows 10 version 1903 and added the encoding to the status bar, as described in the Windows Insider announcement of that build; it is still the default in Windows 11 at the time of writing, but the dropdown is where you confirm it, and an older file you opened keeps whatever encoding it already had. Leaving Save as type on Text Documents silently produces clip.srt.txt, and because Windows hides known extensions by default the file still shows as clip.srt in File Explorer. If a player refuses a file that looks right, turn on View > Show > File name extensions in File Explorer (Microsoft's file extensions page has the steps for Windows 10 as well) and look at the real name.

On a Mac, TextEdit works too, with one setting that matters more than any other: it has to be in plain text mode. A new TextEdit document is rich text, and a rich text document saves as RTF no matter what name you give it. The file starts with {\rtf1\ansi and a block of font definitions, and no player will read it as subtitles. Before you type anything, choose Format > Make Plain Text (Shift-Command-T); the window loses its ruler, which is how you know it worked. To make this permanent, open TextEdit > Settings, and on the New Document pane set Format to Plain text. Apple's TextEdit settings page lists the same pane's Options, where two other boxes should be off: Smart quotes and Smart dashes. Smart dashes turn the two hyphens in --> into a single dash, which breaks every timecode line in the file; the option Smart quotes and dashes in rich text documents only also keeps them out of plain text if you prefer to leave them on elsewhere. On the Open and Save pane, set Plain Text File Encoding for saving to Unicode (UTF-8). When you save, name the file clip.srt; if TextEdit asks whether to use .txt or .srt, choose .srt.

Whichever editor you use, these are the faults that make a player reject the file or show nothing, roughly in order of how often they turn up:

  1. A full stop instead of a comma in the milliseconds. The file is valid VTT and invalid SRT.
  2. A missing empty line between two cues, so the player reads the next number and timecode as subtitle text. The opposite mistake, an empty line inside a cue's text, ends the cue early and leaves the rest as an orphan block with no timecode.
  3. A damaged arrow: a single hyphen, a smart dash, a missing space on either side, or ->.
  4. Hours left out (0:01:05,000 or 01:05,000). Some players guess; strict ones refuse.
  5. An end time earlier than its start time, or a cue that starts before the previous one ends. Players differ on what they show, and none of them show what you meant.
  6. The wrong kind of file: RTF from TextEdit, a .docx saved from Word, or clip.srt.txt from Notepad.
  7. A non-UTF-8 encoding. The file loads, but every accented letter and every curly apostrophe becomes two or three wrong characters. Re-save as UTF-8 and the text comes back.
  8. A byte order mark at the start of the file. Most players skip it; a few strict parsers treat 1 as a sequence number they cannot read. Notepad's plain UTF-8 option writes none, and YouTube asks for plain UTF-8.

A quick test that catches most of these: drop the SRT onto a playing video in VLC. If the subtitles do not appear within a second, the file has a formatting fault, and the first cue is usually where it is.

Generate one from audio or video

Past a couple of minutes of speech, writing the timecodes is where hand-made SRTs stall, so the better route is to transcribe the recording and let the timing come from the speech. Upload the video or audio file (up to 500 MB and 18 hours) or paste a public video link into the subtitle generator on Hear2Text, and you get a transcript in which every segment carries its own start and end time, in the spoken language, detected automatically across 100 languages. Read it through in the browser, fix the names and the words it misheard, and then export. The transcript editor is where the fixing is cheapest: the SRT you download afterwards contains the corrected text.

The SRT export is on the paid plans ($9.99 a month or $89.99 a year), alongside VTT, Word and PDF; the free plan exports TXT, which is useful for a transcript and useless as a subtitle file. The exported SRT is exactly the format above, one cue per transcript segment:

1
00:00:00,000 --> 00:00:03,480
Before you buy a third microphone, try moving the first one closer.

2
00:00:03,480 --> 00:00:06,910
Most of what sounds like a bad mic is a mic that is too far away.

Before you load this file anywhere, notice that the cues follow the speech, not subtitle conventions: a segment is as long as the sentence the speaker said, so a long sentence becomes a long cue on one line, and the next section covers how to split it. The export panel also has a speaker toggle. Left off, which is the right choice for most subtitle files, cues contain the words only. Turned on, each cue starts with the speaker's name, Speaker 2: until you rename it, which is what you want for a panel discussion where the viewer cannot otherwise tell who is talking, and not what you want on a single-presenter video. The toggle, like naming the speakers, is part of the paid plans; the labels themselves are on every plan.

The exported file is in the language that was spoken. Translation on the paid plans produces a translated transcript in the browser, but at the time of writing the SRT and VTT downloads from the web app are in the original language only, so a translated subtitle track is not something you can download yet.

What goes wrong at this stage is what goes wrong in any transcription: music under the voice lowers accuracy and music on its own is not transcribed reliably, two people talking over each other come back tangled, and product names and personal names are the lines most likely to need a correction. None of that is a reason to write the file by hand; it is a reason to read the transcript before exporting.

If the subtitles come back out of sync with the video, the file is almost never wrong by a random amount; it is wrong by a constant offset, and the cause is usually that the video you are watching is not the file you transcribed. A trimmed intro, a new cold open, or a cut in the middle shifts everything after it. Transcribe the final cut, not the rough one. If the final cut only gained or lost something at the start, measure the offset by eye in VLC (Tools > Track Synchronization has a subtitle delay field) and then apply the same number to every timecode; a subtitle editor does that in one command, and even a text editor's find-and-replace can handle a whole-second shift in the minutes column if the file is short. A sync that drifts gradually, correct at the start and seconds off by the end, means the video's speed was changed after transcription, and the fix is to transcribe the final file again.

Edit it so it reads well

An SRT that loads is not yet an SRT that is pleasant to read. The limits below come from Netflix's English Timed Text Style Guide and its general requirements, which are public and more demanding than anything a YouTube video needs. Treat them as the ceiling.

Line length

Netflix allows 42 characters per line and at most two lines per cue. Beyond that the text either shrinks or overflows the edge of the picture, depending on the player. The exported cue above, 67 characters on one line, needs a break, and the break should fall where the sentence naturally pauses rather than at the character count. Compare:

Before you buy a third microphone, try
moving the first one closer.

with

Before you buy a third microphone,
try moving the first one closer.

Both fit. The second is easier to read because each line is a complete phrase and the eye does not have to carry "try" across the break. Keep articles with their nouns, keep a name on one line, and put the longer line on the bottom when the two are unequal; players draw subtitles bottom-up, so a heavy top line looks top-heavy.

Reading speed

The guide's limit is 20 characters per second for adult programmes and 17 for children's. Count the characters in a cue, including spaces, and divide by its duration. The 67-character cue above, shown for 3.48 seconds, runs at about 19 per second, inside the limit but close. A cue that fails the test needs more time or fewer characters. More time comes from stretching the end time into any pause that follows, within the guide's maximum of 7 seconds per cue. Fewer characters comes from splitting, which is a text-editor job:

2
00:00:03,480 --> 00:00:05,200
Most of what sounds like a bad mic

3
00:00:05,200 --> 00:00:06,910
is a mic that is too far away.

Renumber every cue after the split. The guide's floor is five-sixths of a second per cue, so do not split a short sentence into fragments that flash by. A cue that reads as a single breath, a sentence or a clause, timed to when it is said, is what you are aiming for, and most speech lands there with a handful of splits per minute.

Add the SRT to your video

An SRT does nothing on its own. It has to be loaded by a player, uploaded beside the video on a platform, or rendered into the picture.

In a media player, the easiest method is the file name. Put holiday.srt in the same folder as holiday.mp4 and VLC loads it on its own; the VideoLAN wiki's subtitles page describes exactly this pairing. For a file with a different name, use Subtitle > Add Subtitle File while the video plays, or drag the SRT onto the window. The subtitles stay separate from the video; sending the MP4 to someone else means sending the SRT with it.

On YouTube, the file is uploaded in YouTube Studio: choose Subtitles in the left menu, open the video, click Add language and pick the language, then under the subtitles column click Add, choose Upload file, select With timing (your SRT has timecodes), pick the file and Save. The steps are on YouTube's add subtitles page. Viewers then switch the captions on and off themselves, and YouTube indexes the text. Vimeo and most video hosts have an equivalent upload in the video's settings. TikTok, at the time of writing, has no way to upload a caption file, so captions there are generated inside the app, as the TikTok transcript post explains.

In a video editor, an SRT imports as a caption track and lands on the timeline with its timing intact, which is far faster than typing titles one by one. The import lives under the editor's usual import or media menu, and the subtitles become editable text on the timeline that you can restyle to match the video.

Burning the subtitles into the picture is the right choice when the player cannot show a separate track, which is the case for Instagram, TikTok and most messaging apps. It is also the one thing in this process that re-encodes the video, and it cannot be undone afterwards. HandBrake does it from the Subtitles tab, where you import the SRT as a track, set its character code (UTF-8), and mark it to be burned in; HandBrake's subtitles documentation warns that the wrong character code can leave the output without a subtitle track at all. On a command line, FFmpeg's own guide to burning subtitles gives the whole job as one command, ffmpeg -i video.mp4 -vf subtitles=video.srt output.mp4, provided your FFmpeg build includes libass. Hear2Text does not burn subtitles in, and it does not take an SRT as input, so the order is always transcript, SRT, then whichever of these you need.

Keep reading

A phone showing a vertical video with a caption bar, next to a small gimbal

Guides

How to Get a Transcript of an Instagram Reel

Instagram writes captions on Reels but keeps them inside the player. How to get the spoken words out as text with timestamps, which links work, and what to do about Stories, private accounts and music.

· 11 min read

A phone on a small tripod showing a vertical video with a caption bar, next to a ring light

Guides

How to Get a Transcript of a TikTok Video

TikTok shows captions on many videos but never lets you copy them. Here is what the app gives you, which posts have no speech to transcribe, and how the link route works.

· 11 min read