View Single Post
Old 10th April 2016, 09:26   #944  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,469
How to find the view order and 3D-Plane numbers for a 3D-MKV created with MakeMKV

Welcome to the Doom9 forums, Triple-M !

Unfortunately, currently, it is not possible to find the information about the views order and the 3D-planes in the 3D-MKV file. If that was possible, BD3D2MK3D would retrieve it for you. We have asked the authors of MakeMKV to add that information in the file, and we hope that the next version of MakeMKV will correctly set the stereoscopy mode in the MKV header and will implement tags for the 3D-planes. When that will be the case, BD3D2MK3D should be able to recognise the info, and you will not see the red warnings any more.

In the meantime, the only way to retrieve the info is by examining the original BD3D, with BD3D2MK3D or with tsMuxeR. When you load a BD in BD3D2MK3D, you can see something like this:
Code:
Video   :  Und  AVC, 1080p, 23.976 fps, left-eye
Video   :  Und  MVC, 1080p, 23.976 fps, right-eye (32 3D-Planes)
Audio   :  Eng  TrueHD, Multi-channel, 48/96 Khz
Audio   :  Fra  TrueHD, Multi-channel, 48/96 Khz
Subtitle:  Eng  PGS, 3D-plane: 1
Subtitle:  Fra  PGS, 3D-plane: 2
Subtitle:  Esp  PGS, 3D-plane: 3
Here, the views are in the common order (AVC = left view). Note that most players assume the "Left view in AVC" order, because about 90% of the 3DBDs are authored that way. If you need to swap the views on your TV or with your software player to see the 3D correctly, the views are in the opposite order: Right view in AVC. It is therefore probably easy to find the correct view order with Stereoscopic Player.


Things are very different for the 3D-Planes. In many BDs, the order of the subtitle streams determine the 3D-Planes numbers, like in the example above. But note that the first 3D-Plane is 3D-Plane #0. Here, the plane #0 is not used, and the first subtitle stream is associated with the second 3D-Plane, #1. The rest is logical. Unfortunately, there is no well established rule for the assignment of the 3D-Planes. The 3D-Plane #0 may or may not be used, and the order of the 3D-Planes may or may not be sequential. It is therefore almost impossible to deduce the 3D-Plane to use without examining the BD.

However, it is possible to use a good 3D-Plane without knowing the original assignment. Here is how.

You should try to assign a number that *may* be correct, and let BD3D2MK3D create the project. When the project is finished, you will find the 3D-Planes in the project directory, and the subtitle streams you have converted in XML/PNG format in sub-directories with names similar to this: 00801.track_4610.Fra.3D_2D. Now, use Subtitle Tools -> Verify 3D-Planes Compatibility. In the dialog, select the temp_2D.xml file of the subtitle stream, and the project directory containing the 3D-Planes (such as "...\Movie title\00000"). The tool will create a log file similar to this:
Quote:
Validity of the 3D-planes from directory "E:\BD3D2MK3D_projects\Test\00801"
with the subtitle file "E:\BD3D2MK3D_projects\Test\00801\00801.track_4610.Fra.3D_2D\temp_2D.xml".
Frame rate used: 23.976023976023978 fps
Processing all subtitles (normal and forced).

Total number of subtitles: 1431

3D-Plane-00.ofs:
0 subtitles with totally undefined depth.
0 subtitles with partially undefined depth.
Subtitle frames with undefined depths: 0
(Depth values for current subtitle stream: Min=16, Max=16, Average=16.0)
*** WARNING: Fixed depth 16! ***

3D-Plane-01.ofs:
0 subtitles with totally undefined depth.
0 subtitles with partially undefined depth.
Subtitle frames with undefined depths: 0
(Depth values for current subtitle stream: Min=16, Max=16, Average=16.0)
*** WARNING: Fixed depth 16! ***

3D-Plane-02.ofs:
8 subtitles with totally undefined depth.
12 subtitles with partially undefined depth.
Subtitle frames with undefined depths: 602
(Depth values for current subtitle stream: Min=-8, Max=70, Average=19.379)

3D-Plane-03.ofs:
3 subtitles with totally undefined depth.
1 subtitles with partially undefined depth.
Subtitle frames with undefined depths: 206
(Depth values for current subtitle stream: Min=-6, Max=72, Average=18.454)

3D-Plane-04.ofs:
2 subtitles with totally undefined depth.
0 subtitles with partially undefined depth.
Subtitle frames with undefined depths: 46
(Depth values for current subtitle stream: Min=-6, Max=72, Average=19.118)

3D-Plane-05.ofs:
3 subtitles with totally undefined depth.
1 subtitles with partially undefined depth.
Subtitle frames with undefined depths: 206
(Depth values for current subtitle stream: Min=-6, Max=72, Average=18.446)

3D-Plane-06.ofs:
3 subtitles with totally undefined depth.
1 subtitles with partially undefined depth.
Subtitle frames with undefined depths: 206
(Depth values for current subtitle stream: Min=-6, Max=72, Average=19.667)

3D-Plane-07.ofs:
1 subtitles with totally undefined depth.
0 subtitles with partially undefined depth.
Subtitle frames with undefined depths: 78
(Depth values for current subtitle stream: Min=-6, Max=72, Average=19.222)

3D-Plane-08.ofs:
4 subtitles with totally undefined depth.
0 subtitles with partially undefined depth.
Subtitle frames with undefined depths: 149
(Depth values for current subtitle stream: Min=-6, Max=72, Average=18.442)

Notes:
The depth of any particular subtitle may be undefined for several reasons.
The 3D-plane may contain undefined depth values for some or all frames of a particular subtitle. When it's the case, BD3D2MK3D ignores the undefined frames, and takes into account only the frames with a valid depth.
The 3D-plane may be too short, and therefore it may not contain sufficient depth values to cover the subtitles appearing near the end of the movie. In that case, BD3D2MK3D uses a depth value of 0.

When a subtitle file is converted to 3D, the temp_2D.xml file is generated and modified to include the <Depth> tags extracted from the selected 3D-plane file. (The Additional Depth value specified in the GUI is NOT added to that value.)
In addition to the <depth> tags, the <UndefinedFrameDepths> tag is added as well when there is at least one frame with an undefined depth for that specific subtitle. The value of that tag is the number of frames without a valid depth for that specific subtitle.
You can search for "UndefinedFrameDepths" in the XML file to easily find all subtitles that may not have a correct depth value.
The depth values that will be used during the conversion of the temp_2D file to the final 3D subtitle file are stored in the <Depth> tags and can be edited manually when necessary.

Terminology used in this log:
* Subtitles with totally undefined depth: When the depth values of ALL frames of a particular subtitle are undefined.
* Subtitles with partially undefined depth: When the depth values of SOME frames of a particular subtitle are undefined.
* Subtitle frames with undefined depths: Total number of all frames where a subtitle must be displayed with an undefined depths.
* Min, Max and Average depth values for current subtitle stream: The smaller, greater and average depth values found in the 3D-plane in the frames during which a subtitle is displayed. The undefined frames are not taken into account. (See the 3D-plane log file generated during the extraction of the 3D-plane files from the MVC stream to see the global min, max and average depths.)
* Fixed depth warning: That warning is added when all frames during which a subtitle is displayed have exactly the same depth value. (Again, the undefined depth are not taken into account.) That means that the 3D-plane is probably fake or badly authored, and is useless anyway.
As you can see, the first 3D-Planes have a fixed depth. You should avoid them.

In the other 3D-Planes, look at the numbers of subtitles with totally undefined depth, subtitles with partially undefined depth, and subtitle frames with undefined depths. The lower the best. Therefore, the 3D-Planes #4 and #7 seem to be the best for the subtitle stream that has been analysed. They are good bets. In fact, with this BD, the French subtitles use the 3D-Plane #4. It has good values. As you can see, there is no perfect way to determine the correct 3D-Plane, but the tool can help you in finding a good one.

Now, if the "good" 3D-Plane is not the one you have selected when you have generated the project, you can simply convert the 2D XML/PNG stream to 3D again with Subtitle tools -> Convert Subtitles to 3D, and of course use the new 3D-Plane. You can overwrite the original 3D SUP (or SUB) file created by BD3D2MK3D, or save the new subtitle under a different name and modify the filename of the streams in the __MUX_3D_OPTIONS.txt file.

Finally, launch the encoding of the final SBS or T&B file, and verify carefully the subtitles. It they look wrong, try with another stream. You don't need to re-encode the video (unless you hardcode the subtitles on the video). Just use the __MUX.3D.cmd to re-create the final MKV with the new 3D subtitles.

Good luck!
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV

Last edited by r0lZ; 10th April 2016 at 09:53.
r0lZ is offline