Displaying two subtitle tracks simultaneously

Another tool to merge subtitles is DualSub (http://dualsub.sourceforge.net/). It works with SRT subtitles for input and output. It has many options for customization. In addition you can use it to translate subtitles to any language.


mpv

I think that the best approach is with mpv (available via sudo apt install mpv).

I'm going to assume that all the subtitles are either built-in (as specified in the question) or in a separate, but suitably named external file (e.g. if your movie is called file1.mkv your subtitle file should be file1.srt). If not, you can specify the subtitle files explicitly by adding the options --sub-file=subtitle_file_lang_xx.src, --sub-file=subtitle_file_lang_yy.src etc. or by playing around with --sub-auto (e.g. --sub-auto=fuzzy).

Irrespective of how they were chosen (built-in or from an external file) each set of subtitles will be in its own "stream" when you play the video file. The streams are assigned consecutive, integer indices (1, 2, 3...). In general, the built-in subtitles will (logically) have the earlier indices. The stream indices, their languages (if the subtitle has a specified language), and whether the subtitle comes from an external file, are displayed in the terminal when you play your file with mpv. For example, after running mpv file1.mkv:

(+) Subs  --sid=1 --slang=eng (*) (subrip)
    Subs  --sid=2 --slang=fra (subrip)
    Subs  --sid=3 'file1.srt' (subrip) (external)

Here the first two subtitles are built-in, with languages English (eng) and French (fra) respectively, while the third one is from an external file. The indices (sid) are 1, 2, 3. The default subtitle stream is the first one (marked with a (*)) and it's also the one that's selected (with a (+)).

Knowing these indices, you can specify the "main" and secondary subtitles with the options --sid and --secondary-sid. For example, to display the English subtitles, from the previous example, as the main subtitles, and the French ones as the secondary ones, you can run (in a terminal):

mpv --sid=1 --secondary-sid=2 file1.mkv

Cycling secondary subtitles with keyboard shortcuts

By default, there aren't any keyboard shortcuts for cycling the secondary subtitles (in the way that you can cycle the "main" subtitles with j and J (Shift+j)). However, you can very easily add some.

For example, if you add the following to your ~/.config/mpv/input.conf (or more generally, your ${XDG_CONFIG_HOME}/mpv/input.conf):

Ctrl+j cycle secondary-sid
Ctrl+J cycle secondary-sid down

then Ctrl+j will cycle your secondary subtitles in the same direction that j cycles the main ones (increasing subtitle stream index), and Ctrl+Shift+j will cycle them in the opposite direction J (decreasing subtitle stream index).

VLC

If you prefer VLC, it also supports dual/secondary subtitles, as of the beta 4.0.0. Making it work seems to currently be a bit more fiddly than with MPV.

First, you need to turn them on, overall. Go to Tools > Preferences > Subtitles/OSD > Dual Subtitles (at the very bottom) > Align and change it to anything but unset. You may also need to adjust the offset (the adjacent setting).

When playing a video, you need to "Toggle secondary subtitle control" with the default shortcut Ctrl+Shift+V. (This means that the normal subtitle control shortcuts like v or Alt+v, for cycling between subtitles backwards and forwards, will now apply to the secondary subtitles, rather than the main subtitles. Pressing Ctrl+Shift+V again will toggle back to having these apply to the main subtitles.) Then, press v the right number of times to switch to the (secondary) subtitles that you want.


I spent a few days googling about this topic. The short answer is that there is no way to play two subtitle tracks in a *.mkv file simultaneously, in Ubuntu.

There are, however:

  • a tool to merge two subtitles from two .srt files (2srt2ass)
  • vlc player have an extension that allows you to play one track from .mkv file and one track from another subtitle file: http://addons.videolan.org/content/show.php?content=152364

The best you can do with your .mkv files is to extract one subtitle from .mkv file and put it in a separate subtitle file, so that you can take advantage of the vlc extension.

Alternatively you can consider KMplayer for Microsoft Windows. I never tried it, because I don't have a Windows, but apparently it is what always comes out top if you google for dual subtitle players.