cv.cm

Video · Subtitles

How do you add subtitles to a video, translate them and make them bilingual?

9 min read

Short answer

Make a subtitle file first: transcribe the audio, correct the text, time each line, split long lines and export SRT or VTT. Then either upload the file as a separate track the viewer can switch on and off, or burn it into the picture. To translate, keep every timing and replace only the text, then recheck line length; for bilingual subtitles, put both languages in each cue or publish one file per language.

Open Subtitle converter

Soft subtitles or burned-in subtitles

There are two ways for subtitles to reach the viewer, and the choice decides how you export.

Soft subtitles (closed, a track)Burned-in subtitles (open captions)
What it isA separate SRT or VTT file played alongside the videoText drawn into the video pixels
Viewer controlCan switch them on or off and pick a languageAlways visible, cannot be turned off
Several languagesOne file per language on the same videoOne exported video per language
Fixing a typoEdit the text file and upload it againFix the file and re-export the whole video
LookDecided by the player and the viewer's settingsYour font, size, colour and position, the same everywhere

Use soft subtitles wherever the platform accepts a subtitle file, such as YouTube or your own website. Burn subtitles in when the platform has no subtitle upload, or when the text is part of the design. Many creators do both from the same SRT file.

The workflow: from audio to a finished subtitle file

  1. Transcribe. Run the audio through speech recognition to get text with rough timings, exported as SRT or VTT. For a script you wrote yourself, the script is the text and only the timings are missing; cv.cm's script timer gives a first set of timings at a preset speaking pace and exports them as an SRT draft to correct in step 3.
  2. Correct. Read the whole transcript against the audio. Names, numbers, dialect words and words spoken over music are where recognition goes wrong.
  3. Time. Make each subtitle appear when its line starts and leave when it ends. Netflix's timing guidelines ask for the in-time on the first frame of audio and suggest the out-time about half a second after the audio ends, when the next subtitle allows it. If every subtitle is early or late by the same amount, shift the whole file with cv.cm's subtitle converter instead of editing each timing line.
  4. Split lines. Break long subtitles into two lines, or into two subtitles, at natural points: after punctuation, before a conjunction or preposition. Keep a name, or an article and its noun, on the same line.
  5. Export. Save as SRT for the widest support, or VTT for the web, in UTF-8. Play the video with the file loaded and watch it once from start to finish.
  6. Publish. Upload the file as a subtitle track, or burn it into the video with an editor or ffmpeg.

For a short video this takes minutes. Our 隆江猪脚饭 (Longjiang pork knuckle rice) short is 16.8 seconds long and has three subtitles, the first starting at 0.066 seconds. Long dialogue videos are where the correcting step takes most of the time.

How long a subtitle line can be: one platform's numbers

There is no universal law for subtitle length, but Netflix publishes a Timed Text Style Guide for each language its vendors deliver, and it is a public, specific reference. These are the figures for standard subtitles in adult programmes (SDH rules differ):

Language (Netflix guide)Characters per lineLinesReading speed, adultReading speed, children
English (USA)422 at mostUp to 20 characters per secondUp to 17 characters per second
Spanish (Latin America and Spain)422 at mostUp to 17 characters per secondUp to 13 characters per second
Portuguese (Brazil)422 at mostUp to 17 characters per secondUp to 13 characters per second
Chinese (Simplified)162 at mostUp to 9 characters per secondUp to 7 characters per second
Chinese (Traditional)162 at mostUp to 9 characters per secondUp to 7 characters per second
Japanese13 full-width characters (11 for vertical subtitles)2 at mostUp to 4 characters per secondNo separate figure
Korean16 (Latin letters, spaces and punctuation count as half)2 at mostUp to 12 characters per secondUp to 9 characters per second

Netflix's timing guidelines add that a subtitle should stay on screen for at least 20 frames (about 0.8 seconds) and that there should be at least 2 frames between two subtitles.

To use the reading speed figure, divide the characters by the seconds on screen. Our English line Boss, four pork trotter rice, please has 36 characters and is on screen for 2.33 seconds: about 15 characters per second, under the 20 in the English guide. The Chinese line 「老板 来四份隆江猪脚饭」 has 11 characters including the space, about 5 per second against a limit of 9. Note that the Chinese guides drop commas and full stops inside a subtitle and use a space instead, which is how our Chinese file is written.

How to translate subtitles

Translate from the corrected subtitle file, not from the raw transcript, and translate subtitle by subtitle.

  • Keep the timing lines and numbers exactly as they are. Only the text changes, so every translated line appears at the moment it is spoken.
  • Translate what the line means, not each word. In our Japanese file, 「哎 你们都不用餐具的吗」 ("Hey, don't any of you use cutlery?") became 「え、みんな箸も使わないの?」, "Eh, you don't even use chopsticks?": the specific word reads better than "cutlery".
  • Recheck length after translating. Our Spanish line Jefe, cuatro arroz con pata de cerdo por favor is 46 characters, over Netflix's 42 per line, so it needs a line break. Our Japanese line 「すみません、隆江豚足飯を4つください」 is about 17.5 counted characters in 2.33 seconds, almost 8 per second against the Japanese guide's 4, so for a Netflix delivery it would have to be cut to about 9 characters.
  • Check names, dishes and place names by hand. Our English file shortens 隆江猪脚饭 to "pork trotter rice", the Japanese file keeps 隆江 in 隆江豚足飯, and the Cantonese file uses the local word 猪手饭.
  • Have a fluent reader check jokes, wordplay and slang. Raw machine translation tends to translate them literally, and a joke that does not land in the subtitle is lost for that whole audience.
  • Save each language as its own UTF-8 file with the language in the name.

How to make bilingual subtitles

Bilingual subtitles show two languages at once, which helps language learners and mixed audiences. There are three ways to build them.

MethodHowTrade-off
Two lines per cueBoth languages under the same timing line in one file: first line one language, second line the otherEach language gets only one line, so long lines must be shortened. Font size is the player's choice unless you burn the subtitles in.
Two separate tracksOne SRT or VTT file per language, both on the same videoEach file stays clean and can be published alone. The viewer chooses the language instead of seeing two.
Two files burned inBurn both files into the picture, one placed above the other, the second in a smaller fontYou control order and size. It cannot be turned off, and fixing either language means re-exporting.

Put first the language most of your viewers read, and the other one second. If you burn them in, make the second language visibly smaller so the eye goes to one line first. A bilingual cue with one line per language is the same layout as the Chinese and English sample in our SRT file article. To build it from two finished files, load the original and the translation into cv.cm's subtitle converter: each translated subtitle joins the original subtitle it overlaps most, below it or on top, and the result downloads as SRT or VTT. The files are processed in the browser and not uploaded.

How to burn subtitles into a video with ffmpeg

ffmpeg's subtitles filter draws a subtitle file onto every frame using the libass library, so it needs an ffmpeg build configured with libass. Burning in re-encodes the video, which takes time and loses a little quality; the audio can be copied unchanged.

# Burn one subtitle file into the video
ffmpeg -i input.mp4 -vf subtitles=subs.srt output.mp4

# Same, keeping the audio as it is and setting the quality
ffmpeg -i input.mp4 -vf subtitles=subs.srt -c:v libx264 -crf 18 -c:a copy output.mp4

# Bilingual: Chinese above, smaller English below
ffmpeg -i input.mp4 -vf "subtitles=zh.srt:force_style='Fontsize=16,MarginV=40',subtitles=en.srt:force_style='Fontsize=11,MarginV=15'" -c:a copy output.mp4

# Soft track instead: add the SRT to an MP4 without re-encoding
ffmpeg -i input.mp4 -i subs.srt -map 0 -map 1 -c copy -c:s mov_text output.mp4
  • force_style overrides the style with ASS settings such as Fontsize and MarginV (distance from the bottom). Try values on a short clip first.
  • If the subtitle file is not UTF-8, the filter's charenc option sets its encoding.
  • The last command only adds a switchable track; the picture is not changed and nothing is re-encoded.

Uploading subtitles to YouTube

YouTube Help describes these steps in YouTube Studio: open Subtitles, select the video and choose ADD LANGUAGE; then under Subtitles choose ADD and pick Upload file. Choose With timing for an SRT or VTT file, or Without timing for a plain transcript, then select the file and save.

  • Use a format from YouTube's list of supported subtitle files; SRT and WebVTT are both on it. For SRT, YouTube supports only the basic version, without style markup, in plain UTF-8.
  • Add one language at a time, so a video can carry several subtitle tracks.
  • Automatic captions are created only in the video's default language.
  • In the caption settings of the YouTube app, a viewer whose language is not listed can choose Auto-translate, which gives a machine translation. Upload your own file for languages that matter to you.

Our practice: subtitle files in many languages

For the short videos on our own Douyin account we make translated subtitle files next to the original Chinese SRT, named {original name}_{language name}.srt, for example 隆江猪脚饭_英语.srt for English. The default target is 13 languages. Besides major languages, some videos have Chinese dialects and novelty languages: Cantonese, Hokkien, Hakka, Tibetan, Mongolian, Klingon and Latin.

VideoLengthChinese dialogueTranslated subtitle files
隆江猪脚饭 (Longjiang pork knuckle rice)16.8 s3 lines, 24 characters26
桂林米粉 (Guilin rice noodles)15.1 s2 lines, 17 characters24
香煎马蹄糕 (pan-fried water chestnut cake)15.1 s6 lines, 30 characters12

The food shorts have the most versions because they have so little dialogue: three lines are little text to translate and check, and the timing lines are copied unchanged into every file. In the dialect files the dish names change too, for example 隆江猪手饭 in Cantonese.

FAQ

How do I add subtitles to a video for free?

Transcribe the audio in a free speech-to-text tool that exports SRT, correct the text in any text editor, and upload the SRT to the platform as a subtitle track. To make them part of the picture, burn the SRT in with ffmpeg, which is free.

How do I translate an SRT file?

Copy the file, keep every number and timing line, and replace only the text lines with the translation. Then check each line's length and reading speed for the new language and have a fluent speaker read it before publishing. To show the translation under the original in one file, merge the two files with cv.cm's subtitle converter.

Which language goes on top in bilingual subtitles?

There is no fixed rule. Put first the language most of your viewers read, and the second language below it, smaller if you burn them in.

Do burned-in subtitles lower video quality?

Burning in re-encodes the video, so there is a small generation loss. A high quality setting, for example -crf 18 with libx264 in ffmpeg, keeps it hard to see. Adding a soft track does not re-encode anything.

What is the difference between subtitles and captions?

In the HTML track element's terms, subtitles are a transcription or translation of the dialogue, while captions also describe sound effects and other audio for viewers who cannot hear it.

All video creation tutorials