{"course":{"slug":"video-editing","title":"Editing Video","url":"https://addaly.com/learn/video-editing","level":"beginner","track":"create"},"lesson":{"slug":"subtitle-files-in-practice","title":"Subtitle files, as files","url":"https://addaly.com/learn/video-editing/subtitle-files-in-practice","position":54,"of":77,"minutes":8,"answer":"A subtitle file is plain text with an index, two timecodes and up to two lines, which means find-and-replace fixes a recurring error in one action.","keyIdea":"A subtitle file is plain text with an index, two timecodes and up to two lines, which means find-and-replace fixes a recurring error in one action, and a constant sync offset can be shifted while a growing one means the video's frame rate needs conforming."},"body":{"format":"markdown","text":"## What is actually in an SRT\n\nA subtitle file is plain text. Once you know the format you can write, edit, fix and generate them with any tool, which is far faster than clicking in a video editor.\n\n```text\n1\n00:00:02,150 --> 00:00:05,400\nThe first offset press arrived here\nin 1974.\n\n2\n00:00:05,800 --> 00:00:08,900\nNobody in the district had seen one.\n```\n\nFour parts per cue: an index number, a start and end timecode separated by `-->`, one or two lines of text, and a blank line. Timecodes are `HH:MM:SS,mmm` with a **comma** before the milliseconds.\n\nWebVTT is nearly the same with three differences: the file begins with the line `WEBVTT`, timecodes use a **full stop** before milliseconds, and it supports styling and positioning. VTT is what browsers want; SRT is what most platforms accept.\n\n## Editing them as text\n\nBecause it is plain text, you can fix a whole file with find and replace. A recurring misheard proper noun (every instance of \"Nashik\" transcribed as \"Nasik\") is one replacement rather than forty clicks.\n\nFor timing, **Subtitle Edit** is free, open source, and considerably better at this than any video editor. It shows the waveform, lets you drag cue boundaries against it, checks reading speed and line length, and flags overlaps and gaps. If you work with subtitles regularly, it is the tool to learn.\n\nAegisub is the other free option, more oriented toward styled subtitles.\n\n## Converting and shifting\n\nFFmpeg converts between formats:\n\n```bash\nffmpeg -i captions.srt captions.vtt\n```\n\nAnd shifts the whole file when the sync is off by a constant amount:\n\n```bash\n# delay every cue by 1.2 seconds\nffmpeg -itsoffset 1.2 -i captions.srt -c copy shifted.srt\n```\n\nA constant offset usually means the transcription was made from a file with a different start point. A *growing* offset means the frame-rate problem from the first block, and shifting will not fix it: conform the video first.\n\n## Burning in\n\n```bash\nffmpeg -i film.mp4 -vf \"subtitles=captions.srt:force_style=\\\n'FontName=Arial,FontSize=28,PrimaryColour=&H00FFFFFF,\\\nOutlineColour=&H80000000,BorderStyle=3,Outline=2,MarginV=90'\" \\\n-c:a copy burned.mp4\n```\n\n`BorderStyle=3` gives a box behind the text; `Outline=2` gives a stroke. `MarginV` lifts the text off the bottom, which is what you need for vertical video.\n\nThis re-encodes the video, so do it from your master rather than from an already-compressed delivery file.\n\n## Quality checks that matter\n\nRun through these before shipping any subtitle file:\n\n- **Reading speed** under about 17 characters per second.\n- **Line length** 37 to 42 characters maximum, two lines maximum.\n- **No overlapping cues.** Two cues occupying the same moment renders unpredictably.\n- **Minimum duration** of about one second, maximum of about seven.\n- **Line breaks at grammatical joins**, not mid-phrase.\n- **Cues do not cross a shot change** where avoidable: a subtitle that spans a cut is harder to read.\n- **Speaker changes marked** with a dash at the start of each line where two people speak in one cue.\n- **Non-speech information** in brackets where it matters: `[phone rings]`, `[laughs]`. This is what makes a caption track usable for a deaf viewer rather than merely a transcript.\n\nSubtitle Edit checks the first five automatically.\n\n## Translation\n\nA subtitle file is the unit of translation. Send the SRT, get back an SRT with the same timings and different text.\n\nTwo things to watch. Translated text is frequently longer (German and Hindi renderings of an English line commonly run 20 to 30% longer) so a cue that was at the reading-speed limit in English will exceed it after translation. The translator needs permission to condense, and should be told the character limit.\n\nAnd machine translation of a subtitle file works reasonably for gist and badly for anything where tone, idiom or a technical term matters. It produces fluent, confident, wrong sentences in exactly the way automatic transcription does, and it should be read by somebody who speaks the language before it ships.\n\n## Naming\n\nPlatforms pick up language from the filename. `film.en.srt`, `film.hi.srt`, `film.mr.srt`, using ISO 639-1 codes. Get this right and uploads are automatic; get it wrong and your Hindi track is labelled English.\n\n## Today\n\nOpen an SRT in a text editor and fix one recurring misspelling with find and replace. Then run it through Subtitle Edit's reading-speed check and see how many cues are too fast."},"check":{"question":"A subtitle file is in sync at the start of a film and roughly two seconds late by the end. An editor applies a constant offset to fix it. Why will that not work?","options":[{"text":"The offset should be applied in the opposite direction, since cues that appear late need their timecodes reduced rather than increased.","correct":false,"tempting":"Direction matters, but reversing a constant shift on a progressive error simply moves the point at which the error is zero."},{"text":"SRT timecodes are frame-accurate rather than millisecond-accurate, so a fractional offset is rounded and the accumulated rounding produces the drift being observed.","correct":false,"tempting":"SRT timecodes carry milliseconds and rounding at that scale could not accumulate to two seconds across a film."},{"text":"The subtitle file must be regenerated from the transcript because a shifted file loses its cue indexing, which is what keeps the cues aligned to the audio.","correct":false,"tempting":"Index numbers are cosmetic and most players ignore them entirely, so shifting a file does not break anything structural about it."},{"text":"The error grows over time, so it is a rate mismatch rather than a fixed delay, and a constant shift can only make one point in the film correct.","correct":true}]},"prev":{"slug":"motion-graphics-without-after-effects","title":"Graphics without a subscription","url":"https://addaly.com/learn/video-editing/motion-graphics-without-after-effects"},"next":{"slug":"subtitles-in-indian-languages","title":"When your editor cannot render the script","url":"https://addaly.com/learn/video-editing/subtitles-in-indian-languages"},"authorship":"Founder and series editor: Dr Mustafa Mun. Written by AI models to a written standard. Source and assessment review continues. Academic review invited.","review":{"status":"Draft, open for academic review"},"cite":"Addaly (2026) 'Subtitle files, as files', in Editing Video. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/video-editing/subtitle-files-in-practice (Accessed: 29 November 2026).","licence":{"name":"CC BY-NC-SA 4.0","url":"https://creativecommons.org/licenses/by-nc-sa/4.0/"},"reader":{"schema":1,"title":"Subtitle files, as files","courseTitle":"Editing Video","module":{"index":6,"slug":"text-and-graphics","title":"Text, captions and graphics"},"answer":null,"keyIdea":"A subtitle file is plain text with an index, two timecodes and up to two lines, which means find-and-replace fixes a recurring error in one action, and a constant sync offset can be shifted while a growing one means the video’s frame rate needs conforming.","hero":{"kind":"plate","image":null,"alt":null,"caption":null},"blocks":[{"t":"h2","id":"what-is-actually-in-an-srt","runs":[{"text":"What is actually in an SRT"}]},{"t":"p","runs":[{"text":"A subtitle file is plain text. Once you know the format you can write, edit, fix and generate them with any tool, which is far faster than clicking in a video editor."}]},{"t":"code","lang":"text","label":"Text","text":"1\n00:00:02,150 --> 00:00:05,400\nThe first offset press arrived here\nin 1974.\n\n2\n00:00:05,800 --> 00:00:08,900\nNobody in the district had seen one."},{"t":"p","runs":[{"text":"Four parts per cue: an index number, a start and end timecode separated by "},{"text":"-->","code":true},{"text":", one or two lines of text, and a blank line. Timecodes are "},{"text":"HH:MM:SS,mmm","code":true},{"text":" with a "},{"text":"comma","b":true},{"text":" before the milliseconds."}]},{"t":"p","runs":[{"text":"WebVTT is nearly the same with three differences: the file begins with the line "},{"text":"WEBVTT","code":true},{"text":", timecodes use a "},{"text":"full stop","b":true},{"text":" before milliseconds, and it supports styling and positioning. VTT is what browsers want; SRT is what most platforms accept."}]},{"t":"h2","id":"editing-them-as-text","runs":[{"text":"Editing them as text"}]},{"t":"p","runs":[{"text":"Because it is plain text, you can fix a whole file with find and replace. A recurring misheard proper noun (every instance of “Nashik” transcribed as “Nasik”) is one replacement rather than forty clicks."}]},{"t":"p","runs":[{"text":"For timing, "},{"text":"Subtitle Edit","b":true},{"text":" is free, open source, and considerably better at this than any video editor. It shows the waveform, lets you drag cue boundaries against it, checks reading speed and line length, and flags overlaps and gaps. If you work with subtitles regularly, it is the tool to learn."}]},{"t":"p","runs":[{"text":"Aegisub is the other free option, more oriented toward styled subtitles."}]},{"t":"h2","id":"converting-and-shifting","runs":[{"text":"Converting and shifting"}]},{"t":"p","runs":[{"text":"FFmpeg converts between formats:"}]},{"t":"code","lang":"bash","label":"Bash","text":"ffmpeg -i captions.srt captions.vtt"},{"t":"p","runs":[{"text":"And shifts the whole file when the sync is off by a constant amount:"}]},{"t":"code","lang":"bash","label":"Bash","text":"# delay every cue by 1.2 seconds\nffmpeg -itsoffset 1.2 -i captions.srt -c copy shifted.srt"},{"t":"p","runs":[{"text":"A constant offset usually means the transcription was made from a file with a different start point. A "},{"text":"growing","i":true},{"text":" offset means the frame-rate problem from the first block, and shifting will not fix it: conform the video first."}]},{"t":"h2","id":"burning-in","runs":[{"text":"Burning in"}]},{"t":"code","lang":"bash","label":"Bash","text":"ffmpeg -i film.mp4 -vf \"subtitles=captions.srt:force_style=\\\n'FontName=Arial,FontSize=28,PrimaryColour=&H00FFFFFF,\\\nOutlineColour=&H80000000,BorderStyle=3,Outline=2,MarginV=90'\" \\\n-c:a copy burned.mp4"},{"t":"p","runs":[{"text":"BorderStyle=3","code":true},{"text":" gives a box behind the text; "},{"text":"Outline=2","code":true},{"text":" gives a stroke. "},{"text":"MarginV","code":true},{"text":" lifts the text off the bottom, which is what you need for vertical video."}]},{"t":"p","runs":[{"text":"This re-encodes the video, so do it from your master rather than from an already-compressed delivery file."}]},{"t":"h2","id":"quality-checks-that-matter","runs":[{"text":"Quality checks that matter"}]},{"t":"p","runs":[{"text":"Run through these before shipping any subtitle file:"}]},{"t":"ul","items":[[{"text":"Reading speed","b":true},{"text":" under about 17 characters per second."}],[{"text":"Line length","b":true},{"text":" 37 to 42 characters maximum, two lines maximum."}],[{"text":"No overlapping cues.","b":true},{"text":" Two cues occupying the same moment renders unpredictably."}],[{"text":"Minimum duration","b":true},{"text":" of about one second, maximum of about seven."}],[{"text":"Line breaks at grammatical joins","b":true},{"text":", not mid-phrase."}],[{"text":"Cues do not cross a shot change","b":true},{"text":" where avoidable: a subtitle that spans a cut is harder to read."}],[{"text":"Speaker changes marked","b":true},{"text":" with a dash at the start of each line where two people speak in one cue."}],[{"text":"Non-speech information","b":true},{"text":" in brackets where it matters: "},{"text":"[phone rings]","code":true},{"text":", "},{"text":"[laughs]","code":true},{"text":". This is what makes a caption track usable for a deaf viewer rather than merely a transcript."}]]},{"t":"p","runs":[{"text":"Subtitle Edit checks the first five automatically."}]},{"t":"h2","id":"translation","runs":[{"text":"Translation"}]},{"t":"p","runs":[{"text":"A subtitle file is the unit of translation. Send the SRT, get back an SRT with the same timings and different text."}]},{"t":"p","runs":[{"text":"Two things to watch. Translated text is frequently longer (German and Hindi renderings of an English line commonly run 20 to 30% longer) so a cue that was at the reading-speed limit in English will exceed it after translation. The translator needs permission to condense, and should be told the character limit."}]},{"t":"p","runs":[{"text":"And machine translation of a subtitle file works reasonably for gist and badly for anything where tone, idiom or a technical term matters. It produces fluent, confident, wrong sentences in exactly the way automatic transcription does, and it should be read by somebody who speaks the language before it ships."}]},{"t":"h2","id":"naming","runs":[{"text":"Naming"}]},{"t":"p","runs":[{"text":"Platforms pick up language from the filename. "},{"text":"film.en.srt","code":true},{"text":", "},{"text":"film.hi.srt","code":true},{"text":", "},{"text":"film.mr.srt","code":true},{"text":", using ISO 639-1 codes. Get this right and uploads are automatic; get it wrong and your Hindi track is labelled English."}]},{"t":"h2","id":"today","runs":[{"text":"Today"}]},{"t":"p","runs":[{"text":"Open an SRT in a text editor and fix one recurring misspelling with find and replace. Then run it through Subtitle Edit’s reading-speed check and see how many cues are too fast."}]}],"check":{"question":[{"text":"A subtitle file is in sync at the start of a film and roughly two seconds late by the end. An editor applies a constant offset to fix it. Why will that not work?"}],"options":[{"text":[{"text":"The offset should be applied in the opposite direction, since cues that appear late need their timecodes reduced rather than increased."}],"correct":false,"tempting":[{"text":"Direction matters, but reversing a constant shift on a progressive error simply moves the point at which the error is zero."}]},{"text":[{"text":"SRT timecodes are frame-accurate rather than millisecond-accurate, so a fractional offset is rounded and the accumulated rounding produces the drift being observed."}],"correct":false,"tempting":[{"text":"SRT timecodes carry milliseconds and rounding at that scale could not accumulate to two seconds across a film."}]},{"text":[{"text":"The subtitle file must be regenerated from the transcript because a shifted file loses its cue indexing, which is what keeps the cues aligned to the audio."}],"correct":false,"tempting":[{"text":"Index numbers are cosmetic and most players ignore them entirely, so shifting a file does not break anything structural about it."}]},{"text":[{"text":"The error grows over time, so it is a rate mismatch rather than a fixed delay, and a constant shift can only make one point in the film correct."}],"correct":true,"tempting":null}],"order":[2,3,0,1],"why":null},"prev":{"slug":"motion-graphics-without-after-effects","title":"Graphics without a subscription","minutes":9},"next":{"slug":"subtitles-in-indian-languages","title":"When your editor cannot render the script","minutes":9}}}