PDA

View Full Version : matroska - multiple video streams


sterlina
4th December 2004, 14:53
I'm actually trying to mux more video streams (and their audio streams) in a matroska file without any success, does someone arrived to do it?

more explains:
imagine having "video1" and "video2", with "audio1" and "audio2".

what I would like to do is muxing them in only one file as: (video1+audio1)+(video2+audio2)
so that when played the player will play first video1 (and audio1) and when finished video2 (adio2).

I've tryed to do with mkvtoolnix 1.0 but when I play the file I got two windows together and not one after the other (maybe wrong settings??)


of course I know I could do a video file "video=video1+video2" but in that case I have to recompress (bad!) and I would like if there is an other way.


some suggestion please :confused:

ĪsterĪ

ChristianHJW
5th December 2004, 00:21
You are waiting for control tracks, like so many others. Sorry there has been no progress on that for months now, menues have been in the focus instead ....

sterlina
5th December 2004, 23:33
@ChristianHJW
I was thinking that "control track" was necessary for a menu to work... so if I've understood menues will have only options for subtitles/audio/... and not videos?
that's strange to me :confused: but as I'm not developper I can be disappointed but that's my personal opinion

sterlina
5th December 2004, 23:34
(forget...)
at least I've learned sometingh about "control tracks" (didn't even know those words before!!):D

stephanV
6th December 2004, 10:12
Originally posted by sterlina
I'm actually trying to mux more video streams (and their audio streams) in a matroska file without any success, does someone arrived to do it?

more explains:
imagine having "video1" and "video2", with "audio1" and "audio2".

what I would like to do is muxing them in only one file as: (video1+audio1)+(video2+audio2)
so that when played the player will play first video1 (and audio1) and when finished video2 (adio2).

Heh? why would you need control tracks for this? Unless the characterisitcs of both video streams are different, this would be nothing more than just joining the two files. But yeah, perhaps you could provide us with more info?

bond
7th December 2004, 00:02
Originally posted by stephanV
Unless the characterisitcs of both video streams are different, this would be nothing more than just joining the two files. But yeah, perhaps you could provide us with more info?him i think with this of course I know I could do a video file "video=video1+video2" but in that case I have to recompress (bad!) and I would like if there is an other way.he meant that the two streams are different and cant be just joined

robUx4
7th December 2004, 22:34
On topic: The Matroska solution already exists, have been included in the specs from day one and we have working code for it. Christian is not a coder nor aware of all the possibilities of the specs.

sterlina
7th December 2004, 22:50
Originally posted by stephanV
Heh? why would you need control tracks for this? Unless the characterisitcs of both video streams are different, this would be nothing more than just joining the two files. But yeah, perhaps you could provide us with more info? The problem is exactly that, even if the two are both coded XviD, audio is different and the second has subtitles (the first one is something like an introduction...). More important they have not only different size but also different aspect ratio so it is not so cool to join them... I'll have to code again with black borders in one.
The idea of mux both in a one file, although keeping them "separated" would have resolved the problem of saving them (one file cannot be separated) watching (you got always the two) and, eventually, demux without problems.

Originally posted by robUx4
The Matroska solution already exists, have been included in the specs from day one and we have working code for it. Christian is not a coder nor aware of all the possibilities of the specs.This year I'll start c/c++ studies.... hope I can give an hand in future (...far future...)

Atamido
8th December 2004, 15:16
Originally posted by sterlina
I'm actually trying to mux more video streams (and their audio streams) in a matroska file without any success, does someone arrived to do it?

more explains:
imagine having "video1" and "video2", with "audio1" and "audio2".

what I would like to do is muxing them in only one file as: (video1+audio1)+(video2+audio2)
so that when played the player will play first video1 (and audio1) and when finished video2 (adio2). It sounds like you just want to append the files. If the video and audio are the same type/resolution, then you should be able to append them using AVI Mux GUI.

If the videos are different types, then please check out the latest version of Haali's Matroska Splitter (http://forum.doom9.org/showthread.php?s=&postid=578872#post578872) that supports * Multisegment files support, you can produce those by running copy /b file1.mkv + file2.mkv multiseg.mkv So, if you get both of the files into an MKV, you can quickly append them this way. It's a bit of an ugly hack if you ask me, but it is a solution.

Atamido
8th December 2004, 19:15
It appears that my post has been edited. I thought that anytime it was edited, including by moderators, it would insert the little "edited by: xxx on xx:xx:xxx" line. Or perhaps my dipping into the community crack store has caused me to hallucinate?

Doom9
8th December 2004, 20:24
please get back on topic now. The topis is multiple video streams in matroska. All references to off-topic content have been removed.

sterlina
8th December 2004, 21:39
Originally posted by Pamel
It sounds like you just want to append the files. If the video and audio are the same type/resolution, then you should be able to append them using AVI Mux GUI.

If the videos are different types, then please check out the latest version of Haali's Matroska Splitter (http://forum.doom9.org/showthread.php?s=&postid=578872#post578872) that supports So, if you get both of the files into an MKV, you can quickly append them this way. It's a bit of an ugly hack if you ask me, but it is a solution.

unfortunatly videos are differents (size and AR) so I can't create a simple video stream. I've tryed Haali's splitter but it seems not to work. I thought it can be because I have already another splitter installed which override Haali.... maybe. Can someone tell me how can I check this (registry... but where in registry?) so I can do some testing?

robUx4
8th December 2004, 22:05
Indeed you have to disable MPC's internal splitter and unregister your previous Matroska filter.
You might try to use GraphEdit first to see if it works there.
Haali's splitter uses a tray icon, unlike Gabest's one.

sterlina
9th December 2004, 02:16
the command line I was looking for: regsvr32 /u matroskasplitter.ax

now that I've unregistred the "old" matroska splitter when I play the video file with MPC (internal filter disabled) or Windows Media Player the icon from Haali's splitter appears => good :D
VLC seems to use an own splitter (no icon in tray) and... well, the file doesn't play well

now entring into test fase... how better mux file1+file2 into a single file. The best thing is probably to wait for control tracks to be completely supported, but as I got some free time those days I'll start a series of (crazy?) test:

* file1 and file2 got same video resolution
* file1 and file2 with different AR

the "muxing" will be done by dos command (copy /b file1 + file2 file), virtualdubmod, mkvtoolnix

players: MPC, VLC, Windows Media Player

matroska splitter: Haali's (MPC internal filter is deactivated)

file is opened also with VirtualDubMod and mkvtoolnix to see if segments are correctly maintained.

the best result is reached if the video is shown and the streams are maintained separated

outlyer
9th December 2004, 02:18
Originally posted by sterlina
VLC seems to use an own splitter (no icon in tray) and... well, the file doesn't play well

AFAIK VLC doesn't use DirectShow and hence won't use any filters you installed but its own methods.

Edit:
VLC fails: (...)
Moreover it seems to have an internal matroska splitter as Haali icon doesn't appears in tray bar.VLC fails again (...)
I've try to search in options if there is an internal splitter that can be deactivated, but I've failed my search.
ditto

sterlina
9th December 2004, 02:21
test #1 file1 and file2 have same resolution copy /b file1.mkv + file2.mkv copy.mkv
MPC correctly open the file as if it was file1.mkv only. At the end, file2.mkv start playing as if it was launched.
same thing with Windows Media Player... even if it doesn't reconize correctly .mkv extension as being a multimedia file

The icon into the tray bar clearly show that both players uses Haali's splitter (well... they are bot DS players, isn't it?). From the icon, and for MPC "right mouse button click menu" is possible to jump from segment1 to segment2. Video results "undetermined", same for audio, probably because I haven't give a name into original files.


VLC fails: differently from the other players the time bar displays as if the videos were joined (whereas time is reported incorreclty). It stops after showing file1. Moreover it seems to have an internal matroska splitter as Haali icon doesn't appears in tray bar.

VirtualDubMod opens the file as if it was only file1

mkvtoolnix (mkvinfo) read the file as if it was only file1

VirtualDubMod: append segment, direct stream copy
as everyone could imagine the file is correctly shown, the problem is that as the two files are joined there is no chance to easly go back

mkvtoolnix-1.0
both DS players (MPC and WinMP) got the same problem: they show only video1 and the time bar is from video2. At the end of video1, it just stop. If "repeat" option is enabled into the player, at the end of video1 it start it again.

From Haali's icon or MPC menu filter is possible to pass to the secondary video stream, but audio switch is not automatically implemented so it must be done manually. I've tryed to give a name and a language to tracks in mmg (mkvtoolnix GUI) and it is shown into the icon.

VLC fails again: it opens two windows, audio is from the first one only. I've try to search in options if there is an internal splitter that can be deactivated, but I've failed my search.

As before, VirtualDubMod reconize only video1

As expected, mkvtoolnix reads correctly video1, audio1, video2, audio2



What I've learned? The best results are with copy command, but I'll try to see if there are some mkvmerge options that can make it easily (probably I'll talk about that with Mosu... if he isn't reading ;) ) Haali's filters are good even if there is a little bug (does anybody know where I can do bug report?) Finaly, players with internal filters are very good, but embed filters should be easily deactivated.

2.16 in the morning... I'll go sleep!

outlyer
9th December 2004, 02:30
Originally posted by sterlina
What I've learned? The best results are with copy command, but I'll try to see if there are some mkvmerge options that can make it easily (probably I'll talk about that with Mosu... if he isn't reading ;) ) Haali's filters are good even if there is a little bug (does anybody know where I can do bug report?)
You can find both Haali and Mosu on the matroska mailing lists (http://dir.gmane.org/search.php?match=matroska) or on the official IRC channel (irc.corecodec.com, #matroska)