How to Translate an SRT File Without Breaking Timing or Formatting
A practical workflow to translate an SRT file: protect timecodes, fit line length, use machine translation safely, then review and merge versions.
FFmpeg is a free command-line tool that can read, convert, and write almost any audio and video format, and it handles subtitles as well. If you work with many files, or you want a repeatable and scriptable workflow, a handful of FFmpeg commands can replace a lot of clicking in graphical programs.
This guide collects the commands that subtitle work needs most: looking inside a file, extracting subtitles, converting between formats, embedding a subtitle track, burning subtitles into the picture, shifting timing, and fixing encoding. Each command is explained so that you can adapt it, not only copy it. Examples use simple file names; replace them with your own, and put names that contain spaces in quotes.
FFmpeg is available for Windows, macOS, and Linux from the project's website and through common package managers. Open a terminal, type ffmpeg -version, and you should see version information. The tool called ffprobe is installed with it and is used to inspect files.
Two habits make FFmpeg safer. First, never overwrite your original: always write to a new file name. Second, test on a short clip before you process a long film. You can limit the length with -t 60, which processes only the first minute.
Before changing anything, see what streams a file contains.
ffprobe -hide_banner -i movie.mkv
The output lists each stream, for example video, audio, and subtitle streams with their language and codec. Subtitle streams look like Stream #0:3(eng): Subtitle: subrip. The number tells you which stream to select with -map. The codec tells you what kind of subtitle it is: subrip is SRT-style text, ass is Advanced SubStation Alpha, and hdmv_pgs_subtitle or dvd_subtitle are picture-based formats that cannot be converted to text without optical character recognition.
To save the first subtitle stream of a video as a text file:
ffmpeg -i movie.mkv -map 0:s:0 subs.srt
-map 0:s:0 means: from input 0, take the first subtitle stream. Use 0:s:1 for the second. If the stream is already text-based, FFmpeg converts it to SRT. If it is picture-based, this command will fail, because there is no text to extract.
FFmpeg decides the output format from the file extension, so converting is often a one-liner.
SRT to WebVTT:
ffmpeg -i subs.srt subs.vtt
WebVTT to SRT:
ffmpeg -i subs.vtt subs.srt
ASS to SRT:
ffmpeg -i subs.ass subs.srt
Remember what each conversion costs. Going to SRT removes styling, positions, and effects, as explained in our format comparison. After converting, open the result and check it, especially for leftover override codes from ASS.
Embedding puts the subtitle inside the video file as a separate stream, so one file carries everything and the viewer can still switch the text on and off. The video and audio are copied without re-encoding, so there is no quality loss and the command is fast.
ffmpeg -i video.mp4 -i subs.srt -map 0 -map 1 -c copy -c:s srt -metadata:s:s:0 language=eng output.mkv
What the parts mean:
-i video.mp4 -i subs.srt gives two inputs.-map 0 -map 1 keeps everything from the video and adds the subtitle.-c copy copies video and audio without re-encoding.-c:s srt stores the subtitle as SRT text.-metadata:s:s:0 language=eng labels the track's language so players show a sensible name.MP4 does not store SRT directly. It uses its own text subtitle codec, which FFmpeg writes with mov_text:
ffmpeg -i video.mp4 -i subs.srt -map 0 -map 1 -c copy -c:s mov_text -metadata:s:s:0 language=eng output.mp4
Players and devices vary in their support for MP4 subtitle tracks, so test on the device you care about. For a television, a sidecar .srt next to the video is sometimes the more reliable choice. See adding subtitles in VLC and other players for naming rules.
Give each subtitle its own input and metadata:
ffmpeg -i video.mp4 -i en.srt -i es.srt -map 0 -map 1 -map 2 -c copy -c:s mov_text -metadata:s:s:0 language=eng -metadata:s:s:1 language=spa output.mp4
To make hardcoded subtitles, use the subtitles video filter. Because the text is drawn on the video, FFmpeg must re-encode it, which takes longer and applies compression again.
ffmpeg -i video.mp4 -vf "subtitles=subs.srt" -c:a copy output.mp4
You can control the look with force_style:
ffmpeg -i video.mp4 -vf "subtitles=subs.srt:force_style='FontName=Arial,FontSize=22,Outline=2'" -c:a copy output.mp4
Some notes for success:
C: as C\\:. Placing the subtitle file in the same folder and using a simple name avoids this.To delay every subtitle by 2.5 seconds, use an input time offset:
ffmpeg -itsoffset 2.5 -i subs.srt -c copy shifted.srt
Use a negative number to make subtitles earlier, for example -itsoffset -1.2. This works for most files and is a quick way to fix a constant offset. For a speed change, such as the 23.976 to 25 frames-per-second case, the setpts approach is for video; for subtitles it is usually easier to use a subtitle editor that offers a frame-rate conversion. Our sync guide explains the ratios and the two-point method.
If a subtitle file is not UTF-8, tell FFmpeg what it is when reading, and write a UTF-8 copy:
ffmpeg -sub_charenc CP1252 -i old.srt new.srt
Replace CP1252 with the encoding of your file, for example CP1251 for Cyrillic or CP1256 for Arabic. The output is UTF-8. This is a quick alternative to a text editor, described in our encoding guide.
To copy a video without any subtitle streams, use -sn:
ffmpeg -i movie.mkv -map 0 -sn -c copy no-subs.mkv
To keep video, audio, and only the first subtitle track:
ffmpeg -i movie.mkv -map 0:v -map 0:a -map 0:s:0 -c copy one-sub.mkv
A simple loop saves hours on a collection. On Linux or macOS:
for f in *.srt; do ffmpeg -i "$f" "${f%.srt}.vtt"; done
This converts every SRT in the folder to WebVTT. On Windows, the same idea works with a batch loop or PowerShell. Always test the loop on a copy of a few files first.
"Subtitle codec not currently supported" or similar errors. The target container does not support that subtitle type. Use mov_text for MP4, srt for MKV, or convert the subtitle format first.
The output has no subtitles. Check your -map options. If you do not map the subtitle input, FFmpeg may drop it. Check the result with ffprobe.
Garbled characters. Specify the input encoding with -sub_charenc.
Picture-based subtitles will not convert. Streams such as PGS and VobSub are images. You need an OCR tool to turn them into text, followed by careful proofreading.
Subtitles are out of sync after embedding. The subtitle was not synchronised with the video before embedding. Fix the timing in the file first.
FFmpeg is excellent at moving subtitles around, but it does not help you decide between two translations. For that step, compare the files in the SRT Merger, save the best lines as a single SRT, and then use FFmpeg to embed or burn it in. Keeping the editorial work and the technical work separate makes both easier to check.
With a few commands, FFmpeg can inspect streams with ffprobe, extract subtitles with -map 0:s:0, convert formats by changing the file extension, embed tracks with -c:s srt for MKV or -c:s mov_text for MP4, burn text into video with the subtitles filter, shift timing with -itsoffset, and fix encodings with -sub_charenc. Always write to a new file, test on a short clip, and keep your SRT as the master.
Merge your own subtitle files
Compare two .srt files side by side and save the best lines as one file. It runs in your browser, so nothing is uploaded.