View Single Post
Old 17th January 2018, 12:33   #1371  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,469
OK, so it seems that MakeMKV has trouble extracting the forced subtitles from the original (complete) stream. It's not really astonishing, because the Avatar subtitles are really bizarre. Here is what I know about the Avatar subtitles and the various versions of BDSup2Sub++ I've tested.

BDSupsSubEnhanced and BDSup2Sub++ v1.0.2 can handle the subtitles with "multiple PDS/ODS definitions" (several different subtitles appearing at the same time on screen). BDSup2Sub.jar and all versions of BDSup2Sub++ before 1.0.2 as well as 1.0.2a cannot handle them, and they issue only a warning. (BDSup2SubEnhanced is theoretically able to handle them, but it cannot save them to XML/PNG, so it's not a good choice.) Since BD3D2MK3D uses now only BDSup2Sub++ 1.0.2 to read the original SUP streams, it should be able to process them correctly. Furthermore, since there is only a single 3D-Plane per subtitle stream in a BD3D, all subtitles appearing at the same time on screen must share the same depth, and therefore I guess that multiple ODS are probably never used for 3D movies.

Unfortunately, BDSup2Sub++ has some troubles when it reads some subtitle streams, notably the Avatar streams. It finds multiple ODS when there is only a single ODS (false positives). Therefore, when it converts the subtitle stream to XML/PNG, it creates several bitmaps for the same subtitle, but all of them but one are useless. And it includes them in the XML file, with several problems as well, such as width, height, X and Y positions being 0, or references to non-existing PNG files. So, when the latest version of BD3D2MK3D (v1.5) converts the subtitles to 3D, it checks the XML for that kind of errors, and if it find at least one bad definition, it converts the original BD SUP stream again to BD SUP format with BDSup2Sub++. That fixes "magically" the problem of the fake multiple ODS. (If there are REAL multiple ODS in the original stream, they are preserved.) Then, the new SUP is converted again to XML/PNG, this time without problem. BD3D2MK3D merges then the remaining multiple subtitles (if any) to form single subtitles, so that the problem of the multiple ODS can be ignored. BD3D2MK3D creates then a new XML/PNG stream with the PNGs converted to 3D and a new XML file. To convert that XML/PNG stream back to BD SUP (or to DVD SUB), it must use BDSup2Sub.jar, as ++ has another bug. When ++ imports the PNGs, it crops the fully transparent parts of the subtitles, but it fails when it modifies the Width, Height, X and Y coordinates accordingly, and the final stream has the subtitles at wrong positions. (That bug happens only when the subtitles are cropped, but it's a problem that cannot be easily detected.) Luckily, the Java versions of BDSup2Sub has not that bug, and BD3D2MK3D uses it for the last conversion. Conclusion: It is possible to convert any BD SUP file to XML/PNG and then back to SUP by using the right version of BDSup2Sub for each step, and using a tool I've written to merge the multiple ODS together.

If you need to do convert the streams manually to XML/PNG, just remember to always use BDSup2Sub++ to convert the original SUP to XML/PNG, then use the new BD3D2MK3D subtitle tool "Combine Multiple PDS/ODS Definitions" (or use the little standalone CLI exe I've released here) to verify if there are buggy multiple subtitles or merge the real multiple subtitles. Do whatever you need to do with the XML/PNG stream, and use BDSup2Sub.jar to convert the edited XML/PNG to your final format.

Last thing to note: Avatar, as well as a few other 3DBD, has the subtitle streams TWO times. They are in the 2D M2TS file with the AVC video stream and the audio streams, like all other 3DBDs. But they are also in the second M2TS file that should normally contain ONLY the MVC video stream. And the two versions OF THE SAME STREAM have the same stream ID! Therefore, when a demuxer needs to extract a specific subtitle stream from a SSIF with the AVC and MVC streams, if finds two times the same stream. I guess that it's the source of the many problems encountered with the Avatar 3DBD. If it's true, that mean they you should never encounter fake multiple ODS when you process a 2D BD with MakeMKV, tsMuxeR or eac3to.

I don't know why MakeMKV cannot extract correctly the forced subtitles from the AVatar BD, but it's almost certainly caused by the double subtitle streams and the related problem of the false positives multiple ODS. I will add a note in the explanation of how to use MakeMKV with BD3D2MK3D to explain that if there are problems when converting the subtitles, it is necessary to re-rip the BD with the complete subtitle streams ONLY. It's the only thing I can do.
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline