2

At UNIX command line, I use the mkvmerge command in MkvToolNix to split the large multi-GB *.mkv file into several parts:

mkvmerge -o out.mkv --split 1990M large.mkv

It generated out-001.mkv, out-002.mkv, out-003.mkv.

There is also a subtitle file large.srt. Now I do I separate it into parts that will work properly with those smaller mkv files?

Another related question: how to incorporate large.srt into large.mkv first, and then split the resultant mkv file into smaller parts retaining the subtitles?

1 Answer 1

1

Add the subtitles to your large mkv file first. Then mkvmerge will split the file with the subtitles automatically.

To add the subtitles, the easiest is to use mkvmerge-GUI. It will also show you the command-line it uses. Or you can try something like this directly:

video="your_large_video.mkv"
st_en="english.srt"
st_fr="french.srt"
out="large_video-st_en_fr.mkv"

mkvmerge -o "$out" "$video" --language 0:eng "$st_en" --language 0:fre "$st_fr"

After that, splitting works fine and includes correct subtitles. I just tried it, and splitted by size and by duration. I'm not sure, but maybe the subtitle timing was preserved more exactly when splitting by duration (--split 1800s or similar instead of --split 500M).

6
  • On Mac, the GUI isn't available, or it is not obvious where to find it.
    – qazwsx
    Commented Apr 23, 2015 at 22:47
  • What is that 0:eng for?
    – qazwsx
    Commented Apr 23, 2015 at 22:48
  • 1
    @qazwsx ; The GUI is available with several installs but maybe not all. See bunkus.org/videotools/mkvtoolnix/downloads.html#macosx . "0:eng" specifies the language of the first ST track. It is OK to re-use the "0:" track number for following ST tracks; it is automatically converted to the real track number.
    – mivk
    Commented Apr 24, 2015 at 13:57
  • That's where I got the info about installing the command-line version of mkvtoolnix. The complex usage info was not helpful enough for me to cook up the necessary command line to merge video file and subtitle file. And there is NO GUI for Mac OS X.
    – qazwsx
    Commented Apr 24, 2015 at 16:11
  • @qazwsx : If you don't use Homebrew or Macports, get the binary from here: macupdate.com/app/mac/16837/mkvtoolnix . It's packaged into a normal .app and opens the GUI.
    – mivk
    Commented Apr 24, 2015 at 16:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.