Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > (HD) DVD, Blu-ray & (S)VCD > (HD) DVD & Blu-ray authoring

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 17th February 2015, 02:43   #181  |  Link
zaphodalive
Registered User
 
Join Date: Feb 2015
Posts: 8
Subtitle sync

Hi, I used to use DVDFab for encoding my 3D blurays but switched to your tool so as to get depth on the subtitles (DVDFab didn't support any subtitle depth). I prefer to burn-in subtitles as I've had numerous issues with players using external or muxed subtitle streams.

I trialed BD3D2MK3D with my Thor 2 bluray and everything worked out perfectly except that the subtitles are out of sync, trailing the video by about 1.5-2 seconds. Any thoughts on why this might have happened? It didn't happen when encoding with DVDFab, and I know it's not much information to go by but if you have any suggestions that would be great.

I'll try to encode another film with subtitles and see if the issue occurs again or if it's specific to the Thor 2 bluray.

Appreciate the effort that's gone into this tool, thanks.
zaphodalive is offline  
Old 17th February 2015, 10:35   #182  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,469
Welcome to the Doom9 forums and thanks for your kind words, zaphodalive.

I have never had any subtitle sync issue, and I don't know what could be causing that problem. Have you created the MKV with BD3D2MK3D itself, or have you muxed the streams yourself? Normally, there should be no subtitle delay in the original BD, but of course, if you have used a non-zero number of seconds of black at the beginning of the video (in the last tab), that delay must be taken into account for the mux. BD3D2MK3D takes care of that automatically, but you have to add the delay yourself if you use the MkvMerge GUI.

If you still have the project files, can you send me the _ENCODE_3D_MOVIE.avs, _MUX_3D_OPTIONS.txt and the BD3D2MK3D.log files (to pgcedit dot g m a i l dot com)? I'll have a look, but I can't promise to find something wrong. Also, what version of BDSup2Sub did you use? (See in the Settings -> BDSup2Sub menu.)

Last question: I'm not really fan of the Marvell movies, and I don't know exactly what movie is Thor 2. Is it Thor, The Dark World? If it's the case, I have that BD here, and I'll try to encode it with hardcoded subtitles. What version of that BD did you have? Sold in which country? And what subtitle stream (language) have you hardcoded?
__________________
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; 17th February 2015 at 10:41.
r0lZ is offline  
Old 17th February 2015, 11:00   #183  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,469
Wait! Forget my previous post. I've just verified with my BD, and indeed, some subtitle streams have a one second delay (exactly 1001 ms). I did not know that a delay was possible in the subtitle streams, and therefore there is a bug in BD3D2MK3D. I will fix it as soon as possible. It's easy to do for the muxed subtitle streams, but less easy for the hardcoded subs. I may need some time...

In the meantime, to sync the muxed subs properly, you can edit the _MUX_3D_OPTIONS.txt file and add 1001 to the "sync" value of the affected subtitle stream. Then, simply launch the _MUX_3D.cmd file to remux the final MKV file. Unfortunately, it's not as simple for the subtitles hardcoded over the video, as afaik there is no way to specify a sync offset with the SupTitle command of the avisynth script. I'll try to find a solution and will explain it here...

Thanks for your message. You have found an important bug!
__________________
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; 17th February 2015 at 11:03.
r0lZ is offline  
Old 17th February 2015, 11:25   #184  |  Link
zaphodalive
Registered User
 
Join Date: Feb 2015
Posts: 8
Hey

It was indeed 'Thor - The Dark World', but I have also tested with 'Teenage Mutant Ninja Turtles' which was also out of sync. I graphed the times in Excel and it appears that there is a linear variation through the films, e.g.:
- 1m25s - minimal variation (Thor - The Dark World)
- 12m - 0.8s variation (Teenage Mutant Ninja Turtles)
- 33m - 1.9s variation (Thor - The Dark World)
- 1h15m - 4.5s variation (Thor - The Dark World)

These times were very roughly recorded, but based on how close they appear to be to a linear variation I suspect the framerate of the subtitles is different from the framerate of the video... in fact with a rough run through the calculator is looks like it could even be the difference between 23.976fps and 24fps.

It certainly doesn't seem to be a fixed 1001ms variation in my encode as the variation gets larger through the video file. Hope that helps track the issue down.
zaphodalive is offline  
Old 17th February 2015, 11:51   #185  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,469
OK, apparently, there is also a problem with drop vs non-drop frame timecodes. Damn! It's even more difficult than I thought. But thanks again.

Here is the MediaInfo output about the subtitle streams for Thor 2. As you can see, the subtitle streams have a delay of 1001 ms. But all audio streams have no delay.
Code:
General
Complete name                            : G:\BDMV\PLAYLIST\00800.mpls
Format                                   : Blu-ray Playlist
File size                                : 1.04 KiB
Duration                                 : 1h 52mn
Overall bit rate mode                    : Variable
Overall bit rate                         : 1 bps

[...]

Text #1
ID                                       : 4608 (0x1200)
Menu ID                                  : 1 (0x1)
Format                                   : PGS
Codec ID                                 : 144
Duration                                 : 834ms
Delay relative to video                  : 1s 1ms
Language                                 : English
Source                                   : 00939.m2ts

Text #2
ID                                       : 4609 (0x1201)
Menu ID                                  : 1 (0x1)
Format                                   : PGS
Codec ID                                 : 144
Duration                                 : 834ms
Delay relative to video                  : 1s 1ms
Language                                 : French
Source                                   : 00939.m2ts

Text #3
ID                                       : 4610 (0x1202)
Menu ID                                  : 1 (0x1)
Format                                   : PGS
Codec ID                                 : 144
Duration                                 : 834ms
Delay relative to video                  : 1s 1ms
Language                                 : Spanish
Source                                   : 00939.m2ts

Text #4
ID                                       : 4611 (0x1203)
Menu ID                                  : 1 (0x1)
Format                                   : PGS
Codec ID                                 : 144
Duration                                 : 834ms
Delay relative to video                  : 1s 1ms
Language                                 : Portuguese
Source                                   : 00939.m2ts

Text #5
ID                                       : 4612 (0x1204)
Menu ID                                  : 1 (0x1)
Format                                   : PGS
Codec ID                                 : 144
Duration                                 : 834ms
Delay relative to video                  : 1s 1ms
Language                                 : English
Source                                   : 00939.m2ts

Text #6
ID                                       : 4613 (0x1205)
Menu ID                                  : 1 (0x1)
Format                                   : PGS
Codec ID                                 : 144
Duration                                 : 834ms
Delay relative to video                  : 1s 1ms
Language                                 : French
Source                                   : 00939.m2ts

Text #7
ID                                       : 4614 (0x1206)
Menu ID                                  : 1 (0x1)
Format                                   : PGS
Codec ID                                 : 144
Duration                                 : 834ms
Delay relative to video                  : 1s 1ms
Language                                 : Spanish
Source                                   : 00939.m2ts

Text #8
ID                                       : 4615 (0x1207)
Menu ID                                  : 1 (0x1)
Format                                   : PGS
Codec ID                                 : 144
Duration                                 : 834ms
Delay relative to video                  : 1s 1ms
Language                                 : Portuguese
Source                                   : 00939.m2ts

[...]
So, it is strange that you have no delay in your test of Thor2 at 1m25s. If MediaInfo is right, it should be one second and a couple ms.

I'm pretty sure that the drop-frame problem doesn't occur with all BDs, as there is no sync problem with all BDs that I have tried. Perhaps the problem occurs only when hardcoding the subtitles. Anyway, I'll do tests here when I'll have some time...
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline  
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  
Old 17th February 2015, 21:39   #187  |  Link
zaphodalive
Registered User
 
Join Date: Feb 2015
Posts: 8
Looks like those sub streams with the 1001ms delay belong to 00939 which precedes 00800 in the 00800.mpls. I believe 00939 is an audio test that says "Left rear, left surround" - looking at MediaInfo the sub streams from 'Text #9' onwards belong to 00800 and are 1h52m in duration with no delay is listed.

The 01800.mpls excludes the audio test and only encodes 00800, and this is what I encoded on my last attempt. I think I'll do a quick encode of both the 00800 and 01800 mpls's just to check if the 1001ms delay in the 00939 sub stream actually affects the timing of the subs in the subsequent (00800) stream, or if it can be safely ignored.
zaphodalive is offline  
Old 18th February 2015, 00:06   #188  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,469
I was wrong when I posted about the 1001ms delay. It is reported by MediaInfo (for 00800.mpls as you can see in the 2nd line of the MediaInfo log posted above) but the delay is not necessary. I guess that tsMuxeR adapts the time codes automatically when it demuxes the track. tsMuxeR does not report any delay, and it is correct. BD3D2MK3D "sees" only the streams referenced in the MPLS (unlike tsMuxeR and MediaInfo) and therefore it can process only the first 8 subtitle streams.

The problem was not related to an initial delay, but as you have correctly explained, it is a progressive de-synchronisation due to the wrong frame rate in the XML file.

I have not tried to convert 01800.mpls, because it has been removed from the list of the useful 3D playlists by BD3D2MK3D. BD3D2MK3D uses a complex method to remove all useless MPLSs, that are either not 3D, or dupes of another MPLS, or parts of another MPLS, or shorter than 1 minute, or referencing the same M2TS parts than another MPLS but with less audio or subtitle tracks or with missing 3D-plane information. You can however use the "Show all 3D playlists" option if you wish, but normally it's never necessary. In this case, I'm sure that 00800.mpls is the correct MPLS to process. (00800.mpls is the main movie in many 3DBDs, although it's not always the case.)
__________________
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; 18th February 2015 at 00:21.
r0lZ is offline  
Old 18th February 2015, 02:30   #189  |  Link
zaphodalive
Registered User
 
Join Date: Feb 2015
Posts: 8
In case there was any doubt I have confirmed the same variations at the same points in both the 00800.mpls and 01800.mpls encodes - i.e. the audio test in 00939 at the start of the playlist has no effect on the sub synchronisation. Figured I may as well still check it in case the Thor 2 bluray happened to be abnormal and the main playlist was adding a secondary issue.

Just found this from 0xdeadbeef in relation to BDSup2Sub:
Quote:
Regarding the SRC/TRG frame rates: AFAIK the SUP file doesn't contain any info about the frame rate. Therefore, if you want to convert the frame rate, you have to select the source and target frame rates manually. The 23.976 as source and 25fps as target is just the default setting as this is my typical scenario (PAL speedup from 24p). Indeed the source and target frame rates are only used to calculate a speedup/slowdown factor that's used to manipulate the time stamps.
So it seems that the FrameRate="25" in the XML is needed to match the default target framerate of 25, keeping the source and target framerate ratio 1:1. If you adjust one but not the other then the sub time stamps are contracted/elongated. Not sure if I've quite got that right but I'm sure you understand it better - hopefully it helps clear up what's happening.

I have a small request for BD3D2MK3D; I have a 4K TV as my monitor and so I do all my encodes as full-SBS and would prefer to keep a 32:9 aspect ratio, but the MKV container settings (in _MUX_3D_OPTIONS.txt) specify the aspect ratio as 16:9. I can obviously manually adjust the txt (which is what I have been doing) but it would be good if there was an option to keep it as 32:9 (or presumably 16:18 for top & bottom). I don't use the TV's native 3D processing (I use Stereoscopic Player to interleave the output) so have no requirement for it to display half-SBS, and full-SBS helps me assess encode quality.

Thanks again for your help - much appreciated.
zaphodalive is offline  
Old 18th February 2015, 09:13   #190  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,469
Thanks fore the quote by 0xdeadbeef. I have figured out myself that the --convert-fps option is made to adjust the frame rate, but that doesn't work correctly at all. The frame rate is included in the XML and IDX files, and therefore I suppose it is read and used as the default input file rate. So, for example, if I use a XML with FrameRate="23.976 and I specify --convert-fps 24p 24p, the output file should have the same time codes than the input file. But it's NOT the case! Note also that the --convert-fps option gives DIFFERENT RESULTS depending of the output stream format!

I suppose too that the input frame rate must be specified when converting a BD SUP file, because BDSup2Sub has no frame rate information in the file. But regardless of the input frame rate specified on the command line, it is ALWAYS mandatory to use 24 (and not 23.976!) as the target frame rate to force BDSup2Sub to not change the timings is the input XML is tagged with 23.976! Omitting completely the --convert-fps option doesn't work either. So, the XML must be tagged with a wrong frame rate (25fps) AND the --convert-fps must specify the wrong 24 fps as the output frame rate to work properly! It's a serious mess. To make things even more confusing, there is also a --fps-target option that you can specify, but it seems to have no effect. And BDSup2Sup++ doesn't have the --convert-fps option, but it has the --fps-target and the --fps-source options, that can be combined to work similarly (with the same bugs) than the --convert-fps of the java version. Anyway, I have decided to leave BDSup2Sub do its conversion without specifying any parameter, and without changing the default 25fps in the XML or IDX files. That works, but it's really strange.

There is also a problem with the standalone subtitle conversion tools (in the Tools menu of BD3D2MK3D), as you can specify the output frame rate if you want to force a conversion. But you have to select wrong target fps to obtain the right conversion! Difficult to explain! But I'll try to solve the problem of the conversion tools later. Currently, I want to release a version that works well when doing the main job.

For the aspect ratio, what you want is strange. The AR of a 3D movie MUST be 16:9, regardless of its (full or half) resolution, because the final movie is always displayed in 16:9. Specifying other ARs leads to distorted images on all devices I have tested so far. In your case, Stereoscopic Player should keep the original 16:9 AR after its conversion to interleaved frames, because it knows that it's a 16:9 movie, and therefore that the AR is the AR of the final result. If it doesn't do that correctly, it's a bug in Stereoscopic Player, and not in BD3D2MK3D. However, I can add an hidden option in the config file if you wish. You will have to edit it manually, because I don't like much to add potentially confusing options in the GUI. And also because I want to release the fix rapidly and I haven't much time to modify the GUI.
__________________
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; 18th February 2015 at 09:18.
r0lZ is offline  
Old 18th February 2015, 11:33   #191  |  Link
zaphodalive
Registered User
 
Join Date: Feb 2015
Posts: 8
The aspect ratio with Stereoscopic Player doesn't need to be 16:9, it is fully capable of dealing with a 3840x1080 video with a 1:1 pixel ratio and convert it to a 16:9 interleaved output because each of the left and right images is still stored as 16:9 (for a total 32:9 in SBS) - so yes, the output has to be 16:9 as you say but the input doesn't. I'm not sure in what order video processing occurs, so I'm concerned that a 3840x1080 video with a 1:2 pixel ratio - i.e. displaying as 1920x1080 (16:9) - would be rendered with a Directshow filter and then split into two 960x1080 images (for left and right eye) and then scaled up to two 1920x1080 images and interleaved for the output. Essentially this would mean that half of the horizontal data is lost in the conversion process, just as if I'd encoded it in half-SBS to begin with. Of course this may be completely wrong and the full 3840x1080 image may be used, but I don't know if that's the case.

To avoid that issue I prefer to encode in full 3840x1080 with the full 32:9 aspect ratio, then I know that whatever process sequence Stereoscopic Player uses to get to the interleaved output should use the full image quality. In addition it allows me to open up the file easily in MPC and check the quality of the encode.

Reading over what I just wrote I realise it's a bit hard to follow so I'm not sure if you'll get exactly what I'm saying. Either way it's no big deal, as I mentioned I can edit the mux options txt manually to remove the container aspect ratio as I've been doing so far, so you don't need to add anything extra to the config file.
zaphodalive is offline  
Old 18th February 2015, 11:44   #192  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,469
I have added the new config option anyway. But IMO it is useless as the aspect ratio stored in the MKV header should normally be the output aspect ratio (16:9) regardless of the full or half encoding. Anyway, if you prefer to use the full source AR, it will be possible to insert it in the mux options file automatically.

I did just a test with the new version of BD3D2MK3D, but there is still a desync problem with the 3D subtitles. I have to work again on that problem, and I'll release the fix as soon as possible...
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline  
Old 18th February 2015, 14:26   #193  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,469
BD3D2MK3D v0.59

OK, here is the fix for the sync problem of the 3D subtitles.

I have also fixed another (less important) bug related to the subtitles. The forced flag was sometimes set on all subtitle files in the MKV file without reason.

I have also added the hidden option to set the aspect ratio to 32:9 or 16:18 in Full-SBS or Full-T&B modes respectively. You have to open the new version, save the settings (with Settings -> Save Settings Now), then quit BD3D2MK3D, edit the BD3D2MK3D.cfg file (look for the option "full_ar_in_full_mode" near the end and change it to true) and restart BD3D2MK3D.

Quote:
# v0.59 (February 18, 2015)
# - Bug fix: Removed the fix (introduced in v0.57) for the wrong frame rate written by BDSup2Sub in the XML files because it introduces major sync problems with the 3D subtitles.
# - Bug fix: Some subtitle tracks were erroneously tagged as forced when the Forced option of at least one stream has been ticked in tab 2.
# - Added the hidden option "full_ar_in_full_mode" in BD3D2MK3D.cfg to specify the 32:9 or 16:18 aspect ratios respectively for full-SBS or full-T&B in the _MUX_3D_OPTIONS.txt file
Download: BD3D2MK3D.7z
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline  
Old 18th February 2015, 22:43   #194  |  Link
zaphodalive
Registered User
 
Join Date: Feb 2015
Posts: 8
Thank you very much for that, I'll be giving it a whirl later today.

I'm sure most 3D devices aren't capable of using wider images than they are able to output, but that's not a limitation in Stereoscopic Player (and probably other software 3D media players). You're absolutely right that the output needs to be 16:9, but the video file we're using should be considered as an input, e.g.:
Input video -> 3D processing -> output video (16:9)

So SS player can do:
Input MKV (32:9 - full-SBS@ 16:9 x2) -> 3D processing -> output video (16:9 - interleaved)

In that way it uses the full 1920x1080x2 video frame to create the 3D output, so I'm assured the maximum quality on my 4k TV. It's possible that the full 1920x1080x2 video frame is used in the 3D processing even if the container is set to a lower aspect ratio, but I don't know that, so this is a way for me to be sure without doing laborious testing.

Hopefully this clears up why it's useful to me, but regardless I really appreciate the effort and the sub fix, tyvm.
zaphodalive is offline  
Old 19th February 2015, 10:17   #195  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,469
OK. Anyway, now, you have the new option in the config file. I may add it in the GUI too, for a future version, but I'm still not sure.

Please confirm that the subtitle sync problem is fixed. I did some tests and for me the new version works fine, but it is always difficult to do several long demuxing and encoding operations just to test a fix with several different movies, so my tests are always somewhat limited.
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline  
Old 19th February 2015, 22:41   #196  |  Link
zaphodalive
Registered User
 
Join Date: Feb 2015
Posts: 8
I did another encode of Thor 2 overnight and the subs are perfectly in sync at the start, first third, and second third points in the movie so it looks like it's all fixed, nice work. I'll be re-encoding some other films with subs over the next week or two, I doubt there will be any sync issue snow but I'll let you know if there is - thanks.
zaphodalive is offline  
Old 20th February 2015, 12:48   #197  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,469
Thanks for the confirmation, and again for the original 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  
Old 23rd February 2015, 12:03   #198  |  Link
frank
Banned
 
Join Date: Oct 2001
Location: https://t.me/pump_upp
Posts: 811
v0.59 Wrong depth

3D-planes.log shows 2 planes with fixed depths 2 and 4.
BD3D2MK3D uses 3D-Plane-00.3dp with depth 4.

I need to use the Tools to move subs into the picture using Convert Subtitles to 3D...

Issues:
-Analyse currently selected 3D-planes
shows other depth values than the xml. (analyse 2 - xml 4)
- Additional depth is ignored.
- Selection of BD SUP does not persist.

Tested with Flying Swords...
frank is offline  
Old 23rd February 2015, 13:35   #199  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,469
Damn! I don't have the same 3D-pland than yours. I have probably another edition. It is therefore difficult to test the problems here.
With my version, only one 3D-plane is not empty: plane 0. It has a fixed depth of 20. (Confirmed with an hex editor.)

Analyse:

I have no idea why you have obtained different analysis results. I can't verify here, because I have only a single 3D-Plane. But are you sure that you have selected the right plane? Can you send me the 3D-planes and the logs? (You know my email address already.)

Note that the 3D-planes.log file is created by MVCPlanes.exe (with the subtitles assignments added at the end of the log by BD3D2MK3D itself). MVCPlanes is used to extract the planes from the MVC stream, and it generates the log on the fly. In the other hand, the Analyse Currently Selected 3D-Plane button does a new analysis of the 3D-Plane data, and doesn't use the original log to retrieve the values. With my version, both methods give the same result: fixed depth of 20.

Additional depth:

I did a new conversion with the tool, using the 3D-plane 0 (depth 20) and an additional depth of 100. (It's a very high additional depth, but it's easier to verify the effect). The result is correct, and the additional depth is taken into account. However, there is a little discrepancy in the way the two depths are taken into account. The depth from the 3D-plane is added in both views. In other words, if the depth is 20, that means that the left subtitle is shifted by 20 pixels to the right, and the right subtitles by 20 pixels to the left. (In previous versions of BD3D2MK3D, there was a bug here and the depth was divided by 2.) But the additional depth is more precise and is spread across the two views. That means that my additional depth of 100 pixels was divided by two: the left subtitle is shifted to the right by 50 pixels, and the right one to the left also by 50. Therefore, an additional depth of 100 is equivalent to a depth of 50 in the 3D-plane. But as far as I know, it is correctly added to the depth from the 3D-plane to produce the final result. (Note that in SBS, the subtitles are squashed horizontally, and therefore the X positions and width of the bitamps are divided by 2. I haven't taken that into account in my explanation above.)

So, IMO, the conversion works fine. The fact that the additional depth is not treated the same way than the depths of the 3D-planes is questionable, but if you remember that it must be multiplied by 2 to obtain the same result, it works as expected.

Perhaps you have experienced a bug if you convert an XML/PNG stream? Can you confirm that your input stream is in BD SUP format?

Selection of BD SUP:

The default selection of the output format should persist during the current BD3D2MK3D session, but is is forgiven when you quit the program. The default selection in a new session depends of your setting in tab 2 of the main GUI: it should be VobSub or BD SUP depending of the "Subtitle stream format" option in that tab. But I agree that there is a little bug here. If in tab 2 you select "both", no format is selected by default in the GUI of the conversion tool. I will fix that bug immediately. Thanks for the report! [EDIT: Done.]
__________________
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; 23rd February 2015 at 13:47.
r0lZ is offline  
Old 24th February 2015, 12:43   #200  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,469
Sorry for replying so late. I have had a look at your files, and I can certify that there is no bug. However, I must agree that there is a big discrepancy.

As I have explained in my previous post, the depth stored in the 3D-plane must be used in the two views of the movie. For example, if the depth is 4, that means that the left view must be shifted to the right by 4 pixels (without the resize in SBS mode). And vice-versa for the right view. That means that the total offset between the 2 views is 8 pixels. (A 2D subtitle with its original X position being 500 will therefore be placed at position 504 in the left view, and at 496 in the right view. 504 - 496 = 8)

Unfortunately, when I have learned how to use the 3D-planes, I was convinced that the value stored in the 3D-plane was the total offset. Therefore, I have written the functions that shift the planes so that the left plane is shifted to the right by the depth / 2 (therefore by 2 in my example), and vice-versa for the right view. That was wrong, as Thalyn has discovered. V0.45 fixed that bug.

When I realized that that was a bug, I have simply multiplied the value of the depth passed to the function by 2, so that it is correct again when it is divided by 2. It's also that value multiplied by 2 that is stored in the temp 2D XML file. That has the advantage that it is possible to use an odd value for the total offset. For example, if you specify 5 as the additional depth, the left subtitle will be shifted to the right by 2 pixels, and the right subtitle will be shifted to the left by 3 pixels, giving the exact total offset of 5 pixels. (Same thing if you edit manually a <Depth> value in the XML.) It's why you see also doubled values in the log of the conversion functions. I agree that it's not at all intuitive, but I did that that way for historical reasons, and currently I like to keep it as it is for the possibility to specify odd depth values. The result IS correct, although the depth really used is twice the one stored in the 3D-planes.

I may change that later, but honestly, I think that it works correctly now, and I don't want to risk to introduce new bugs. However, I will add a warning in the 3D-planes logs to explain that the 3D-planes contain actually the full offset divided by 2, and that BD3D2MK3D uses internally the full offset, not divided by 2.
__________________
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; 24th February 2015 at 12:53.
r0lZ is offline  
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:18.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.