How to Extract Subtitles From MKV and MP4 Files
Subtitles inside a video file can be saved as separate .srt or .ass files. The method depends on whether the track is text-based or image-based.
Updated 2026-10-23
Step 1: Find out which subtitle tracks exist
Open the video in VLC (Subtitle → Sub Track) or in a tool like MediaInfo. You will see tracks such as “English – [SubRip]”, “English – [ASS]”, “HDMV PGS” or “VobSub”. The label tells you the type.
| Track type | What it is | Can I extract it as text? |
|---|---|---|
| SubRip (SRT), UTF-8 text | Plain text with timing | Yes, directly |
| ASS / SSA | Styled text | Yes; convert to SRT if needed |
| WebVTT, mov_text (MP4) | Text with timing | Yes |
| PGS (Blu-ray), VobSub (DVD) | Pictures of text | Only with OCR software |
Method A: MKVToolNix (graphical, for MKV)
- Install MKVToolNix, open MKVToolNix GUI and switch to the Extraction tool (or use the “Header editor”/“Multiplexer” and add the file).
- Select the subtitle track(s) you want and choose a destination.
- Click Start extraction. Each track is saved with a suitable extension (.srt or .ass).
Method B: FFmpeg (command line, any container)
# list tracks
ffmpeg -i movie.mkv
# extract the first subtitle stream as SRT
ffmpeg -i movie.mkv -map 0:s:0 subs.srt
# extract the third subtitle stream as ASS
ffmpeg -i movie.mkv -map 0:s:2 -c:s copy subs.ass
Stream numbers start from zero in each category, so 0:s:0 is the first subtitle track. FFmpeg converts between text formats on the fly, so extracting an ASS stream into an .srt file works, but it removes all styling. For MP4 files with mov_text tracks the same command works.
Image-based subtitles (PGS and VobSub)
Blu-ray and DVD subtitles are bitmaps, so there is no text to copy. Use an OCR-capable program such as Subtitle Edit, which reads the images, lets you correct recognition errors and saves the result as SRT. Browser tools, including ours, cannot perform this step; they only handle text formats. A .sub file next to an .idx file is VobSub; a text-based .sub is handled by SUB to SRT.
After extraction
- If you got an .ass file, convert with ASS to SRT and skip typeset signs or song styles.
- If characters look wrong, repair them with the encoding fixer.
- Remove hearing-impaired descriptions with Remove SDH.
- Check overlaps and timing with the SRT checker.
A note on rights
Extract subtitles only from videos you own or have permission to process, and respect the licence of the original subtitle author when sharing.
Putting subtitles back into a video
To add an external .srt to an MKV as a selectable track, use MKVToolNix’s Multiplexer: add the video, add the .srt, set the language and the “default” flag, then start multiplexing. With FFmpeg: ffmpeg -i movie.mkv -i subs.srt -map 0 -map 1 -c copy -metadata:s:s:0 language=eng out.mkv. MP4 needs the text track converted to mov_text (-c:s mov_text). Hard-coding (burning) the subtitles into the picture is also possible but permanent and requires re-encoding the video.
Working with image-based tracks
For PGS or VobSub tracks, the usual path is: extract the track untouched (.sup for PGS; .sub/.idx for VobSub), open it in an OCR-capable subtitle editor, let it recognise the characters with the right language, correct the flagged mistakes (typically the letters I, l and 1 and italics), and save as SRT. For a two-hour film plan on 15–30 minutes of review.
Quick troubleshooting
- The extracted .srt is empty: the track you picked is an image-based one or the stream number is wrong. Re-check the order with
ffmpeg -i. - Characters look wrong: older MKV files may contain subtitles in a legacy code page; repair with the encoding fixer.
- The timing is shifted by a constant amount: the video had a start-time offset; correct it with the timing shifter.
- Forced subtitles: many discs contain a short “forced” track that only translates foreign dialogue; it is usually tiny and is not a full subtitle.
Frequently asked questions
Why does FFmpeg fail on my PGS track?
FFmpeg cannot convert image-based subtitles to text because that needs OCR. Extract with MKVToolNix as .sup and use Subtitle Edit to recognise the text.
Can I extract subtitles from a streaming service?
Subtitles from DRM-protected streams are not accessible this way and may be protected by the service’s terms.
What is the fastest way to get the file?
If the video has a text track, FFmpeg takes a few seconds. Otherwise try a ready-made subtitle for the same release.