[Matroska-users] Newbie help please :)

Henti Smith henti at geekware.co.za
Sun Jan 10 17:08:33 CET 2010

Hi All,

Please be patient with me, I'm new to Matroska (3 days) and still
learning about how it works.

I'm writing a simple script to extract the wanted mpeg, ac3 and subtitle
streams out of DVD Tracks and then creating a simple .mkv file for use
in my media centre. This is done fairly easily using a combination of
lsdvd, mplayer, dvdxchap, mencoder and mkvmerge.

During the script execution I grab the first audio stream and any other
English audio streams, any English subtitles and the video stream. I
then put them all together like this :

mkvmerge -o movie.mkv --title "Movie Name" --chapters file.chapters
movie.avi  -A main.ac3 directors.ac3 --language 0:en --default-track
0:no movie.vobsubs.idx

This actual command is generated by the script. I've just created a
"typical" command. The chapters file is created by dvdxchap, the
movei.avi from mencoder -ovc copy, the audio from mplayer -dumpaudio and
subtitles with subtitle2vobsub

Depending on the audio and subtitles any number of audio and subtitles
can be included in the mkvmerge. This all works fairly well :)

What I'm trying to attempt is something I saw in this post :
http://savvyadmin.com/add-stereo-audio-tracks-to-mkv-files/ but is not
the same. In the last example it's shown that you can set a track-name.

When I've attempted this I've not been successful.

In the example it shows the following :

|*mkvmerge -o Cool.Movie.New.mkv Cool.Movie.mkv audio.mp3*
mkvmerge v2.4.1 ('Use Me') built on Dec 13 2008 21:03:46
'Cool.Movie.mkv': Using the Matroska demultiplexer.
'audio.mp3': Using the MP2/MP3 demultiplexer.
Warning: 'audio.mp3': Skipping 32 bytes at the beginning (no valid MP3
header found).
'Cool.Movie.mkv' track 1: Using the MPEG-4 part 10 (AVC) video output
'Cool.Movie.mkv' track 2: Using the AC3 output module.
'Cool.Movie.mkv' track 3: Using the text subtitle output module.
'audio.mp3' track 0: Using the MPEG audio output module.
The file 'Cool.Movie.New.mkv' has been opened for writing.
Progress: 100%
The cue entries (the index) are being written...
Muxing took 270 seconds.

It shows the mp3 file being added to the current mkv file to create a
new mkv file. When this happens mkvmegre labels the mpeg4 stream as
track 1, ac3 track 2, subtitle track 3.

If you look at the example mkvmerge command I use the subtitles are
track 0, this is because when I mkvmerge video,audio and subtitles, it's
all listed as track 0. I'm not sure how to change this, I've tried using
--track-order, but I'm unsure how it works.

Can anybody point out what I'm missing, since I'd like to be able to
mark the audio and subtitles at least with the correct information.


More information about the Matroska-users mailing list