How to Add Translated Subtitles to a Video
Updated · By DubVoice
To add translated subtitles to a video, create a timed subtitle file in the language your viewers need, check its translation against the audio, then attach the file or import it into your editor. A subtitle track adds text rather than a new voice. The original audio remains if you do not separately change it when exporting.
The desktop example below tries a locally installed speech model on a short Spanish recording, with English as the target. Our first synthetic clip produced English text, but another short Spanish clip did not translate correctly in three model tests. A person who understands both languages must check and correct the result before it is used. We also checked an MP4 containing a subtitle stream; support varies by player. If your target language is not English, see the separate existing-subtitle approach below.
Decide what you already have
Start with the video and the language of its speech. Here are two starting points:
- You have a video with speech but no subtitle file. Make a timed transcript or translated subtitle file from the audio, then check the result against the recording.
- You already have a timed subtitle file. Keep a copy of the original and translate its text. The original timings are a starting point; review them after editing.
Text already visible inside the image is different from an editable subtitle track. The example here does not remove or translate text baked into the picture. It also does not translate a soundless video's on-screen text.
What do SRT and VTT files contain?
A subtitle file pairs words with timestamps. SRT is plain text; WebVTT is a timed-text format for the web. Check which format your destination accepts.
For example, one SRT cue has a sequence number, a start and end time, and the words to display:
1
00:00:00,000 --> 00:00:03,000
Hello and welcome.
This is an illustrative cue. Save a copy before editing and check that timings match the speech.
A tested example: Spanish speech to English subtitles
You need a desktop terminal, FFmpeg and the open-source Whisper command-line tool already installed. See Sources for installation instructions. A first run may download the selected model; ours was already saved locally.
We tested Whisper version 20250625 with its multilingual tiny model and FFmpeg 8.1.1. Our first input was a short synthetic MP4 containing Spanish speech, H.264 video and AAC audio. The translate task is intended to translate non-English speech into English text; the output can be wrong or remain in the source language. It is not a command for translating English audio into an arbitrary target language. The turbo model is not the model to choose for this translation task.
- Work on a copy of your video in its own folder. The example names it
video.mp4. Open a terminal in that folder. - Create a new, empty folder named
subtitles. Do not reuse a folder containing a file you need to keep under the same name. - For a Spanish-speaking input, run:
whisper video.mp4 --model tiny --device cpu --task translate --language Spanish --output_format srt --output_dir subtitles
- Open
subtitles/video.srt. Our first test contained English text with a start and end time. In a second short Spanish test, thetinyandsmallmodels left Spanish in the output;large-v3produced a mixture of English and Spanish. These examples are not a general accuracy comparison, but they show why a successful command and a valid SRT file are not proof of a translation. - Stop and check: a person who understands both languages must compare every cue with the source audio, correct the meaning and names, and review the timing. If the output remains Spanish, is garbled or leaves out content, do not call it an English translation or publish it. A different model may still fail. If you cannot check both languages, ask a qualified translator to review and correct the file.
- Save the corrected, reviewed English cues as a separate file named
subtitles/video-reviewed.srt, keeping the original model output for comparison. Only proceed with the English-tagged example below after a bilingual reviewer has confirmed the text is English and matches the audio. If you cannot verify that, do not label it English or treat it as a completed translation.
The command specifies Spanish as the source language. Do not expect an English source to produce Spanish subtitles. Our two clips do not establish results for other languages, long videos, background noise or mobile devices.
Already have subtitles in the original language?
If you have an editable, timed SRT, make a copy. Translate each cue while retaining its structure and timestamps, and save the new file as UTF-8 with a different filename. Someone who understands both languages must review it against the video.
Translated wording can have a different length, so a cue may need splitting or retiming. Play the whole video with the new file before sharing it.
For English speech needing Spanish subtitles, use a manual or separately supported translation step. The Whisper command above targets English, not Spanish, and may fail to translate at all.
Need VTT instead of SRT?
If your destination accepts WebVTT and you have FFmpeg installed, this command converts the reviewed English SRT from our example:
ffmpeg -n -i subtitles/video-reviewed.srt subtitles/video-reviewed.vtt
We ran this on a reviewed plain-text SRT and checked the resulting VTT text and timestamps. It changes the file format; it does not itself translate. Check the resulting text, encoding and timings, especially with a different input. Use a new output name: -n refuses to overwrite an existing file. Check the terminal message and the newly created file, rather than relying only on an exit code.
Keep the original voice and add a subtitle track
If you need an MP4 containing a subtitle stream, the following example uses the video and first audio stream from video.mp4 and the reviewed English SRT file. The eng tag is appropriate only after confirming that the subtitle text is English; otherwise do not label it English. Check selection and playback in your intended player:
ffmpeg -n -i video.mp4 -i subtitles/video-reviewed.srt -map 0:v:0 -map 0:a:0 -map 1:0 -c:v copy -c:a copy -c:s mov_text -metadata:s:s:0 language=eng subtitled-video.mp4
On our synthetic H.264/AAC input, FFmpeg copied the selected video and audio streams and added a mov_text subtitle stream. Comparing the selected encoded stream hashes showed the same video and audio content in that test. Our subtitle ended at 6 seconds, while the input file was about 5.57 seconds long; the output container was 6 seconds long. Check your cue endpoints and final playback: copying streams does not guarantee an identical container duration. The command does not create a dubbed voice. It selects the first video and audio streams and the supplied subtitle stream; it does not preserve every extra track, attachment or subtitle automatically.
The example requires an audio stream and codecs the MP4 output can accept. Check the output in your intended player and destination; support for subtitle streams varies. Permanently visible text requires a different export operation. Keep the originals until you have checked the result.
You can inspect the output streams with:
ffprobe -v error -show_entries format=duration:stream=codec_type,codec_name:stream_tags=language -of json subtitled-video.mp4
In our test, the result listed a video stream, an audio stream and an English-tagged subtitle stream. This inspection is useful evidence that a stream exists; it does not confirm the translation is correct, that captions are visible in every player, or that the timing is suitable for your clip.
Review before you send or publish
Watch the full export with subtitles enabled and compare it to the audio. Check names, context, timing and whether text covers important on-screen content.
For multiple speakers or specialist terminology, allow extra time for bilingual review. Consider a shorter test clip first. Use material you are entitled to edit and share, and check your destination's requirements.