Introduction

MKVCleaver Help ››

MKVCleaver is a utility which allows extraction of tracks, attachments, time codes, cue sheets, tags and chapters from MKV files in batch mode.

Originally idea came to me from using OGMcleaver by Tamas Kurucsai. However it would not work with new MkvToolNix releases. So I decided to write my own. As it progressed, more features were added, I wanted it to be mostly the only tool I would need when extracting data from MKV files. Don't get me wrong, MkvExtractGUI is great, but if I had 50 + some files, I did not want to extract tracks and etc., one by one, every time clicking the check boxes. There had to be another way. Well, there wasn't...

Now, introducing MKVCleaver.

Features Overview:

  • Simple GUI (borrowed from OGMcleaver)
  • Drag & Drop support
  • Override mode for each file
  • List of main tracks under each file
  • VFR detection
  • VFR to CFR conversion (experimental)
  • Automatic video time codes extraction for VFR files
  • Converts H264 tracks to AVI
  • Output file naming for easy sorting
  • Output directory detection
  • Full information for each file on demand
  • Time-codes only mode
  • Copies needed files to same directory automatically (except MkvToolNix)
  • Custom file names based on placeholders
  • Customize placeholder to anything MediInfo can retrieve
  • Filter out unwanted tracks with custom filters
  • Customize what information is displayed for files and main tracks in the GUI

Last Edited: Saturday, September 15, 2018

Created with the Personal Edition of HelpNDoc: Free Qt Help documentation generator


Installation

MKVCleaver Help ››

Installation

Portable

When you start MKVCleaver Portable for the first time, it will extract all needed files into the same directory, except MkvToolNix which you need to download and install separately (see Extras for the links). If, for any reason, one of the files is missing, MKVCleaver will extract all the files again at the next run.

Please put MKVCleaver Portable in a directory where you have write access, otherwise files may not extract properly.

MSI Installer

Run the installer and follow the prompts.

As of version 0.6.0.4 all files are included in the MSI installer. The installer will only extract the files for the selected features.

Last Edited: Saturday, September 15, 2018

Created with the Personal Edition of HelpNDoc: Full-featured Documentation generator


License

MKVCleaver Help ››

MKVCleaver

Author : Ilia Bakhmoutski (sheck)

License : GPL v3

LIMITED WARRANTY

1. NO WARRANTIES

The Author of this Software expressly disclaims any warranty for the MKVCleaver. The MKVCleaver and any related documentation is provided "as is" without warranty of any kind, either express or implied, including, without limitation, the implied warranties or merchantability, fitness for a particular purpose, or non-infringement. The entire risk arising out of use or performance of the MKVCleaver remains with you.

2. NO LIABILITY FOR DAMAGES

In no event shall the author of this Software be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or any other pecuniary loss) arising out of the use of or inability to use this product, even if the Author of this Software has been advised of the possibility of such damages. Because some states/jurisdictions do not allow the exclusion or limitation of liability for consequential or incidental damages, the above limitation may not apply to you.

Last Edited: Saturday, September 15, 2018

Created with the Personal Edition of HelpNDoc: iPhone web sites made easy


GUI Layout

MKVCleaver Help ›› How To Use ››

GUI LAYOUT

(not actual size)

In the left pane you can see filenames that were added and all the tracks of each file, their codecs and languages listed. Tracks can be hidden or shown by clicking + or - button on the left of each filename.

The right pane will display the list of items that can be extracted from files listed in the left pane.

Tracks listed in the left pane are specific to the file they are listed under. The right pane lists the highest number of tracks found in the files on the left. This does not mean that all files will have the same layout.

As you can see above, second file only has one video and one audio track, however the right pane lists 1 video and 2 audio tracks.

MkvToolNix package should be detected automatically if it was installed on your system, otherwise, clicking "Locate MKVToolNix..." button will allow you to specify the path.

Output directory will allow you to select where to store the extracted files. Make sure you have enough disk space remaining as MKVCleaver does not check for free space.

If you maximize or resize the main window, location and window size will be saved in " custom.ini" file when the application is closed. MKVCleaver will be started exactly where you left it on the screen last time. To enable this option click Settings --> UI Resize --> On. If this option is OFF, you will still be able to resize the main window, but the position and size won't be applied on application startup.

Last Edited: Saturday, September 15, 2018

Created with the Personal Edition of HelpNDoc: Qt Help documentation made easy


Adding Files

MKVCleaver Help ›› How To Use ››

ADDING FILES

  1. Click "Open MKV files to process..." button, navigate to the folder where your files are stored and select the files you want to open. Multiple selections are allowed.

  2. Drag and drop file (s) or directories onto the "Files to process" window.

  3. MKVCleaver also accepts command line parameters. MKVCleaver now accepts full paths to matroska files separated by a single space. Each path should be enclosed in single or double quotes.

  4. You can use "Open With" or "Send To" menus in Windows Explorer. To add MKVCleaver to the "Send To" menu, click Settings --> Explorer " Send To" Menu --> Add To " Send To" Menu. If you are using an MSI Installer version the Windows Explorer shortcut will be added automatically.

  5. Drag and Drop a text file with filenames and/or directories of the maroska files you wan to open. The file should be a simple text file with a full path on each line. Do not enclose file paths in any quotes.

Note: MKVCleaver will not check sub-folders.

Note: Above options are available as of version 0.7.0.0. Older version may only provide some of the listed options.

Last Edited: Saturday, September 15, 2018

Created with the Personal Edition of HelpNDoc: Free HTML Help documentation generator


Removing Files

MKVCleaver Help ›› How To Use ››

REMOVING FILES

To remove files from the list, click check boxes next to the files you want to remove and hit "Remove selected files from list..." button.

To toggle selection of all files on and off press Alt+Shift+A.

Last Edited: Saturday, September 15, 2018

Created with the Personal Edition of HelpNDoc: Full-featured Documentation generator


Extraction

MKVCleaver Help ›› How To Use ››

PREPARING TO EXTRACT

The right pane is strictly for batch processing. This means anything that is checked there will be applied to all files in the left pane. If during processing, a file doesn't have the appropriate track, it will be skipped.

Example: if "Audio Track 2" is checked then the second file will be skipped during processing, since it only has one audio track. If a combination of "Video Track 1" and "Audio Track 2" is checked then only video track will be extracted from the second file.

If a track is checked in the left pane for any file, it will override settings in the right pane, just for that file.

Example: If a combination of "Video Track 1" and "Audio Track 1" is checked in the right pane and second audio track is checked under first file in the left pane then second audio track will be extracted from the first file and the video and the audio tracks will be extracted from the second file.

Selecting Attachments, Time codes, Tags, Cue-sheets and Segment UIDs check boxes will apply to all files regardless of any other settings.

If a file doesn't have any or one of those then only available data will be extracted. Chapters can be extracted in TXT or XML formats, depending on your needs. Click Settings --> Chapters to set it.

If you need more information on a file then right click on the left pane and select File Info. You will get all the information in the window for that file. To return to the file list, press Esc or close the window.

Only timecodes for the tracks that are selected will be extracted. If you just want time codes, but not the tracks themselves then click Settings --> Timecodes --> Timecodes Only. In this mode time codes will be extracted for selected tracks, but not the tracks themselves.

Note: "Timecodes" check box must be checked.

When Timecodes Only option is set the Timecodes box text in the right pane will be red.

Everything in the right pane should only be set once all the files are added. All check boxes will be cleared every time a file is added.

VFR FILES

As of version 0.7.0.0 MKVCleaver has additional options when it comes to working with VFR video files. There are now 2 methods of detecting VFR video tracks - Quick and Full. You can find them under Settings->VFR Detection.

The Quick option will use MediaInfo.dll library to check if a track is VFR.

The Full option will extract Timecodes for a video track and compare the length for each frame to identify VFR tracks. This method takes significantly longer.

I found that neither method is 100% accurate, but the Full method worked for wider range of VFR files.

In some cases, the resulting cfr avi file has a shorter reported play time than the original, however, when muxed back into an mkv file with the original audio, both are synced. Please mux the video with the original audio before determining if the vfr to cfr conversion failed.

EXTRACTION

Well it's ON now... If you supplied the output directory then all the files will be extracted there, if its left empty, the output files will go into the directory of the input file.

If you want to know which file MKVCleaver is working on - it's the very top file.

"Convert H264 tracks to Avi files" check box can be toggled on/off during extraction. It takes affect right away.

Extraction can take a very long time, depending on how many files you supplied, your PC specs and what you are extracting. Status bar will display per file as well as overall progress. Once the process starts, there is nothing else for you to do, so go get a cup of tea or something...

Cancel at any time by clicking "Cancel".

MKVCleaver can shut your computer down once finished. Click Settings --> Shutdown PC -- > "choose your option here".

Check "Convert H264 to AVI files" if you want h.264 elementary streams converted to AVI files. Why would you want that ? Well, one of the reasons would be, if you have a VFR video and would like to quickly convert it to CFR. Avi tc package can do that, but it only works with AVI files.

As of version 0.7.0.0 MKVCleaver can convert VFR video tracks into CFR avi files. This feature is experimental and may not always work or it may crash MKVCleaver.

Check "Convert VFR video to CFR" to automatically convert VFR avi files to 120 fps CFR avi files. This option is dependent on "Convert H264 to AVI files" option and cannot be toggled during extraction.

Now you should be ready to extract data. Hit "Extract Tracks !" button.

Created with the Personal Edition of HelpNDoc: Free Kindle producer


Advanced

MKVCleaver Help ›› How To Use ››

ADVANCED

MKVCleaver is capable of detecting codecs for each track automatically. It will assign an extension to a file based on it's codec. All currently supported formats are already in the source code. However, in a case of a rare or unsupported codec and to support future formats, MKVCleaver allows users to assign extensions to codecs manually. Just add a section to custom.ini file.

Sections must be in the following format:

[CODEC]

extension=.ext

Note: Codec IDs must be in the same format as reported by mkvmerge -i command.

Example:

[V_MPEG4/ISO/AVC]

extension=.h264

[A_MPEG/L3]

extension=.mp3

Any entry in " custom.ini" will takes priority over what is in the code of into MKVCleaver.

Alternatively,

Click Tools --> Edit Extensions. Here you can view current custom extension as well as add new ones, edit existing ones, delete existing ones.

Click Tools --> Get Codec(s) From File, then choose a matroska file. MKVCleaver will retrieve all available codecs from that file and present a window where you can add an extension for each codec. Simply click, press Enter or F2 in the left column and type in the extension, then press Enter again.

Last Edited: Saturday, September 15, 2018

Created with the Personal Edition of HelpNDoc: Easily create CHM Help documents


Batch Filters

MKVCleaver Help ›› How To Use ›› Advanced ››

TRACK FILTERS

This feature is available as of version 0.7.0.0.

It allows exclusion of tracks that a user does not want be extracted based on configured conditions or filters.

All configuration parameters are stored in custom.ini file. Manual editing of these parameters is not advised, unless you understand how they work internally. MKVCleaver does not validate these filters when extracting and a mistake in the syntax can lead to unpredictable results.

To view or edit the filters click Batch Filters button.

From left to right, the first box allows selection of the type of track to filter out, the second box contains the name of a parameter you want to filter on, the third box is the condition to use and the forth box is the value you want MKVCleaver to compare against.

If you have not configured any filters yet, the second box will have no entries. To populate it, click

Menu-> Parameters Config.

Here you can set MediaInfo parameters which will populate the second box of the filter configuration window. From left to right, the first box is a user defined name of a parameter. This is the value that will be displayed in the second drop down box of the filter configuration window. The second box here is a MediaInfo parameter that will be retrieved when MKVCleaver is extracting tracks. This parameter is case sensitive and must be typed in exactly as MediaInfo.dll expects it. To view the list of available parameters click Menu->Parameter List.

The parameter list will display all available known parameters that MediaInfo.dll can retrieve from media files. There 2 ways to populate the second box in the parameters configuration window:

  1. First click on the box where you want the parameter to go (the cursor will be active in that box), highlight the parameter you wish to insert in the parameter list window and click the Insert button. If the destination box is not empty then the new parameter will be copied to the clipboard to prevent accidental overwriting.

Or

  2. Drag and drop the parameter you want onto a box in the parameters configuration window. Keep in mind that the destination text will be overwritten in this case. If you made a mistake, just close both windows and open them again. Please, note that all your changes will be lost.

Close the parameters list window, populate the names for the parameters and click Menu->Save.

If you want to delete a line, either leave left, right or both boxes empty or click del button.

Before you return to the filter configuration window, you may want to test the parameters on an actual MKV file. Click Menu->Test Parameters. Select a mkv file (multiples are allowed) and view the results.

The selected file(s) will be queried for all listed parameters and the result will be displayed. Not all parameters will be set or present in all files. As you can see above BitRate_Mode is set for the audio track, but not for the video.

To select a different set of files, close the test results window, close the parameters configuration window and then open the parameters configuration window again.

Click Menu->Save on filter configuration window when done.

FILTERS AND/OR OPERATOR

When working with multiple filters the following rules should be considered:

  1. When setting the logical And operator, please keep in mind that all track types must be the same. In other words, all Audio or all Video or all Subtitles. This operator allows to aggregate (groups) the filters. All filters in the group must match for a track to be filtered out.

  2. When setting the logical Or operator, it should be kept in mind that this operator separates any single or And aggregated (grouped) filters. There can be any track type between Or operators. Any filter or a group thereof before or after the Or operator must match for a track to be filtered out.

In the picture above, we basically have 2 logical filters, because either the first one must match or the group (And operator aggregate) after the Or operator.

GENERAL INFORMATION

Type in null if you want to filter out tracks where the selected parameter is not set (as of version 0.8.0.0).

Subtitles Language is null

The filters work on per current track basis and do not consider the whole file, that's why grouping filters with different track types will not work. Aggregated filters with different track types will simply cause a negative match.

There is no known limit to the number of filters that can be set. That said, please keep in mind that the more you set the longer it will take to extract tracks.

These filters, when a positive match is made, will prevent the current track from being extracted, please keep this in mind when configuring them.

For Example: Consider the following filter:

Audio Language Is Not English

It is tempting to think that this filter will allow all the audio tracks that are not English to be extracted, however, it is the opposite; only audio tracks where the language is set to English will be extracted. That's because the filters that match are supposed to exclude the tracks from being extracted. Why ? Because MKVCleaver is a batch extractor and will extract everything selected unless otherwise specified by a filter.

Last Edited: Saturday, September 15, 2018

Created with the Personal Edition of HelpNDoc: Free PDF documentation generator


Custom Filenames

MKVCleaver Help ›› How To Use ›› Advanced ››

CUSTOM FILE NAMES

As of version 0.6.0.6 users can customize the output file naming convention.

Note: Placeholders below are valid as of version 0.7.0.0. Older versions may have a different syntax which is not compatible with versions 0.7.0.0 and above.

The following variables are available:

[Track#] - Inserts a 2 digit number of the track currently being extracted.

[TrackType#] - Inserts a 2 digit number for the type of track currently being extracted.

[TrackType] - Inserts the type of track currently being extracted. Such as Video, Audio or Text.

[Filename] - Inserts the name of the file currently being extracted.

[aDelay] - Inserts Audio track delay relative to the Video track.

[Delay] - Inserts a delay for Audio and/or Video track.

[LNG] - Inserts the 2 letter language code for Audio and Subtitle tracks.

[LNG3] - Inserts the 3 letter language code for Audio and Subtitle tracks.

[LNGf] - Inserts full language string for Audio and Subtitle tracks.

Since version 0.6.0.8 MKVCleaver is able to clean up placeholders and separators that are not applicable to certain tracks. For example, since [aDelay] placeholder can only be used for audio tracks it should be removed for all other tracks.

You can identify which separator belongs to which placeholder by using < and > characters.

Example: If we have [Track#]<-[TrackType]<-[Filename]_DELAY >[aDelay] then the file name for the audio track will be 01-Audio-Somefile_DELAY 20ms.aac, however, since we do not output the delay for, let's say, subtitles we would get 02-Subtitles-Somefile.srt. But without using the < and > characters we would have left over separators and empty spaces like so 02-Subtitles-Somefile_DELAY .srt

There are some rules on using the separator flags:

  1. You cannot have a single separator belonging to 2 placeholders. So this is not allowed [Filename]<->[Track#]
  2. You cannot have one placeholder that has 2 separators. So this is not allowed [Track#]->[Filename]<-[Delay]

The placeholders can be inserted into any part of the output filename. All other text will be static.

Once you built your custom file name, click Verify button. Correct errors, if any, and click Save button.

If you want to go back to the original way MKVCleaver names files simply clear the custom filename box then click Verify and Save.

CUSTOM PLACEHOLDERS

As of version 0.7.0.3 users can create placeholders in addition to using built-in ones.

To start click on Custom button.

Drag and drop available placeholders onto the input field. The dropped item will be inserted at the cursor position.

Examples should update automatically. If not, then you mistyped something or did something wrong.

Note: Built-in placeholders still have to be typed in manually.

To create new or update current placeholder, click Customize button.

Go to Custom Placeholders to learn more .

Last Edited: Saturday, September 15, 2018

Created with the Personal Edition of HelpNDoc: Free help authoring environment


Custom Placeholders

MKVCleaver Help ›› How To Use ›› Advanced ››

ADD/REMOVE Custom Placeholders

This feature is available as of version 0.8.0.0.

It allows customization of placeholders which are used at extraction time to dynamically update output filename for each extracted item.

All configuration parameters are stored in custom.ini file. Manual editing of these parameters is not advised, unless you understand how they work internally. MKVCleaver does not validate these placeholders when extracting and a mistake in the syntax can lead to unpredictable results.

Some rules:

  • Placeholders are not case sensitive. [title] and [Title] are the same.
  • All placeholders must start with [ and end with ].
  • No characters should exist before [ and after ].
  • Placeholders cannot contain < > or + characters. Those are reserved.
  • Built-in placeholders are reserved and cannot be used.
  • You must already had configured some parameters .

Name field can contain anything you want so long as the text begins with [ and ends with ].

The Example field can contain absolutely anything. It will be used to resolve the placeholder in the examples displayed on the Custom Filename Form for the purposes of validating placeholders.

Click Menu -> Save to save.

Click Menu -> Parameters Config to edit the parameters .

Last Edited: Saturday, September 15, 2018

Created with the Personal Edition of HelpNDoc: Free PDF documentation generator

Copyright © 2018 by Ilia Bakhmoutski. All Rights Reserved.


Custom File List

MKVCleaver Help ›› How To Use ›› Advanced ››

CUSTOMIZING FILE LIST

This feature is available as of version 0.8.0.0.

It allows customization of the file names and track items that are displayed in the left pane.

All configuration parameters are stored in custom.ini file. Manual editing of these parameters is not advised, unless you understand how they work internally. MKVCleaver does not validate these placeholders when loading files and a mistake in the syntax can lead to unpredictable results.

Right click anywhere in the left pane and select Edit Layout.

From here you can right click again and select one of the following:

  • Load MKV
    1. Loads any MKV file for overview purposes

  • Edit Title

Opens the form where you can edit how each file loaded in the left pane is displayed.

Note: The file name cannot be edited or removed. All additional information configured here will be displayed to the right of the file name. An additional space is added after the file name by default and cannot be removed.

    1. Select which track type will be queried for the information before dragging and dropping a placeholder.

Note: Only the first track of each type will be queried for any placeholder in this form. This behavior cannot be changed at this time.

    2. Drag and drop a placeholder you want onto the input field. Syntax will be adjusted by MKVCleaver and inserted at the position of the cursor.

Note: Any text can be inserted in this form. All text, except for the placeholders, will be static.

    3. Save (Menu -> Save) and close the form. The overview MKV file will be reloaded with the new configuration applied.

Note: The new configuration will not be applied to the files that are already loaded in the left pane. You must close MKVCleaver and reload the files for the changes to apply.

  • Edit Sub-items

Opens the form where you can edit how each track type is displayed under each file item.

Note: The track type displayed cannot be edited or removed. All additional information configured here will be displayed to the right of the track type. An additional space is added after the track type by default and cannot be removed.

    1. Drag and drop a placeholder you want onto the input field. It will be inserted at the position of the cursor.

Note: Any text can be inserted in this form. All text, except for the placeholders, will be static.

    2. Save (Menu -> Save) and close the form. The overview MKV file will be reloaded with the new configuration applied.

Note: The new configuration will not be applied to the files that are already loaded in the left pane. You must close MKVCleaver and reload the files for the changes to apply.

Final Result:

Last Edited: Saturday, September 15, 2018

Created with the Personal Edition of HelpNDoc: Free CHM Help documentation generator

Copyright © 2018 by Ilia Bakhmoutski. All Rights Reserved.


Extras

MKVCleaver Help ››

UPDATES

MKVCleaver will check for updates on startup and let you know if an update is available.

If you don't want automatic update check, it can be disabled in the settings menu.

EXTRACTION LOG

As of version 0.7.0.0 MKVCleaver uses SQLite database for keeping logs and other information. The database is stored in the working directory (see FILE PATHS). To view the logs click on Tools->View Log. Log settings are under Settings menu. Logs will be cleaned up according to the log setting "Delete lines older than:". A very important thing to remember is that as far as MKVCleaver is concerned 1M is not the same as 30D and 1Y is not the same as 12M or 365D in terms of log rotation.

The logs will be cleaned up according to whatever is set + 1. That's why.

Example: The setting is 1M. All the lines that are 2 months old or older will be deleted. 1+1=2M.

Example: The setting is 30D. All the lines that are 31 days or older will be deleted. 30+1=31D.

The smaller the unit of time the more accurate the log cleanup will be. You can go as small as a second.

The log cleanup happens at the start up of MKVCleaver.

If you have a large time unit set, such as 1M or more and you use MKVCleaver frequently then the cleanup might take some time during which the database will be locked and you may get an error. If that happens just give MKVCleaver some time to finish what it's doing and try again in a few minutes.

DEBUG LOG

As of version 0.8.0.0 MKVCleaver is able to generate a debug log with detailed information about the extraction process.

To enable debugging click on Settings->Debug->On.

DebugLog.txt will be located in the working directory. Working directory for the portable version is the same as where MKVCleaver executable is located. For the installer version, the path is <System Drive>:\Users\<username>\AppData\Local\MKVCleaver

Before filing a bug on-line:

  1. Enable debug and restart MKVCleaver.
  2. Add only one file (preferably a file that is causing the bug).
  3. Cause the error/crash and close MKVCleaver.
  4. Retrieve the debug file before opening MKVCleaver again to avoid duplicate and unnecessary information from being added.

When filing a bug on-line, please include the following info and files:

  1. Windows version and build #, if applicable.
  2. Steps to reproduce the bug.
  3. Attach a screen shot or a video of the problem.
  4. For bigger file attachments, go to https://ft.sapib.ca . Use my email address when uploading files: sheck@sapib.ca
  5. Attach DebugLog.txt and std_out.txt (both found in the working directory of MKVCleaver). Archive the files for convenience.

XML2CELLTimes Converter

This tool will convert MKV XML chapter files into DVD CellTimes format for DVD Authoring.

Start the tool, type in FPS of the final VOB file and point it to Matroska XML file(s).

FILE PATHS

Since version 0.6.0.4 all writable files are now located in C:\Users\%username%\AppData\Local\MKVCleaver for installers. Portable versions store all files in the same directory as the executable.

SOURCE

MKVCleaver comes with source included in exe. To extract press Ctr+Shift+S.

Note: MSI Installer will extract the source on install automatically if selected by the user.

HELP

If you need help using MKVCleaver or you found a bug:

  1. Leave a comment, file a bug or a request on my blog - Sapib Blogs
  2. Email me
  3. Go to MKVCleaver thread on DOOM9 forums

EXTRAS

MkvToolNix

TC2Avi

Audio Converter/Encoder

Avc2Avi + GUI package

See About window for more...

Created with the Personal Edition of HelpNDoc: Write EPub books for the iPad