Log in

View Full Version : MkVMerge/Matroska - confusion with video angles


Lincoln Burrows
16th February 2010, 08:44
I have posted a question on this thread regarding the multiple angles from videos, while using MakeMKV to extract them:
http://forum.doom9.org/showthread.php?t=144611&page=14

But now that I looked the Matroska FAQ, there's an entry saying we need to use MKVMerge to do this job.

15) Does Matroska support multi-angle video files (multiple video streams in one matroska file)?

yes, you can create such files with gabest's mkv muxer in graphedit or mkvmerge. playback works with Haali's mkv splitter in directshowThere are some things I would like to know, because while merging two video angles worked for me for the first time, it created another problem.

Let me explain from the beginning.

This is the Star Trek/TOS on Blu-ray. Some specific scenes from all episodes have new special effects, while all other scenes are normal and don't have it, being the same in both cases.

If you change the video angle you will find out they look exactly the same (I believed one was SD and the other High Def, but that was not the case). Those specific scenes (featuring new or old special effects) are even on a single file with 100 MB each, for example. They are not "mixed" with the rest. When you play them, you will notice they are not attached with any part of the episode - and are all alone.

When we are playing this disc, using TMT (from Arcsoft), for example, the player reads the interval between 00044.m2ts and 00098.m2ts which is about 8 GB of size, from that episode.

00000.mpls can ignore the files between that interval that are only featuring the new special effects, and vice versa.

When we change the video angle, TMT reads the 00000.mpls instruction which uses the exact files from the interval 00044.m2ts and 00098.m2ts but instead of doing this:

00044.m2ts >>> 00046.m2ts >>> 00047.m2ts until 00098.m2ts = Episode with old special effects

It will do that:

00044.m2ts >>> 00045.m2ts >>> 00046.m2ts >>> 00047.m2ts until 00098.m2ts = Episode with new special effects - note the file 00045.m2ts with 100 MB of size was called by the playerWe don't have each episode duplicated on the disc.

It's a bunch of files with all the new and old special effects (there aren't many). The player just seeks specific files when asked to change the video angle, and after that file is used, the episode continues reading the 1st angle, while it might appear it is reading the second.

Then what is the problem?

MakeMKV is capable of saving all angles if asked, but it will only save the ENTIRE VIDEO + the angles desired. It will not separate them (this is not possible, considering that one of the special effects might be linked to the full video). The others might be located on individual files, as explained above.

Do you know what I mean? And by default, MakeMKV is disabling the 2nd angle of all episodes (not sure why).

That means, I will end up having one 8 GB file with the new special effects and another 8 GB file with the old special effects.

MKVMerge is going to waste 15/16 GB and save both videos into a single file, with 2 video angles. But that is only an option when the 2nd angle is 99% different from the first. Not 5% (my case).

If we have a 50 min episode where 3 or 4 scenes that are wasting no more than 30 seconds each are what we call "2nd angle", this is a very dumb way to merge them. Do we really need to "fill" the rest of that angle with the same video signal? If we do, that is not an option for me.

One of the reasons I converted my BD into Matroska was to remove dubbing tracks that I wasn't using. Now I am facing a problem that is simply wasting a lot more space.

I suppose if those individual files that are "called" by the player when we are accessing the 2nd angle are converted to Matroska and I attempt to merge only them into one MKV file (already using one angle), I won't be able to tell in what specific time of that episode (10m25s could be one, 22m27s another) they might be used.

Any ideas? :)

NanoBot
16th February 2010, 14:01
Hi,

I tried to do the same as you a few month ago with the first season of TOS by creating matroska files with two editions. In theory it worked, but in practice the "jumps" between the end of one chapter to the beginning of the next chapter contained in an edition where not accurate enough. I think the problem is that Haalis splitter is not able to do those jumps frame accurate and reproducable. My second problem was, that I was not able to play back those file correctly under linux cause the player I was using there does not support multi edition matroska.

Another possibility would be to create a bunch of seperate matroska files each containing only one scene each and to concatenate them via segment linking. But I did not try if this method would give me better results cause I suspected possible problems with overlapping audio.

I ended up by using only the modern version of the episodes.

C.U. NanoBot

Lincoln Burrows
16th February 2010, 18:30
Hmm... I think I was mistaken when said that one of the angles was alone and the other was on a file/bunch of files and mixed with the main episode and the scenes that don't need two angles.

If that's the case, then both angles can be merged scene by scene, and in the middle of those files, we may add the other files.

Take a look at this idea:

Let's assume those are the files I talked about:

00044.m2ts (main episode, 2 mins)

00045.m2ts (new special effect, 02:00 to 02:30)
00046.m2ts (old special effect, 02:00 to 02:30)

00047.m2ts (main episode 02:31 to 04:00)

00048.m2ts (new special effect, 04:01 to 05:00)
00049.m2ts (old special effect, 04:01 to 05:00)What we need to do, in theory, should be converting everyone of them to Matroska, but not together - one at time:

00045.mkv (new special effect, 02:00 to 02:30)
00046.mkv (old special effect, 02:00 to 02:30)

MERGE BOTH FILES ABOVE USING MKVMERGE

00048.mkv (new special effect, 04:01 to 05:00)
00049.mkv (old special effect, 04:01 to 05:00)

MERGE BOTH FILES ABOVE USING MKVMERGENext step:

00044.mkv (main episode, 2 mins)

00045 + 46.mkv (new/old special effects, 02:00 to 02:30, 2-angle file)

00047.mkv (main episode 02:31 to 04:00)

00048 + 49.mkv (new/old special effects, 04:01 to 05:00, 2-angle file)

MERGE ALL FILES ABOVE USING MKVMERGEIs that possible? Because if it is, then while you are playing that episode, you will only be able to change the video angle in the interval between 02:00 to 02:30 and 04:01 to 05:00. After that, the unique file will swith to the main episode with no angles.

P.S. What should I use to convert individual M2TS files to Matroska? MakeMKV is not doing that...

Lincoln Burrows
16th October 2011, 17:11
I am going to ask the same question but for a different title.

The Star Wars movies.

I noticed that if I open the movie with MakeMKV, it displays something like this:

http://i.imgur.com/e8VBp.png

Let me explain what is this, exactly:

Blu-ray:

The movie is located at BDMV/STREAM/00501.m2ts

The file has 38 GB.

However, I noticed the movie has 2h and the file has 1h58m. Where are the other 2 minutes?

1) If I want the english version, it is located in 00500.m2ts and file has 700 Megabytes.

http://i.imgur.com/hA0Lc.gif

MakeMKV is simply appending 00500.m2ts to 00501.m2ts as 1st angle.

2) If I want the portuguese version, it is located in 00510.m2ts and file has 700 Megabytes.

http://i.imgur.com/5idYs.gif

Both 00500 and 00510 have 2 minutes each. And they both have the same audio/subtitle tracks.

What I want here is simple:

* Merge both 00500 and 00510. And later, merge the result to the main movie, 00501.

Now, how are we supposed to do that, since if I am going to end up having just that:

- First video stream = 2 minutes + 1h58m
- Second video stream = 2 minutes

= Final result

Whenever I watch this thing with the 2nd video stream, after 2 minutes Media Player Classic will not redirect me to the remaining 1h58m from the 1st video stream. It will simply end the playback.

Not to mention the fact that I can't merge two videos if one of them is using a second video stream/multiple angle.

Am I missing something?

It was suggested that I should use ClownBD or even this software:
http://forum.doom9.org/showthread.php?t=160027

But how are they going to help me?

MokrySedeS
16th October 2011, 18:30
You don't want 2 separate video streams. You need to merge them all (first 2m clip + 1h58m clip + second 2m clip) by appending them into one stream resulting in 2h02m runtime. You need to do the same thing with audio and subtitle streams.
You'll also need a "special" chapter file, which will allow you to switch between the two versions of the opening crawl.
Xin1generator will do all of this for you, just read the description.
It uses eac3to to demux the streams, generate a Matroska ordered chapter file, a Matroska tag file, and even generates a file with a list of frames that need to be encoded as I-Frames if re-encoding. Once it has finished demuxing, you use a Matroska muxer (such as MKVMerge or Haali's GDSMux) to create the mkv and add the chapters and tag files.

Chetwood
17th October 2011, 07:09
Now, how are we supposed to do that, since if I am going to end up having just that:

- First video stream = 2 minutes + 1h58m
- Second video stream = 2 minutes

= Final result
I've done this using Clown_BD. When it analyzes the disc, it shows all angles. Select the one you need and it will demux the entire movie including the right crawl. It automatically will remux to m2ts which you can abort. Then manually mux all streams in MKVToolnix.

Lincoln Burrows
17th October 2011, 12:40
I managed to do what I was planning with Xin1generator. It worked perfectly:
http://forum.doom9.org/showthread.php?t=160027

In the future I am going to test more movies with either Xin1generator or Clown BD, besides Star Wars.