If you want to compile the tools yourself then you must first decide if you want to use a 'proper' release version or the current development version. As both Matroska and MKVToolNix are under heavy development there might be features available in the Git source code repository that are not available in the releases. On the other hand the Git source code repository version might not even compile.
Requirements
In order to compile MKVToolNix you need a couple of libraries and programs. Most of them should be available pre-compiled for your distribution. The libraries you absolutely need are:
- libebml and libmatroska for low-level access to Matroska files. Instructions on how to compile them are a bit further down on this page.
- expat -- a light-weight XML parser library
- libOgg and libVorbis for access to Ogg/OGM files and Vorbis support
- zlib -- a compression library
- Boost v1.46.0 and newer -- portable C++ libraries
- Ruby -- a programming language. The build system uses it.
Other libraries are optional and only limit the features that are built. These include:
- wxWidgets 2.8.0 and newer -- a cross-platform GUI toolkit. You need this if you want to use mmg (the mkvmerge GUI) or mkvinfo's GUI.
- libFLAC for FLAC support (Free Lossless Audio Codec)
- lzo and bzip2 are compression libraries. These are the least important libraries as almost no application supports Matroska content that is compressed with either of these libs. The aforementioned zlib is what every program supports.
libmatroska and libebml
Start with the two libraries. Either get libebml 1.2.2 and libmatroska 1.3.0 or a fresh copy from the Subversion repository.
svn co https://svn.matroska.org/svn/matroska/trunk/libebml svn co https://svn.matroska.org/svn/matroska/trunk/libmatroska
Change to libebml/make/linux and run
make staticlib. If you have root-access then
run make install_staticlib install_headers
as root in order to install the files. Change
to libmatroska/make/linux. Once more run
make staticlib. If you have root-access then
run make install_staticlib install_headers
as root in order to install the files.
MKVToolNix
Either download the release 5.5.0 and unpack it or get a fresh copy from my Git source code repository by running the following command:
git clone git://github.com/mbunkus/mkvtoolnix.git
You can also browse the Git repository online.
The source code for all older releases is available from the sources directory.
Additional step if you're using the development version:
change to the mkvtoolnix directory and run
./autogen.sh which will generate
the configure script. The autoconf needs
to be installed for this step.
If you have run make install_staticlib for both
libraries then configure should automatically find the
libraries' position. Otherwise you need to
tell configure where the
libmatroska and libebml sources are:
./configure \ --with-extra-includes=/where/i/put/libebml\;/where/i/put/libmatroska \ --with-extra-libs=/where/i/put/libebml/make/linux\;/where/i/put/libmatroska/make/linux
Now run ./drake. You can create a Matroska file with
mkvmerge -o output.mkv input1.avi input2.ac3 input3.ogg ...
At the moment the following sources are supported (this list is
OUTDATED):
- AVI files with MPEG4 video and MP3, AC3 or PCM audio
- external AC3, MP3, WAV, DTS and AAC/MP4 files
- Ogg/OGM files with all the stuff mentioned above AND Vorbis audio :)
- Subtitle Ripper text subtitle (e.g. those created with Subtitle Ripper)
- SSA/ASS files (a bit limited at the moment)
- Matroska files themselves
- RealMedia files (both RealVideo and RealAudio)
- Chapters, tags, attachments
Debian/Ubuntu package
Building binary packages for Debian and Ubuntu either from my Git
sources or from a release tarball is pretty easy. The following
steps assume that you're not root but may
use sudo.
First install a couple of packages needed for building MKVToolNix:
sudo apt-get install debhelper \ libogg-dev libvorbis-dev libwxgtk2.8-dev libexpat1-dev zlib1g-dev \ liblzo2-dev libbz2-dev libflac-dev libmagic-dev libboost-dev \ libboost-regex-dev libboost-filesystem-dev libboost-system-dev \ libebml-dev libmatroska-dev libcurl4-gnutls-dev autoconf git-core ruby
Next download either the sources from my Git repository or a release tarball, rename one of its sub-directories, call a helper script and lastly build the packages themselves. For Git the steps are the following:
git clone git://github.com/mbunkus/mkvtoolnix.git mkvtoolnix-5.5.0 cd mkvtoolnix-5.5.0 rm -rf .git mv debian-upstream debian ./autogen.sh cd .. tar -c -f - mkvtoolnix-5.5.0 | bzip2 > mkvtoolnix_5.5.0.orig.tar.bz2 cd mkvtoolnix-5.5.0 dpkg-buildpackage -b -rfakeroot
For a release tarball, e.g. v5.5.0, you have to do the following:
wget -O mkvtoolnix_5.5.0.orig.tar.bz2 http://www.bunkus.org/videotools/mkvtoolnix/sources/mkvtoolnix-5.5.0.tar.bz2
tar xjf mkvtoolnix_5.5.0.orig.tar.bz2
cd mkvtoolnix-5.5.0
mv debian-upstream debian
dpkg-buildpackage -b -rfakeroot
Afterwards the two new packages mkvtoolnix
and mkvtoolnix-gui will have been built in the same
directory the source code directory (mkvtoolnix-5.5.0)
is in.
RSS