Mkvmerge Tutorial



  1. Mkvmerge Tutorials
  2. Mkvmerge Tutorial

This tutorial is indepth and explains almost everything that i know about the program. If you want the presets and the exact files that I had please follow t.

Mkvmerge

The purpose of this HowTo is to split videofiles which contain more than one episode of a tv show into single-episode files. So they show up individually within plex, can be played individually and don’t produce any of the weird things that multi-episode files are plagued with.

The tool used is MKVtoolnixGUI
it is freely available for all major PC operating systems.

  • ¹ As of the date of this tutorial, the latest version of mkvmerge GUI is not capable of demuxing a M2TS file. The solution is to use C: Portable Software tsMuxeR1.10.6 tsMuxerGUI.exe to demux it. Then, in step 14 above, instead of the original video file, drag and drop the demuxed video (with no audio) instead.
  • Mkvmerge (1) supports reading CUE sheets for audio files as the input for chapters. CUE sheets usually contain the entries PERFORMER and TITLE for each index entry. Mkvmerge (1) uses these two strings in order to construct the chapter name. With this option the format used for this name can be set.
File

Therefore the container format of the output files will be MKV.
The input format can be a multitude of containers like AVI, MP4, MKV, MPEG, TS, DIVX and several more.
The quality of the files will remain the same, because mkvtoolnix only remuxes the files, it doesn’t re-encode them.

  • start up MKVtoolnixGUI
    (depending on your operating system, this might look a little bit different)

  • drag the multi-episode file into the window marked by my crude arrow

  • the video, audio and subtitle tracks it contains will appear in the window underneath it

  • you may want to revise the language code that is assigned to the audio track(s) and the language and ‘forced’ attribute of subtitle tracks so the Plex interface informs you correctly about the languages available.
    Plex’s automatic audio and subtitle track selection feature relies also on these tags to work correctly.

  • change to the Output tab:

  • change ‘Split mode’ to ‘after specific timecodes’

  • input the timecode of the episode break into the field ‘timecodes’ (you can input several timecodes [separated by comma] if your source videofile contains more than two episodes)
    (I chose to split after 25 seconds, because my example file is only 59 seconds long)

  • revise the path and filename in ‘Output file’ to your needs

  • click Start muxing

MKVToolNix comes with with a README.md, a README.Windows.md (instructions how to compile MKVToolNix on Linux for use on Windows), a Contributor Covenant Code of Conduct and man pages for all programs: mkvmerge, mkvinfo, mkvextract, mkvpropedit and MKVToolNix GUI. You can also read the NEWS.md file (contains news & changes). Sep 27, 2014 How to Make Dual Audio Movies (MKVMerge Tutorial) MKVToolNix is a set of tools to create, alter and inspect Matroska files under Linux, other Unices and Windows. They do for Matroska what the OGMtools do for the OGM format and then some.

You should find 2 or more MKV files in the destination path, their file names appended by a three figure number (DVD Introduction-scene-001.mkv and DVD Introduction-scene-002.mkv for our example file in the screenshots)

Now rename the split episode files according to the Plex naming guide for tv show episodes and add them into your library.

Done.

If you set above as ‘Split mode’ = “Before Chapters”, you can split your files on chapter markers.
This is particularly useful when you have ripped tv shows and you got only one monolithic file instead of one file for each episode.

This article will guide you through the steps of ripping a Blu-ray disc, demux it and then remux it to mkv format. This way you will get a huge, but unprotected, easy to use and store mkv file that contains the exact video and audio streams as your Blu-ray disc quality and size-wise. You can then use this file as input for another program, use any player to watch it in about any platform or just store it in your hard drive as a backup.

You will need the programs below for this guide. Click on the links to download them straight from our downloads database.

Step 1

Before you start processing your disc you need to use an unlocking software to circumvent the Blu-ray's protection. I really suggest you let AnyDVD HD do that job. You can download it here or check the authors page here. Install it and forget it is even there. It will do all its work on the background.

Step 2

Open up BDInfo. Using this application we will determine in which files the main movie is and what streams we need. Browse (1) and select the BDMV folder in your Blu-ray disc. Check out which playlist contains the movie (2), obviously the one with the biggest length and check its name. In this example, our Blu-ray uses seamless branching, in plain words it has a 'Director's Cut' feature and it uses various smaller m2ts files (3) you can see in the list below. That is why we have one bigger playlist, and another one a bit smaller. In normal Blu-rays you will only have one big playlist and one m2ts file. Make sure that in the various video and audio streams area (4) you right down the fps value of the video, in this example 23.976. Now, leave BDInfo open and run tsMuxeR

Step 3

To start, add (1) the playlist file that we have already found in BDInfo. tsMuxeR will automatically load all the m2ts files assosiated with it. Now we have our main movie loaded and ready for extraction. Select the main video track, the audio that you want to keep and any subtitles (2) you may need later on. Then set output to Demux (3) and after you set the location of the output files, click Start demuxing (4).

Setting up mkvmerge GUI

Step 4

tsMuxeR will now copy the tracks you have selected to your hard drive. This process will take from about 45 to 90 minutes, depending on the speed of your Blu-ray drive and the size of the disc. When it is done, click OK and close tsMuxeR. Next step is to create our mkv file, so run mkvmerge GUI (named mmg.exe in the archive you have downloaded).

Step 5

First of all, we need to set as input all the files that tsMuxeR created, so click add (1) and select all the files that we demuxed before (2). You can also add subtitles in Blu-ray's .sup format. Now we need to set some options. Select the video track (3), set the language (4) and then click the Format specific options (5) tab.

Step 6

Here you need to add the FPS value exactly as the one you wrote down at Step 2.

Step 7

Mkvmerge Tutorials

Mkvmerge

Feel free to add the correct language to any other audio or subtitle tracks you may have and when you are ready Browse (1) to set the output filename and click Start muxing (2) in order to start the process.

Step 8

Mkvmerge Tutorial

That's it. A few minutes later you will have an mkv file containing the exact video and audio streams of your Blu-ray disc. You should delete all the files tsMuxeR created as you no longer need them. You can now test your mkv file using any player that supports that format and then use it as you please.