View Single Post
Old 13th September 2017, 10:28   #1232  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,469
Quote:
Originally Posted by von Suppé View Post
I am near completion reading the whole thread. Excuse me for going a bit offside as I don't use BD3D2MK3D for 3D mkv creating. My player won't play them but it does play 3D BD iso's so I use tsMuxer to remux main movie only, for diskspace reasons, and the fact that I want to replace/add my personally edited/created subtitles, of course preferably in proper 3D.
No problem, but I think that there are better tools to do that automatically.
Quote:
Originally Posted by von Suppé View Post
Does that mean that, when remuxing a main movie only with tsMuxer, I should specify the 3d-Plane number found by BD3D2MK3D?
Yes. There are some bugs in tsMuxer. In fact, the audio and subtitle streams referenced in the MPLS file (the playlist) do not necessarily correspond to the streams really physically present in the M2TS or SSIF file(s). For example, you can have what I have called "phantom streams", physically present but not referenced in the MPLS. (They are usually referenced in other MPLS files, such as a dedicated playlist to watch the movie with the director comments, or when the PIP option is enabled.) And even when all physical streams are referenced in the MPLS, they are not necessarily in the same order.

The MPLS file contains a 3D specific extension with the 3D-Plane to use for each stream that is referenced in the playlist, in the order of the playlist.

The bug of TsMuxer is that it retrieves the list of the subtitle streams directly from the M2TS (or SSIF file, I don't know), and not from the MPLS. Then it applies the 3D-Plane numbers at that stream list. If there are more physical streams than referenced in the MPLS (phantom streams), then the last streams have no 3D-Planes, and if the stream order is not the same, then the 3D-Planes are assigned to wrong streams.

Quote:
Originally Posted by von Suppé View Post
Or if I would leave tsMuxer's self-found 3D-Plane untouched, it would double-back it's own bug and assign the correct 3D-Plane number during muxing?
Interesting question, but honestly I don't know. I'm not really interested in remuxing 3D BDs, and therefore I have never paid attention to the potential bugs of that part of TsMuxer. But I suppose that the answer is no, TsMuxeR will probably not assign the right 3D-Plane numbers to the right streams, as it has no way to remember in what order the streams have been muxed in the original BD. It will therefore remux them in the order YOU specify. And it will fail to assign the 3D-Planes correctly. So, use BD3D2MK3D (that doesn't show the phantom streams and respects the order of the MPLS) to identify what 3D-Plane is assigned to what subtitle stream.

Quote:
Originally Posted by von Suppé View Post
Does that mean that the 3D-Plane contains 3D depth value for all videoframes of the video? I was under the impression that the 3D-Plane contained only depth-info about the subtitle it references to...
A 3D-Plane is called officially "offset sequence" (hence the .OFS file extension). They are stored as SEI messages in the MVC video stream. There is one SEI message per GOP. The message contains up to 32 series of bytes, for the 32 subtitle streams theoretically supported by the 3DBD specs. It is not mandatory to store the 32 3D-Planes, but it's almost always the case. (The unused 3D-Planes contain only dummy values.) It is even not necessary to store a different 3D-Plane per subtitle stream, because it is theoretically allowed to assign the same 3D-Plane to different subtitle streams. But it is mandatory to store one offset (byte) per video frame in all existent 3D planes. So, yes, to reply to your question, the SEI message for a specific GOP of, say, 24 frames must contains at least 24 x the number of 3D-Planes or 24 x 32 bytes. Since the same logic is repeated during the whole movie, finally there are as many offsets as there are frames in the movie per 3D-Plane effectively stored in the MVC stream. (Note that there is also an header in all SEI messages, describing how many planes and how many frames it contains, among other things.)

But you are also right. Indeed, a single 3D-Plane contains normally the 3D offset values for the subtitles of a specific stream. The values not necessary to display specific subtitles (corresponding to the frames without subtitles) are present, and may contain either the last really used offset value or the special "empty" value 0x80. Since they are not used, that doesn't matter much. However, it's an additional difficulty when you have to add a new subtitle stream to a 3DBD. If there are subtitles displayed at frames where the 3D offsets are not defined, the result is unpredictable. (The two "Convert Subtitles to 3D" tools of BD3D2MK3D try to deal with that problem, but it's not always perfect.)

Now the bad thing about remuxing the MVC streams and the 3D-Planes. Although it is theoretically possible to assign correctly the 3D-Planes to the right subtitle streams with TsMuxer (with some help from BD3D2MK3D), you must understand theat the SEI messages are lost when the MVC stream is re-encoded. So, if you don't add them back before using tsMuxeR, it doesn't make sense to specify the 3D-Plane numbers, because they will reference 3D-Planes that are not present physically. So, TsMuxeR can be used to assign the 3D-Planes only when it remuxes an original MVC stream that has not been re-encoded, or a MVC stream that has been re-encoded with an encoder smart enough to re-insert the 3D-Planes as SEI messages in the final MVC. That was impossible until recently with free tools, but I know that now, FRIM has added that possibility to its encoder (or is it a separate tool to be used after the encode?) As I wrote, I'm personally not interested in re-encoding to AVC+MVC, so I'm not the right person to help you on this subject. See the FRIM thread for more info.
__________________
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; 13th September 2017 at 10:50.
r0lZ is offline