Recommendation needed for alternative to MKVToolNix

Hi all.

I have been using MKVToolNix for a long time, but there appears to be 1 limitation that I can’t find a workaround - it cannot split a video file containing HEVC track.

I have explored all the splitting modes available, and all yielded the same error:

--- Errors emitted by job 'Multiplexing to file "ABC (1).mkv" in directory "/mnt/ABCXYZ"' started on 2025-03-05 06:00:40 +08:00 ---

The track ID 1 from the file '/mnt/ABCXYZ/ABC.mkv' cannot be split. Splitting tracks of this type is not supported.

So, I’m looking for an alternative to MKVToolNix to split such video files (which contains HEVC track), without re-encoding any track.

Thank you!

I would guess ffmpeg can do it.
Handbrake is the other one people seem to like.

Handbrake cannot remux.

Isn’t MKVToolNix based on ffmpeg as well?

No idea. First I ever heard of the tool is this thread.
It does not appear to count ffmpeg among its deps.

mkvtoolnix-gui depends on qt6-multimedia, which depends on qt6-multimedia-backend (which is also known as qt6-multimedia-ffmpeg), and that depends on ffmpeg.

Strangely though, mkvtoolnix-cli doesn’t seem to depend on ffmpeg (or any other app which requires ffmpeg) - it uses the individual libraries such as libmatroska, libvorbis etc:

pamac info mkvtoolnix-cli
Name                  : mkvtoolnix-cli
Version               : 89.0-3
Description           : Set of tools to create, edit and inspect Matroska files
URL                   : https://mkvtoolnix.download/
Licenses              : GPL2
Repository            : extra
Installed Size        : 20.4 MB
Groups                : --
Depends On            : boost-libs gcc-libs glibc libebml.so=5-64 libfmt.so=11-64 libmatroska.so=7-64 pugixml qt6-base libdvdread
                        libFLAC.so=14-64 libogg.so=0-64 libvorbis.so=0-64 zlib
Optional Dependencies : --
Provides              : --
Replaces              : --
Conflicts With        : --
Packager              : Christian Heusel <gromit@archlinux.org>
Build Date            : Thu 20 Feb 2025 21:01:34
Validated By          : MD5 Sum  SHA-256 Sum  Signature
1 Like

Does that mean it can split HEVC?

I dunno. It doesn’t seem to use any HEVC/H265 libraries, so it may not be able to process those files. I guess the best way to find out is to install it.

You will likely have some success using avidemux;

sudo pacman -S avidemux-cli avidemux-qt

For splitting video it’s easier than using MKVToolnix; regardless, I usually keep them both installed.

Regards.

Thanks for the recommendation.

Quick question:
I checked their website and Wikipedia, and realized that FLAC is not listed as supported audio format.
Is this correct?

What about opening an issue upstream? Issues · Moritz Bunkus / MKVToolNix · GitLab

I recall there was some chatter about adding FLAC encoding to Avidemux, in 2023; it was apparently on their “to do” list; but, I can’t say whether it’s currently supported.

If it isn’t, you can always re-encode the audio to a supported lossless codec with ffmpeg before you process it with Avidemux, something like;

ffmpeg -i video_flac_audio.mkv -c:v copy -c:a pcm_s16le video_pcm_audio.mkv

And then split it in copy mode with Avidemux (keeping an MKV container). When finished, you could then convert it to MKV/FLAC again, if FLAC audio is absolutely needed;

ffmpeg -i split_video_pcm_audio.mkv -c:v copy -c:a flac split_video_flac_audio.mkv

I’d suggest to double-check these examples with the ffmpeg documentation as it’s been a while since I’ve used it.

Regards.

This approach is not really feasible for large batch processing.
I’m really looking for a simpler approach, without re-encoding any track.

Thanks for your suggestion though.

I’m more looking for an immediate solution…

I experimented with the CLI version, and bumped into this:

Error: The file 'abc.mkv' could not be opened for reading: open file error.

The command I used:
mkvmerge -o abc2.mkv --split parts:00:02:36.156250000- abc.mkv
:man_facepalming:

I just tried the same command on an .mkv file and it worked. Were you running the command from within the directory? Or, as mkv is a container, maybe the video is encoded in a format that mkvmerge cannot read?

Yup, this is confirmed.

The video is HEVC.
The audio is FLAC 2.0.
The subtitle is PGS.

MKVToolNix GUI can perform normal remux operation, as long as splitting is not involved.
And that is why I attempted the CLI, in the hope that it can bypass the issue.

Perhaps kdenlive might be an option for you.

It supports FLAC audio and video splitting, according to the blurbs found online.

Good luck.

I played with kdenlive years ago, and I have an impression that it did not support remux.

Following your recommendation, I tried it again, and it does support splitting HEVC and FLAC now.
The final output is kinda messy, and it also removed some metadata of the tracks.

Its UI is kinda complicated, and I ended up using its CLI command.
And the CLI is based on ffmpeg
(which made me wonder: If I use ffmpeg earlier, then I would have settled the issue earlier?)

Nevertheless, the work was completed.

Many thanks for your recommendation!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.