View Single Post
Old 17th February 2015, 17:51   #186  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,469
OK, I think I've found the origin of the problem. In v0.57, I have added a patch to fix a bug in BDSup2Sub (both versions). When BDSup2Sub converts an original BD SUP file to XML/PNG, it writes <Format VideoFormat="1080p" FrameRate="25" DropFrame="False"/> in the XML file. The frame rate is obviously wrong, and therefore I have added a function in BD3D2MK3D to fix it:
Quote:
Originally Posted by r0lZ View Post
Quote:
# v0.57 (February 1, 2015)
[...]
# - When a XML subtitle file is created, the file is now patched with the correct frame rate (instead of the BDSup2Sub default 25 fps)
[...]
After the fix, the XML contains <Format VideoFormat="1080p" FrameRate="23.976" DropFrame="False"/>. It's better. But obviously, it was not a good idea to fix that bug, as the fix introduces a new bug.

In BD3D2MK3D, to convert the subtitles to 3D, the original SUP is first converted to XML/PNG and the frame rate is fixed. Then, the PNG files are converted to 3D, and the XML file is modified (with the new positions of the stereo subtitles) and copied with the new PNG files. Then that copy (containing the right frame rate 23.976) is converted again to BD SUP and/or VobSub format. For whatever reason, during that conversion, the time codes are modified, and they give the wrong timings you have noticed. Curiously, with the original wrong time codes of 25fps, the conversion works well. So, it seems that BDSup2Sub REQUIRES a wrong frame rate in the XML file to work properly!

I have also tried to change the DropFrame="False" to DropFrame="True", but that has absolutely no effect when converting the XML to another format. It seems that BDSup2Sub ignores completely that option.

Strangely, converting the XML to another XML works perfectly well. Probably because the time codes are simply copied from the original file.

In fact, there is a way to fix the conversion bug while keeping the real frame rate of 23.976fps in the XML. When converting the XML, it is sufficient to add "--convert-fps 24p 24" in the command line of the java version of BDSup2Sub, or "--fps-target 24" for BDSup2Sub++. Note that the bug happens also if you use the correct target fps of 23.976 (or 24p, an alias for 23.976). It's really strange. I don't understand at all the way BDSup2Sub handles the frame rates and time codes. But I understand that it is better to leave its output XML file unchanged, as otherwise strange things happen. I have therefore removed the fix added in v0.57. I will release a new version tomorrow, but I want to test it before.

The fact that the bug has been added in a very recent version explains why I have never noticed it. Note also that the 2D subtitles are correct (because they are never converted to XML/PNG).

Thanks again for the bug report!
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline