Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
MKVToolNix
MKVToolNix
  • Overview
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
    • Locked Files
  • Issues 16
    • Issues 16
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 2
    • Merge Requests 2
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Commits
  • Issue Boards
  • Moritz Bunkus
  • MKVToolNixMKVToolNix
  • Wiki
  • Creating byte identical files

Creating byte identical files

Last edited by Moritz Bunkus Feb 24, 2016
Page history

Is it possible to create byte-identical files if the source files and the mux settings are identical?

The problem

Use cases could include muxing on different computers that already have copies of the source files without having to upload the resulting file itself.

The answer

Technically, it is possible, but mkvmerge does not allow this in an easy way. There are several elements in a Matroska file that differ with each muxing, even if everything else is the same between different mux runs. These include but are not limited to the muxing date (DateUTC) and all unique IDs (track UIDs, attachment UIDs, segment UIDs, chapter UIDs etc etc).

If you use different builds of MKVToolNix then you'll also have the WritingApp differ as it contains mkvmerge's version number and build timestamp. This may be the case e.g. if you want to mux on two different machines.

mkvmerge knows a switch that will use fixed values for all of the elements listed above. However, files created this way have serious issues: they violate the Matroska specifications, may cause problems during playback (especially with advanced features like segment linking, ordered chapters etc) and are not future-proof. The only reason this switch exists in the first place is that it is used for regression testing during mkvmerge's development. For this reason I will not name the switch here.

There is a solution if you're willing to run other software directly after the muxing process. What most people do if they want to have byte-identical files is mux the two files with identical settings and then use a file synchronization tool for copying only the differences between the two files. This is a pretty fast process as the amount of bytes the two resulting files differ by is very small.

There are several OpenSource programs that are suited perfectly for this job. On !Linux/Unix/Mac people usually use rsync. On Windows people usually use a native port of rsync called DeltaCopy. Another alternative for both operating systems is Unison.

Categories: merging

Clone repository
  • All tracks vanished after mkvpropedit, the header or chapter editors
  • Appimage for linux
  • Appending files vs. adding as additional parts
  • Automatic tag generation
  • Batch muxing with the gui
  • Characters (e.g. umlauts) aren't shown correctly
  • Chinese not selectable as language
  • Crash when adding attachments
  • Creating byte identical files
  • Cropping ignored
  • Dlls not found
  • Debugging gui startup problems
  • Default and forced flags and default yes no in the gui
  • Delay not shown in the gui
  • Detecting track language from filename
More Pages
×

New Wiki Page

Tip: You can specify the full path for the new file. We will automatically create any missing directories.