Binary to easily generate a Matroska file from multiple inputs.
This ain’t a golang library for matroska files, nor an alternative to mkvmerge, but an utility to easily create mkvmerge commands from various input files.
A command like:
remuxing -output output.mkv -languages spa,eng input1.mkv input2.mkv
Generates this mkvmerge command (expanded here for ease of reading):
-o output.mkv \
-A -T -S -d 0 input2.mkv \
-T --default-track 1 --language 1:spa -a 1 --track-name 1: -D -S input1.mkv \
-T --language 1:eng -a 1 --track-name 1: -D -S input2.mkv \
-T -s 3 --track-name 3: -D -A --forced-track 3:true input1.mkv \
-T -s 4 --track-name 4: -D -A input1.mkv \
-T -s 5 --track-name 5: -D -A input1.mkv
remuxing [options] [inputs]
Note that you can define as many inputs as you want. The input order is important, as it designates files’ priority, used to decide between inputs in case both seem to be of the same quality & codec.
You need mkvtoolnix package installed in your system. If you’re under windows, ensure you add the mkvtoolnix binary folder to your PATH environment var.
If you have golang in your system, simply do:
go get github.com/elboletaire/remuxing
go run github.com/elboletaire/remuxing [options] [inputs]
Otherwise, you can download any of the available built binaries from the gitlab copy: