Category Archives: Matroska

MKVToolNix v11.0.0 released

Here’s release v11.0.0 of MKVToolNix. There have been several important bug fixes to the HEVC/h.265 and AVC/h.264 parsers. Among the fixed bugs are some that will silently produce invalid files. I therefore recommend everyone to update.

This release includes a couple of smaller enhancements to the GUI as well. Noteworthy is the implementation of features that have been requested several in the past: playing a sound or shutting down the computer after the current job’s been completed. The implementation is very flexible and not limited to those two actions, though.

There have been several changes the package maintainers should be aware of, see the section “build system changes” below.

You can download the source code or one of the binaries. The Windows and macOS binaries have been built already and are available for download. The Linux binaries will be available later today.

Here’s the NEWS since the previous release:

New features and enhancements

  • mkvmerge: FLAC reader: added support for handling embedded pictures as attachments. Implements #1942.
  • mkvmerge: MP4 reader: merged pull request #1804 adding support for parsing the "COLR" atom and including its values as track headers.
  • MKVToolNix GUI: watch jobs: the user can now have the GUI execute an action once as soon as the current job or the whole queue finishes. The actions are the same ones that can be configured to be run automatically after job or queue completion.
  • MKVToolNix GUI: implemented several built-in actions that can be executed either on special events or once via the "watch jobs" tool. These are: playing an audio file (implemented for all operating systems); hibernating, sleeping and shutting down the computer (only implemented for Windows and for Linux systems using systemd).
  • MKVToolNix GUI: multiplex tool: added a new option for what to do after starting to multiplex/adding to the job queue: "close current settings" will close the current multiplex settings without opening new ones.

Bug fixes

  • mkvmerge: AAC parser: fixed mis-detection of certain data as valid ADTS AAC headers resulting in memory allocation failures. Fixes #1941.
  • mkvmerge: AVC/h.264 parser: mkvmerge will now ignore bogus timing information in the sequence parameter sets (values indicating more than 100000 progressive frames per second). Fixes #1946.
  • mkvmerge: AVC/h.264 & HEVC/h.265 parsers: all trailing zero bytes will now be removed from NALUs. Fixes #1952.
  • mkvmerge: HEVC/h.265 parser: fixed copying the `bitstream_restriction_flag` and all dependent fields in the VUI parameters of the sequence parameter sets. Fixes #1924.
  • mkvmerge: HEVC/h.265 parser: fixed the calculation of the number of parameter set arrays in the HEVCC data structure stored in CodecPrivate. Fixes the video-related part of #1938.
  • mkvmerge: HEVC/h.265 parser: fixed writing superfluous and uninitialized bytes at the end of the HEVCC data structure stored in CodecPrivate. Another fix for the video-related part of #1938.
  • mkvmerge: HEVC/h.265 parser: fixed the assumption that the HEVCC data structure always includes arrays for all parameter set types (VPS, SPS, PPS and SEI), and that the order is always VPS → SPS → PPS → SEI. Instead now only the arrays actually present are parsed, and they can be in any order. This fixes mkvinfo’s output for Matroska files created from files such as the one from #1938.
  • mkvmerge: AVC/h.264 packetizer: when reading a framed track (e.g. from Matroska or MP4 files), specifying a default duration as fields (e.g. `50i`) would result in double the actual duration for each frame and the track’s default duration header field. Fixes #1916.
  • mkvmerge: Matroska reader: invalid track language elements are now treated as if they were set to `und` = "undetermined". See #1929 for context.
  • mkvmerge: MPEG TS reader, AAC: mkvmerge will now require five consecutive AAC headers with identical parameters before track type determination is considered valid. This avoids false positives and consequently wrong track parameters. Fixes the audio-related part of #1938.
  • mkvmerge: fixed an endless loop in certain circumstances when splitting by `parts` or `parts-frames` and the start of the file is discarded. Fixes #1944.
  • MKVToolNix GUI: multiplexer tool: the "show command line" dialog will no longer include the mkvmerge executable’s location as the first argument for the two "MKVToolNix option files" escape modes. Fixes #1949.
  • MKVToolNix GUI, header editor: empty track language elements are now treated the same as those set to invalid ISO 639-2 codes: as if they were set to `und` = "undetermined". See #1929 for context.

Build system changes

  • bug fix: configure now looks for the `strings` binary by using the `AC_CHECK_TOOL()` autoconf macro. That way it will be found in multiarch setups, too. Fixes #1923.
  • bug fix: the environment variable USER_CXXFLAGS was accidentally removed from the compiler flags in release 9.8.0. It’s been re-added. Fixes #1925.
  • The `.desktop` files have been renamed to `org.bunkus.mkvtoolnix-gui.desktop` and `org.bunkus.mkvinfo.desktop`. This allows Wayland compositors to associate the correct icons with running applications for e.g. task switchers. Fixes #1948.
  • Qt’s multimedia component is required for compilation of the GUIs since version 11.0.0.

Have fun :)

MKVToolNix v10.0.0 released

Another month, another release of MKVToolNix: v10.0.0. It’s solely a bug fix release, and the number of fixes in this release is on the small side.

Nothing’s changed for packagers.

You can download the source code or one of the binaries. The Windows and macOS binaries have been built already and are available for download. The Linux binaries will be available later today.

Here’s the NEWS since the previous release:

New features and enhancements

  • mkvmerge: AVC/h.264 parser: mkvmerge will now drop all frames before the first key frame as they cannot be decoded properly anyway. See #1908.
  • mkvmerge: HEVC/h.265 parser: mkvmerge will now drop all frames before the first key frame as they cannot be decoded properly anyway. See #1908.
  • mkvmerge: HEVC/h.265 parser: added a workaround for invalid values for the "default display window" in the VUI parameters of sequence parameter sets. Fixes #1907.

Bug fixes

  • mkvmerge: MP4 reader: fixed track offsets being wrong in certain situations regarding the presence or absence of edit lists (‘elst’ atoms) & composition timestamps (‘ctts’ atoms). Fixes #1889.
  • mkvmerge: MP4 reader: offsets in "ctts" are now always treated as signed integers, even with version 0 atoms.
  • mkvinfo: the timestamps of SimpleBlocks with negative timestamps are now shown correctly.
  • mkvmerge: Matroska reader: fixed handling BlockGroups and SimpleBlocks with negative timestamps.
  • mkvmerge: MP3 packetizer: the MP3 packetizer will no longer drop timestamps from source containers if they go backwards. This keeps A/V in sync for files where the source was in sync even though their timestamps aren’t monotonic increasing. Fixes #1909.
  • mkvmerge: AVC/h.264 parser: mkvmerge will now drop timestamps from the source container if no frame is emitted for that timestamp. Fixes #1908.
  • mkvmerge: HEVC/h.265 parser: mkvmerge will now drop timestamps from the source container if no frame is emitted for that timestamp. Fixes the HEVC equivalent of the problem with AVC described in #1908.
  • mkvextract: SSA/ASS: fixed extraction when the "Format" line in the "[Events]" section contains less fields than the default for SSA/ASS would indicate. Fixes #1913.

Have fun :)

MKVToolNix v9.9.0 released

It’s time for v9.9.0 of MKVToolNix. This is mostly a bug fix release. Especially the MP4 input module has received a lot of love. See below for details.

Important note for packagers: pre-built man pages are no longer included. Instead they’re built during compilation requiring xsltproc, the DocBook XSL stylesheets. Additionally the system version of pugixml can now be used. See the news below for details.

You can download the source code or one of the binaries. The Windows and Mac OS binaries have been built already and are available for download. The Linux binaries will be available later today.

Here’s the NEWS since the previous release:

New features and enhancements

  • GUI: chapter editor: added a character set selection in the preferences for text files. If a character set is selected there, it will be used instead of asking the user when opening text chapter files. Implements #1874.
  • GUI: multiplexer: added a column "character set" to the "tracks, chapters and tags" list view showing the currently selected character set for that track. Implements #1873.
  • mkvmerge: added an –engage option "all_i_slices_are_key_frames" for treating all I slices of an h.264/AVC stream as key frames in pathological streams that lack real key frames. Implements #1876.
  • GUI: running programs after jobs: added a new variable <MTX_INSTALLATION_DIRECTORY> for the directory the MKVToolNix GUI executable is located in.
  • mkvmerge: DVB subtitle tracks whose CodecPrivate data is only four bytes long will now be fixed up to the proper five bytes by adding the subtitling type byte.
  • mkvmerge: MP4 reader: "ctts" version 1 atoms are now supported.

Bug fixes

  • mkvmerge: AC-3 handling: some source files provide timestamps for audio tracks only once every n audio frames. In such situations mkvmerge was buffering too much data resulting in a single gap in the timestamps of one frame duration after frame number n – 1 (the second audio timestamp read from the source file was used one output frame too early). Fixes #1864.
  • mkvmerge: MP4 reader: mkvmerge was only reading a small part of MP4 DASH files where the first "moov" "mdat" atoms occur before the first "moof" atom. This is part of the fix for #1867.
  • mkvmerge: MP4 reader: edit list ("edts" atoms) that are part of the "moof" atoms used in MP4 DASH files weren’t parsed. Instead the edit lists from the main track headers inside the "moov" atom were used. This is part of the fix for #1867.
  • mkvmerge: MP4 reader: when an MP4 DASH file contained both normal chunk offset table ("stco"/"co64" atoms) in their regular "moov" atoms, a sample-to-chunk table ("stsc" atom) whose last entry had a "samples per chunk" count greater than 1 and DASH "trun" atoms, then mkvmerge was calculating wrong positions the frame content. This is part of the fix for #1867.
  • mkvmerge: MP4 reader: mkvmerge couldn’t deal with the key frame index table having duplicate entries. The result was that only key frames up to and including the first duplicate entry were marked as key frames in the output file. All other frames weren’t, even though some of them were referenced from the key frame table after the first duplicate entry. This is part of the fix for #1867.
  • mkvmerge: MP4 reader: when an MP4 file contained more than one copy of the "moov" atom (the track headers etc.), mkvmerge was parsing them all adding tracks multiple times. Fix for #1877.
  • mkvmerge: MP4 reader: fixed an integer overflow during the timestamp calculation leading to files with wrong timestamps. Such files could not be played back properly by most players. Fixes #1883.
  • mkvmerge: MPEG TS reader: if the PMT lists a DVBSUB track, mkvmerge will now recognize it without having to find a packet for it within the probed range.
  • mkvmerge: splitting by parts (both the "timestamps" and the "frames" variants): fixed the calculation of track statistics tags. When calculating the duration the skipped portions weren’t taken into account leading to a too-high duration. As a consequence the BPS tag (bits per second) was wrong, too. Fixes #1885.
  • mkvmerge: reading files with DVB/HDMV TextSV subtitle tracks with invalid CodecPrivate caused mkvmerge to abort with an error from boost::format about the format string not having enough arguments. Fixes #1894.
  • mkvmerge: fixed misdetection of certain AC-3 files as MP3 files which led to an error message that "the demultiplexer could not be initialized".
  • mkvmerge: fixed huge memory consumption when appending big Matroska files with sparse tracks (e.g. forced subtitle tracks). The Matroska reader will now queue at most 128 MB of data. Fixes #1893.
  • mkvmerge: MP4 reader: the timestamps of all multiplexed tracks will now be 0-based properly.
  • mkvmerge: MP4 reader: the DTS-to-PTS offsets given by the "ctts" atoms are now applied for all tracks containing a "ctts" atom, not just h.264 & h.265 tracks.

Build system changes

  • Up to and including release 9.8.0 the man pages and their translations came pre-built and bundled with the source code. Those pre-built files have now been removed and must be built during the build process. Therefore the tool "xsltproc" and the DocBook XSL stylesheets for man pages are now required dependencies. Additionally the tool "po4a" must be installed for the translated man pages to be built and installed, though this is optional. In order to facilitate finding the new requirements new options have been added to confiure: "–with-xsltproc=prog", "–with-docbook-xsl-root=dir", "–with-po4a=prog" and "–with-po4a-translate=prog.
  • pugixml detection will be attempted via "pkg-config" first. If that fails, "configure" will fall back to the previous method of trying just to compile and link a test program with the standard include and library locations. Implements #1891.

Have fun :)

MKVToolNix v9.8.0 released

A nice new release is here, v9.8.0. Couple of enhancements, a couple of bug fixes, especially for the new caching functionality introduced in 9.7.0. I recommend upgrading.

Notes for package maintainers: important changes were made to the build process. Please see the NEWS section below for details (both the “important news” and the “build system changes” sections).

You can download the source code or one of the binaries. The Windows and Mac OS binaries have been built already and are available for download. The Linux binaries will be available later today.

Here’s the NEWS since the previous release:

Important notes

  • build system: the included version of the "drake" build tool has been removed. Since Ruby 2.1 rake has supported parallel builds, too. The MKVToolNix build system has been adjusted to enable parallel builds by default.

New features and enhancements

  • mkvmerge: VobSub in Matroska: mkvmerge will now create and use a default index for VobSub tracks read from Matroska files that are missing their CodecPrivate element (which normally contains said index). Implements #1854.
  • GUI: added checks for several common problems with the installation. These checks will be executed when the GUI starts, and any problems will be reported to the user.
  • mkvmerge: added the ISO 639-2 language codes "qaa" and "qad" (both are titled "reserved for local use") as both are used often in France. See #1848 for more information.
  • mkvmerge: the JSON identification result now includes a track’s codec delay if set (only for Matroska source files). The JSON schema version has been bumped to 6.
  • mkvmerge: MPEG TS: added a workaround for files where the subtitle packets are multiplexed properly, but where their timestamps are way off from the audio and video timestamps. Implements #1841.
  • mkvmerge: added support for Digital Video Broadcasting (DVB) subtitles (CodecID `S_DVBSUB`). They can be read from MPEG transport streams and from Matroska files. Implements #1843.

Bug fixes

  • mkvmerge: MP4 reader: when an MP4 file contained fewer entries for timestamps than frames (which they never should), mkvmerge would use 0 as the timestamp for all the other frames. This resulted in effects such as the last frame of an output file having a timestamp of 0 and in split files having a much longer duration than they should have. Fixes #1847.
  • GUI: the cache cleanup process that’s run automatically when the GUI starts no longer blocks file identification until it is finished. Additionally the process will only be run once per release of MKVToolNix. Fixes #1860.
  • GUI: certain failures during file identification that can be traced to broken installations (e.g. mkvmerge being too old) won’t be stored in the cache anymore. Without this fix the GUI would still use the cached failed identification result even though the underlying might have already been fixed.
  • mkvmerge: fixed that the error message "not enough space on disk" was shown twice on some operating systems. Fixes #1850.
  • mkvmerge, Matroska: if a codec delay is set for a track in the input file, it is kept. Fixes #1849.
  • GUI: multiplexer: changing default values in the preferences (e.g. the default track language to set) did not affect files whose identification results had already been cached.
  • mkvmerge, MP4: fixed detection of MP3 audio when the object type ID in the ESDS signals MP2 and the track headers have invalid values for number of channels or sampling frequency. Fixes #1844.

Build system changes

  • nlohman json-cpp: configure now looks for a system-wide installed version of the nlohmann json-cpp header-only library. If one is found, it is used; otherwise the included version will be used. Implements #1858.
  • If MKVToolNix is built with rake v10.0.0 or newer, its "multitask" feature will be turned on allowing automatic parallel builds.
  • CURL is no longer used by MKVToolNix and is therefore not required for building anymore.

Other changes

  • GUI: the update check now uses Qt’s networking classes instead of CURL.
  • The command line option "–check-for-updates" has been removed, even though the deprecation warning in release 9.7.0 stated that it would be removed in 2018.

Have fun :)