Matroska

From MukeWiki
MKVToolNix documentation
mkvmerge Merge multimedia streams into a Matroska file mkvmerge(1)
mkvinfo Print information about elements in Matroska files mkvinfo(1)
mkvextract Extract tracks from Matroska files into other files mkvextract(1)
mkvpropedit Modify properties of existing Matroska files without a complete remux mkvpropedit(1)
NOTE All commands provided by mkvtoolnix RPM package

Datetime

By default mkvmerge sets the date (element in the category "segment information") to the time and date when multiplexing started.

$ exiftool '-DateTimeOriginal'                movie.mkv   # no writable tag for exiftool
Date/Time Original              : 2014:12:17 21:59:58Z
$ exiftool '-DateTimeOriginal<FileModifyDate' movie.mkv
Error: Writing of MKV files is not yet supported
$ exiftool '-FileModifyDate<DateTimeOriginal' movie.mkv
    1 image files updated
$ mkvinfo movie.mkv | grep -i Date
| + Date: 2014-12-17 21:59:58 UTC
$ mkvmerge --identification-format json --identify movie.mkv | grep -i date
      "date_local": "2014-12-17T22:59:58+01:00",
      "date_utc": "2014-12-17T21:59:58Z",
$ mkvmerge -J movie.mkv   # -J is a convenient alias for --identification-format json --identify
$ mkvpropedit --list-property-names | grep -i date
$ mkvpropedit movie.mkv --edit info --delete "date" --verbose
$ mkvpropedit movie.mkv --edit info --set "date=2024-03-22T17:18:19Z" --verbose

By default mkvpropedit will edit the "segment information" section. The segment information can be selected with one of these three words: info, segment_info or segmentinfo. It contains properties like the segment title, the segment UID or date.

$ mkvpropedit movie.mkv --set "date=2024-03-22T17:18:19Z" --verbose
$ mkvpropedit movie.mkv --delete "date"  --verbose
$ mkvpropedit movie.mkv --delete "title" --verbose

The recognized format is YYYY-mm-ddTHH:MM:SS+zz:zz; example: 2017-03-28T17:28:00-02:00. The letter Z can be used instead of the time zone's offset from UTC to indicate UTC aka Zulu time.

Subtitles