home *** CD-ROM | disk | FTP | other *** search
/ Multimedia-Photo & Your Disk / Image.iso / Data / soft / 104 / mkvtoolnix-unicode-2.1.0-setup.exe / doc / README.txt < prev    next >
Encoding:
Text File  |  2007-08-19  |  6.4 KB  |  179 lines

  1. MKVToolNix 2.1.0
  2. ================
  3.  
  4. With these tools one can get information about (mkvinfo) Matroska
  5. files, extract tracks/data from (mkvextract) Matroska files and create
  6. (mkvmerge) Matroska files from other media files. Matroska is a new
  7. multimedia file format aiming to become THE new container format for
  8. the future. You can find more information about it and its underlying
  9. technology, the Extensible Binary Meta Language (EBML), at
  10.  
  11. http://www.matroska.org/
  12.  
  13. The full documentation for each command is now maintained in its
  14. man page only. Type 'mkvmerge -h' to get you started.
  15.  
  16. This code comes under the GPL (see www.gnu.org or the file COPYING).
  17. Modify as needed.
  18.  
  19. The newest version can always be found at
  20. http://www.bunkus.org/videotools/mkvtoolnix/
  21.  
  22. Moritz Bunkus <moritz@bunkus.org>
  23.  
  24. Installation
  25. ------------
  26.  
  27. If you want to compile the tools yourself then you must first decide
  28. if you want to use a 'proper' release version or the current
  29. development version. As both Matroska and MKVToolNix are under heavy
  30. development there might be features available in the Subversion
  31. repository that are not available in the releases. On the other hand
  32. the Subversion repository version might not even compile.
  33.  
  34. * Requirements
  35.  
  36. In order to compile MKVToolNix you need a couple of libraries. Most of
  37. them should be available pre-compiled for your distribution. The
  38. libraries you absolutely need are:
  39.  
  40. - libebml and libmatroska for low-level access to Matroska files.
  41.   Instructions on how to compile them are a bit further down in this
  42.   file.
  43. - expat ( http://expat.sourceforge.net/ ) -- a light-weight XML
  44.   parser library
  45. - libOgg ( http://downloads.xiph.org/releases/ogg/ ) and libVorbis
  46.   ( http://downloads.xiph.org/releases/vorbis/ ) for access to Ogg/OGM
  47.   files and Vorbis support
  48. - zlib ( http://www.zlib.net/ ) -- a compression library
  49.  
  50. Other libraries are optional and only limit the features that are
  51. built. These include:
  52.  
  53. - wxWidgets ( http://www.wxwidgets.org/ ) -- a cross-platform GUI
  54.   toolkit. You need this if you want to use mmg (the mkvmerge GUI) or
  55.   mkvinfo's GUI.
  56. - libFLAC ( http://downloads.xiph.org/releases/flac/ ) for FLAC
  57.   support (Free Lossless Audio Codec)
  58. - lzo ( http://www.oberhumer.com/opensource/lzo/ ) and bzip2 (
  59.   http://www.bzip.org/ ) are compression libraries. These are the
  60.   least important libraries as almost no application supports Matroska
  61.   content that is compressed with either of these libs. The
  62.   aforementioned zlib is what every program supports.
  63.  
  64. * Building libmatroska and libebml
  65.  
  66. Start with the two libraries. Either get libebml 0.7.7 from
  67. http://dl.matroska.org/downloads/libebml/ and libmatroska 0.8.0 from
  68. http://dl.matroska.org/downloads/libmatroska/ or a fresh copy from the
  69. Subversion repository:
  70.  
  71. svn co https://svn.matroska.org/svn/matroska/trunk/libebml
  72. svn co https://svn.matroska.org/svn/matroska/trunk/libmatroska
  73.  
  74. Change to "libebml/make/linux" and run "make staticlib". If you have
  75. root-access then run "make install_headers install_staticlib" as
  76. "root" in order to install the files. Change to
  77. "libmatroska/make/linux". Once more run "make staticlib". If you have
  78. root-access then run "make install_headers install_staticlib" as
  79. "root" in order to install the files.
  80.  
  81. Note that if you don't want the libraries to be installed in
  82. /usr/local/lib and the headers in /usr/local/include then you can
  83. alter the prefix (which defaults to /usr/local) by adding an argument
  84. "prefix=/usr" to the install "make" command. Example:
  85.  
  86. make prefix=/usr install_headers install_staticlib
  87.  
  88. * Building MKVtoolNix
  89.  
  90. Either download the release 2.0.2 from
  91. http://www.bunkus.org/videotools/mkvtoolnix/sources/mkvtoolnix-2.0.2.tar.bz2
  92. and unpack it or get a fresh copy from my Subversion repository.  All
  93. you need for Subversion repository access is to download a Subversion
  94. client from the Subversion homepage at http://subversion.tigris.org/ .
  95. There are clients for both Unix/Linux and Windows. It basically works
  96. like CVS. So the typical way to check out a fresh copy looks like
  97. this:
  98.  
  99. svn co https://svn.bunkus.org/mosu/trunk/prog/video/mkvtoolnix
  100.  
  101.     Additional step if you're using the development version from the
  102.     Subversion respository:
  103.  
  104.     Change to the MKVtoolNix directory and run "./autogen.sh" which
  105.     will generate the "configure" script.
  106.  
  107. If you have run "make install" for both libraries then "configure"
  108. should automatically find the libraries' position. Otherwise you need
  109. to tell "configure" where the "libebml" and "libmatroska" include and
  110. library files are:
  111.  
  112. ./configure \
  113.   --with-extra-includes=/where/i/put/libebml\;/where/i/put/libmatroska \
  114.   --with-extra-libs=/where/i/put/libebml/make/linux\;/where/i/put/libmatroska/make/linue
  115.  
  116. Now run "make" and, as "root", "make install".
  117.  
  118. Example
  119. -------
  120.  
  121. Here's a *very* brief example of how you could use mkvmerge
  122. with mencoder in order to rip a DVD:
  123.  
  124. a) Extract the audio to PCM audio:
  125.  
  126. mplayer -ao pcm:file=audio.wav -vo null -vc dummy dvd://1
  127.  
  128. b) Normalize the sound (optional)
  129.  
  130. normalize audio.wav
  131.  
  132. c) Encode the audio to Vorbis:
  133.  
  134. oggenc -q3 -oaudio-q3.ogg audio.wav
  135.  
  136. d) Somehow calculate the bitrate for your video. Use something like...
  137.  
  138. video_size = (target_size - audio-size) / 1.005
  139. video_bitrate = video_size / length / 1024 * 8
  140.  
  141. target_size, audio_size in bytes
  142. length in seconds
  143. 1.005 is the overhead caused by putting the streams into an Matroska file
  144.   (about 0.5%, that's correct ;)).
  145. video_bitrate will be in kbit/s
  146.  
  147. e) Use the two-pass encoding for the video:
  148.  
  149. mencoder -oac copy -ovc lavc \
  150.   -lavcopts vcodec=mpeg4:vbitrate=1000:vhq:vqmin=2:vpass=1 \
  151.   -vop scale=....,crop=..... \
  152.   -o /dev/null dvd://1
  153.  
  154. mencoder -oac copy -ovc lavc \
  155.   -lavcopts vcodec=mpeg4:vbitrate=1000:vhq:vqmin=2:vpass=2 \
  156.   -vop scale=....,crop=..... \
  157.   -o movie.avi dvd://1
  158.  
  159. f) Merge:
  160.  
  161. mkvmerge -o movie.mkv -A movie.avi audio-q3.ogg
  162.  
  163. -A is necessary in order to avoid copying the raw PCM (or MP3) audio as well.
  164.  
  165. Bug reports
  166. -----------
  167.  
  168. If you're sure you've found a bug - e.g. if one of my programs crashes
  169. with an obscur error message, or if the resulting file is missing part
  170. of the original data, then by all means submit a bug report.
  171.  
  172. I use Bugzilla (https://www.bunkus.org/bugzilla/) as my bug
  173. database. You can submit your bug reports there. Please be as verbose
  174. as possible - e.g. include the command line, if you use Windows or
  175. Linux etc.pp. If at all possible please include sample files as well
  176. so that I can reproduce the issue. If they are larger than 1M then
  177. please upload them somewhere and post a link in the Anthill bug
  178. report.
  179.