Ubuntu - Video - Extract subtitle from MKV file

Install mkvtoolnix

sudo apt-get install mkvtoolnix.

Run from terminal:

mkvextract tracks <your_mkv_video> <track_numer>:<subtitle_file.srt>

Get information about tracks.

mkvmerge -i <filename>

Using this utility you can extract any track, even audio or video.

WARNING: Do not use mkvinfo as it says things like “Track number: 2 (track ID for mkvmerge & mkvextract: 1)” which are confusing.