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 30th August 2014, 12:07   #81  |  Link
Thalyn
Registered User
 
Join Date: Dec 2011
Posts: 129
You might need to put up a bugfix for that one - when it comes up asking to select the language for the resulting generated 3D subtitles I'm having trouble interacting with the new little window. Basically it's not accepting any input aside from moving it around by dragging the title bar, and even while doing that it's behind the window for all the other settings. It seems to be happier the second time around, though, and that includes simply hitting the "Convert subtitles to 3D..." button again and dismissing the error.

On a slightly different note, I've found another curiosity. I've been running through the last of my movies with forced subs and occasionally I'll see a "UndefinedFrameDepths" in the XML. Fairly obvious in function and the number following it indicates the number of frames the subtitle is visible for which don't have a defined depth. Thing is that often seems to return a 0 output, where a 0 isn't necessarily correct when viewed from the original disc. The first two subtitles in Immortals are correctly set to 0, but Cars 2 has a 0 where a 14 should be and John Carter has a 0 where a 10 should be. Setting the margin to 0 only affected Cars.

If you combine that with the behaviour of TotalMedia Theatre, which actually changes the depth while the sub is still displayed, I'm wondering if there's actually some kind of "rolling" depth - each subtitle is displayed at the depth last encountered before it goes up if a new depth wasn't set on the first frame. This would also fit in with most players given they don't even bother displaying a "soft" subtitle in the event you skip the first frame it's displayed, suggesting they don't give two hoots about what happens after that first frame.

To that end, I've uploaded the John Carter forced sub track and corresponding planes file. Sub #30 ("Let Sola have a hatchling.") is the one that gives a 0 from the tool but visual inspection suggests a 10 (or there-abouts) is more appropriate.

https://mega.co.nz/#!c8EiWBhL!8QYi_H...HlxRWdypB99nTI
Thalyn is offline  
Old 30th August 2014, 12:53   #82  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,393
OK, I think I've fixed the bug of the language selection window behind the others. Can you confirm that you had that problem when doing a complete conversion of a BD to 3D (and not when converting a subtitle with the "Convert subtitle to 3D" tool) ? It is strange that you had that dialog when converting a BD. Normally, it is used only when the language is unknown, and when a BD is converted, the language is known, because it is retrieved from the MPLS by tsMuxeR. Therefore, the window should not be opened.

Also, BD3D2MK3D assumes that the language code present in a IDX or XML file is correct and doesn't ask you to confirm it. Therefore, the window should be displayed only for BD SUP conversions. And even in that case, BD3D2MK3D tries to find the language automatically with the file name. For example, with this file name, it assumes French: 00800.track_4609.Fra.sup. And if it doesn't find the ISO language code in the file name, it searches also for the full name of the language (in English only), like in this example: subtitle_French.sup. It's only when all that methods fail that it displays the little dialog.

BTW, that dislog is also used when you click the [...] button in Settings -> Automatic streams selection. In that case, it should work normally. Can you confirm that too?


I will have a look at your subtitles. Normally, a subtitle depth is considered undefined if all depth values in the 3D-planes for the frames corresponding to the "window" have the value 0x80 (or -0 once translated into depth value). Many BDs have 32 3D-planes, but most of them are made of undefined depths only, and are therefore deleted after their extraction, because they are totally useless. Some non-empty 3D-planes have some values with undefined depths, but normally they should be present only in frames without subtitles. When there are defined and undefined frames, BD3D2MK3D uses of course only the defined depths to compute the final depth. Of course, when it finds only undefined depths, it cannot compute the right value, and assumes 0. It is not possible to change the depth of a specific subtitle when it is displayed, therefore BD3D2MK3D uses always the highest valid depth (not counting the undefined -0 values). I wonder why other programs assume a depth of 10 if all depths are undefined. Maybe it takes the last (or next) valid depth encountered in the 3d-plane? Anyway, I'll have a look right now...
__________________
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 30th August 2014, 13:47   #83  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,393
OK, no need to reply to my questions in the post above. I have found and fixed the problem. It was happening when using the Tool and (probably) not when processing a whole 3D BD. There was no problem when using the language selection dialog from the Automatic Stream Selection setting dialog. Thanks for having submitted that bug!

I still have to understand what's happening with the wrong depth of the 3D subtitle, and I will release v0.48. In the meantime, I have deleted v0.47. If you want to download BD3D2MK3D, please come back in a moment...
__________________
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 30th August 2014, 14:52   #84  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,393
After a quick analyse, I see that the depths of the frames of subtitles #29 and #30 are indeed undefined. There is a lot of undefined values before that frames, and I don't think the player takes its value from the last valid frames. However, soon after the frames of that 2 subtitles, there are some frames with a depth of 7. Now, I must understand why they are used by other programs and not by BD3D2MK3D. That may be because BD3D2MK3D uses non-drop time codes, and the other programs use drop frames. But that's strange. I have closely verified with several BDs, and the cuts in the movies correspond exactly with abrupt changes in the depth values of the 3D planes, so I have supposed that my method is correct. Perhaps there are exceptions.

To easily debug, I have modified the UndefinedFrameDepths tag to display also the frame numbers (as computed currently by BD3D2MK3D). Here is what it displays for subtitles #29 and #30:
Code:
<Event InTC="00:34:31:15" OutTC="00:34:32:15" Forced="False">
  <Graphic Width="209" Height="54" X="853" Y="822" Depth="0" UndefinedFrameDepths="15, frames=49669 to 49693, window=49674 to 49688">temp_2D_0029.png</Graphic>
</Event>
<Event InTC="00:34:32:20" OutTC="00:34:34:10" Forced="False">
  <Graphic Width="658" Height="54" X="629" Y="822" Depth="0" UndefinedFrameDepths="29, frames=49698 to 49736, window=49703 to 49731">temp_2D_0030.png</Graphic>
</Event>
If you examine the 3D-plane with an hex editor, you'll see that the depths are undefined from frame 38750 up to frame 49728. Then the depth is 7 in frames 49729 to 49782 (54 frames), and they are followed by a lot of 4s.

So, I guess that I have to compute that frame numbers using drop time codes. They will probably be correct. But I have to understand when I must use drop time codes and when not. It's probably in the header of the 3D-planes, but currently BD3D2MK3D ignores it. Anyway, that will be a relatively important modification for me, and I think I will release v0.48 immediately, even if that problem is still not fixed.

Damn! I HATE that crazy NTSC frame rates. We are in the 21st century, and continuing to use them for digital HD (and especially forcing the whole world to do the same thing) is probably the most stupid thing the designers of the BD standard have made! It would have been so simple to simply use the film rate of 24fps! It's what most European 2D BDs do, but it's prohibited for the 3D! Unbelievable!
__________________
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; 30th August 2014 at 14:54.
r0lZ is offline  
Old 30th August 2014, 16:17   #85  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,393
BD3D2MK3D v0.48

Well, the short tests I did are not sufficient to be sure of the method to use, so I will have to make numerous tests with my collection of BD3Ds. That will take much time, so I have decided to release immediately the bug fix for the problem of the language selection window introduced in the latest version.

But the problem of the wrong depth values is still NOT fixed. You may want to wait some days if you need to do conversion with 3D subtitles. In the meantime, v0.48 should work fine for the conversions without subtitles or with 2D subtitles only.
Quote:
# v0.48 (August 30, 2014)
# - Fixed a bug in v0.47b1 with the new language selection dialog appearing beneath the other windows and impossible to use and close.
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 31st August 2014, 05:13   #86  |  Link
Thalyn
Registered User
 
Join Date: Dec 2011
Posts: 129
While I know accuracy is important, I can't help but feel I should apologise for finding these bizarre exceptions. I don't like creating extra work for people who are already putting in so much effort unless it's absolutely necessary, and no-one can argue you haven't gone above-and-beyond with this tool.

Knowing that the planes are just a basic hex list (I didn't even think to look!) even disproves my theory of a "running" plane, since the last defined value at that point would have been a 2 where my pixel-counting estimates suggest it should be a 5 or 6 - and that previous 2 would then also have been applied to sub #29 which is actually rendered as a 0 (but could be a 1 since I'm verifying with PDVD for now as my TMT is only a trial and I can't always borrow a PS3). Gah! At least it only seems to be 1 out of about 50 subtitles that are actually negatively affected by this. Still means its worth manually checking ones which report the undefined depth just to be sure, and that's still a lot easier than having to do every single one of them by hand.

Plus side, the language selection dialogue worked just fine.
Thalyn is offline  
Old 31st August 2014, 09:18   #87  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,393
Don't worry. I appreciate your help, and I ask you explicitly to continue to notify me of the discrepancies or bugs you find. Especially with the problems related to the subtitles, that I can't check easily due to my lack of appropriate hardware. Each time I want to check the accuracy of the 3D subtitles generated by BD3D2MK3D, I have to hardcode them on a video, and of course, that means that I have to recompute the whole movie with x264. It's a long operation, and therefore I can't do many tests. For that reason, I need the help of everyone.

Anyway, I should have examined the Depth values in the temp 2D XML files with more attention. The fact that there are some warnings about undefined depths when converting subtitles coming from the original BD is an evidence that something goes wrong. I have just finished to encode Avatar during the night, but this time I've used a frame rate of 24fps instead of 23.976 to translate the timecodes of the subtitle stream to frame numbers. In other words, I have assumed that the subtitle streams (at least the XML streams converted from the original SUP file by BDSup2Sub) use drop frame timecodes. If that assumption is correct, the result should be slightly better than my previous encodings, and the obviously wrong depth of a couple of subtitles (that I have previously attributed to slight authoring errors) should be correct now. I still have to watch the movie, but if it's the case, the fix is probably easy. It is sufficient to modify the frame rate in my code. But I must be sure that the fix works for every movie, and in other words that there is no "hidden" drop frame flag in the header of the 3D planes. As you can see here, Bigotti5 helped me much to decipher the content of that header, but there are still unknown bits in the header. It is possible that we don't have yet the information necessary to correctly compute the frame numbers if the frame rate to use depends of the BD.

Anyway, first things first. I will watch my last encode of Avatar and if it is convincing, I will release a new beta soon. Then, you will have to test if the 3D subtitles are correct.

BTW, you can already do some tests at 24fps if you wish. Use 3DBD2MK3D to generate the project, but re-generate the 3D subtitle stream(s) with the Convert subtitles to 3D (with 3D-planes) tool. In the tool's dialog, simply change the frame rate from 24/1.001 to 24, and overwrite the original 3D subtitle stream. You can then encode normally (or, if you have already encoded the h264 stream and you don't need to hardcode the subtitles, just launch the _MUX_3D.cmd batch to generate the final MKV). And enjoy the movie, hopefully with good 3D subtitles. :-)
__________________
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; 31st August 2014 at 09:20.
r0lZ is offline  
Old 1st September 2014, 06:27   #88  |  Link
Thalyn
Registered User
 
Join Date: Dec 2011
Posts: 129
I suppose there is also one other possibility we have to consider: whether tsMuxer is returning the correct plane or not. All the correction in the world won't make a lick of difference if we're using the wrong input data, after all.

On the same note, I'm going to have to look into getting a second opinion for my own tests. Given previous experience we also can't assume that PowerDVD is using the correct plane so I'll need a more permanent option for double-checking the results than a 15-day trial of TMT or a curious brother.
Thalyn is offline  
Old 1st September 2014, 09:35   #89  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,393
I think tsMuxeR does the job well. Usually, subtitle stream #0 uses the 3D-plane #0, subtitlle #1 use plane #1, and so on. That seems coherent. However, in some BDs, there are several MPLS that references exactly the same M2TS file(s), with the MVC stream (therefore it's a 3D MPLS), and with the same audio and subtitle streams, but without the 3D-planes information, or with a different 3D-plane information. For example, for a movie with 3 subtitle stream, the first MPLS could assign 3D-planes 0, 1 and 2, the second 1, 2 and nothing for the third subtitle stream, and the third MPLS could have all 3D-planes set to "zerro" (sic).

Also, I still don't know what means that "zerro" 3D-plane. It doesn't seem to be 3D-plane #0, and currently BD3D2MK3D treats it as undefined. But since there are also subtitle streams without any indication for the 3D-plane, there must be a difference. I suppose that when tsMuxeR shows nothing, that means that the info is missing from the MPLS, and when it shows "zerro", that means that it has found the info. The question is, why is it decoding that info to "zerro"?

When there are several MPLS referencing the same 3D content, BD3D2MK3D displays by default only one MPLS. (You can force it to display all 3D MPLS with the "Show all 3D playlists" button in tab 1.) And it tries to show the MPLS with the "best" 3D-planes description: the first one with all subtitles with a 3D-plane. (The "zerro" info being assimilated to "missing".)

Note also that on some 3DBDs, there are also subtitle streams in the M2TS file of the dependent view (MVC). They are often exact copies of the streams present in the AVC, and I wonder what is the benefit to include the same streams twice. Note that eac3to does not show that "secondary" subtitle streams, but it fails when trying to demux the main streams, because that additional streams have the same ID than the corresponding streams in the AVC. Therefore, it mixes two streams together, and issues a lot of error messages about overlapping timecodes. The resulting demuxed streams are unusable. (tsMuxeR 3D doesn't have that problem.)

Sometimes, like in Avatar, there is only one additional stream in the MVC, and it is a full-size image (without transparency) with a text telling something like "Put your 3D-glasses now" during the whole duration of the movie. I don't understand why they need that subtitle in the main movie. IMO, that message should be displayed only before the movie begins. Anyway, that subtitle has no 3D-plane information, and I guess it's normal, since it is totally opaque.

I have seen also sometimes movies with only 1 subtitle stream, but there are 2 non-empty 3D-planes in the MVC. The first one (#0) has a fixed depth, and 3D-plane #1 has valid depth values. The subtitle stream is correctly associated with 3D-plane #1. I wonder why the authoring program has created that useless 3D-plane #0, but anyway, the info of tsMuxeR is correct.

So, in short, I think we can trust tsMuxeR, but I would like to understand why it displays "zerro" sometimes, and I'm not totally sure that the logic used by BD3D2MK3D to determine the "best" MPLS to show in the case of several identical playlists is correct, although, as far as I know, it is always coherent.
__________________
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 2nd September 2014, 08:29   #90  |  Link
Thalyn
Registered User
 
Join Date: Dec 2011
Posts: 129
That all being the case, I think I have a new hypothesis as to what's happening; again using John Carter as reference.

I'm wondering if there's some kind of plane "hierarchy" where those frames defined as 0x80 (effectively nothing) actually use a different plane to source their information from. Using TMT to double-check for the correct offsets I have determined that subs 29 and 30 of track 10 have depths of 1 and 6 respectively. Using the frame numbers from your earlier post the assigned plane 7 has those locations as entirely 0x80, but if I check the other files I find a 1 and 6 present at what appears to be an appropriate location in plane 1 (no other planes have these values nearby). Plane 1 is used for subtitle track 9, which is the one right before the one I'm using.

In saying that, the frame numbers don't exactly match up - the movie frame is before the offset I'm checking by 52 frames. I'm taken to believe there's actually a small delay at the beginning of most streams used in video to allow for syncing which could explain the offset. My napkin math doesn't quite match up with your tool either so there's obviously a discrepancy I'm not taking into consideration, so that could be expected (napkin math puts the difference at 63-64 frames depending on rounding). The 0x06 entries start at offset 49743 in the plane file while TMT shows sub #29 changing depth at the very end.

The question is whether this hierarchy is simply a case of "If not found, use previous track's plane (and keep going back as necessary)" or "If not found, use pre-designated plane" - answering which would require more knowledge of how the MPLS structure works than I have. I'm inclined to believe it's simply a "previous track" deal myself but I have nothing over a gut feeling to back that up. Both seem wasteful since 0x80 takes as much storage space as the correct value, unless the planes are compressed using a system like RLE8 in which case it would be slightly more storage efficient.

This may also be what's indicated by a "zerro" plane - one which simply references another in its entirety, in the event it doesn't actually mean "all zeros". Though why it isn't just assigned to the other plane directly is again confusing.

Unrelated, I don't recommend TMT for 3D playback. At least, not if you have a passive screen - it produces the same aliasing I observed when simply taking alternating scanlines for each stream, yielding a watchable-but-slightly-unpleasant result.

*ed: A simpler but possibly still correct way for these 0x80 subs to get a depth could be just a simple plane "stack". JC, for example, has 10 subtitle tracks with the one I'm wanting to use conveniently being the last. To get the final depths it could just load all the depths starting from the first subtitle track and ending with the requested one, overwriting the depths as it goes with 0x80 meaning "keep the existing value". As such it would load (in order) plane 8, 0, 5, 9, 2, 3, 6, 4, 1 and then 7. It seems wasteful and inconvenient, but so is having undefined depths to begin with.

Last edited by Thalyn; 2nd September 2014 at 08:44.
Thalyn is offline  
Old 2nd September 2014, 11:14   #91  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,393
Hum, interesting theory, but I don't think it is correct, because the method is unnecessarily convoluted. Also, if your theory is correct, that means that subtitle track #0, usually associated with 3D-plane #0, will have only a single plane to retrieve its depth values, but subtitle stream #1 will have 3D-planes 1 and 0, and so on up to subtitle stream #31, that will have the possibility to find its depth values within 32 different 3D-planes. That's obviously unfair for the first streams (usually the most important ones). OK, you suggest other methods, but again there is no evidence that something like that is supposed to happen, and if it's the case, we have no way to determine the correct order anyway. But I'll remember the idea. When converting a subtitle that does not comes from the original BD (for example when it's a SUP converted from a SRT downloaded from the internet), it might be a good idea to use several planes to avoid undefined depths. I may implement that idea later, but for the present, I want to solve the problem of the original subtitles first.

In fact, I don't think your theory is correct mainly because I did some new tests and modified my code accordingly, and I think now that everything works as expected. It is still necessary to confirm that the new code works in all cases, but I'm confident.

I have written a new function to analyse the content of the 3D-planes, and output the "shots" in human readable form. That means that for all series of identical depth values, it outputs the frame number corresponding to the start of the series, the depth value, and the number of frames with that depth value, before the next "cut". My idea was that normally, the depth values within the 3D-plane must change abruptly when there is a cut in the movie (and the two shots have different depths). I have then compared the frames of the beginnings of the shots with the shots of a little bonus video from T.S. Spivet. My theory is certainly correct, because the frame numbers of the changes are similar in the 3D-planes and in the clip. However, the changes in the 3D-planes comes systematically 3 frames before the cut in the movie. I don't understand why, and I still have to verify if similar discrepancies exists with other 3DBDs. But the important thing is that the shift is identical at the beginning of the clip, and near its end. That proves simply that there is a 1:1 relationship between the depth of the shots of the movie and the 3D-planes, and that there is really 1 byte per frame in the 3D-plane. It's not something new, but it's a confirmation that we are correct up to that point.

So, I have decided to modify the output of the temp 2D XML file produced when a 2D stream is converted to 3D. In addition to the <Depth> tag (and the optional <UndefinedFrameDepth> tag), I have added a <Debug> field with the start and end frame number of the subtitle (as computed by BD3D2MK3D), the start and end frame of the "window", and the content of the 3D-plane within the window in human readable form. Then, I have played an AVS script with the movie and the original SUP stream, frame by frame with AvsPmod, and I have verified if the subtitles appear and disappear exactly at the frame numbers printed in the <Debug> field of the XML (and I have tried to determine if the depth value is also logical, although I have not measured precisely). That test confirms that the method used until now to compute the frame numbers WAS WRONG. The problem is that in the XML and IDX files, the start and end times of the subtitles are expressed in timecodes and not in frame numbers. Since I need the frame numbers to retrieve the depth from the 3D-plane, it is necessary to convert them. The conversion used the real frame rate (23.976, or more precisely, 24/1.001). My error was to assume that like in the DVDs, the frame rate to use was the "non-drop timecodes". As a consequence, the conversions to frame numbers were wrong, and the error was important, mainly near the end of the movie. I have of course tested with "drop timecodes" (and assumed therefore a frame rate of 24fps) and with that method, all frame numbers printed in the XML match exactly the frame numbers I saw when I have played the AVS. Also, all subtitles of the short movie I have used to test have now perfectly defined values, and one and only one depth. I'm almost sure that all problems came from that error.

Note that computing the frame numbers at 24fps is NOT the same thing as converting the whole subtitle stream at 24fps. The conversion of the subtitle must still be made at 23.976, but the computation of the depth values from the subtitle's timecodes must be done at 24fps. It is therefore not sufficient to overwrite the original 3D subs with a new conversion made with the conversion tool at 24fps, as I suggested earlier.

I have also encoded Avatar with all French subtitles hardcoded on the video, but I have not watched it yet. IMO, the result will be perfect, and that will confirm that the new method is correct.

The last annoying thing is that shift of 3 frames I have noticed with the cuts in the 3D-planes. Since that 3 frames are less than the default value for the "window" (5 pixels), it has no visible consequence. But if the shift is greater than 5 frames in some BDs, I will have to understand why that happens, and how to fix the problem. But I think that it's probably a minor authoring bug, or perhaps a deliberate shift, because I have noticed also that no subtitle appear directly after a cut in the movie. There is always at least 3 frames between the cut and the appearance of the subtitle. Same thing before the cut. The subtitles end always at least 3 frames before the cut. So even with a window of 0, the shift has no consequence. It remains that that shift is difficult to understand and somewhat annoying. I will therefore do some new tests (and watch Avatar) before releasing the new version, just to be sure. Then we will have to verify if the new method works in all times, and that there is no "drop vs. non-drop" flag hidden somewhere in the header of the 3D-planes. That means that it will still be necessary to verify carefully the conversions of the subtitles to 3D. It's why I will not remove the debug code from the next versions, so that everybody will be able to use the tools to verify...
__________________
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 2nd September 2014, 16:45   #92  |  Link
Thalyn
Registered User
 
Join Date: Dec 2011
Posts: 129
I'll definitely defer to your wisdom regarding my theory. I'm nowhere near as experienced with all of this as you are - I'm just a bit of a math nut who can find patterns (sometimes where there isn't even meant to be one to find).

The 3 frame shift does actually make sense of what I've been seeing in TMT, however. A lot of times the subtitle will suddenly adjust depth just before it stops being displayed (another thing which makes it less-than-desirable for 3D playback) - and that jump corresponds to the depth of the following subtitle. Presumably that also corresponds with a scene cut but I can't actually say I've paid that much attention to it. Because they don't seem to like frame-by-frame viewing I've never been able to get an accurate count of exactly how long that shift lasts but 3 frames isn't outside the realm of possibility. Sadly, I've no way to determine whether any have ever been over 5 because it really is just a fraction of a second, plus it is a little jarring to watch.

I look forward to testing the results of your new methods. A couple of titles have given me slightly off results so far, soI've got a baseline to test against.
Thalyn is offline  
Old 2nd September 2014, 17:31   #93  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,393
You can preview a MKV movie frame by frame with a simple avisynth script:
Code:
FFMpegSource2("movie.mkv")
Info()
The FFMpeg avisynth plugin must be properly installed, and the script takes ages to start the first time because ffmpeg has to scan the whole MKV file to generate its ffindex file. But when it has started, you can accurately play the movie frame by frame and see the frame number in the info. I use the AvsPmod GUI to play the script and I use exclusively the cursor keys, or I type timecodes or frame numbers for "big jumps". That works pretty well. (However, you cannot seek with the 3D scripts generated by BD3D2MK3D due to the lack of the seek support in the current MVC decoders, so you have to do your tests with the encoded MKV, or with the 2D M2TS.)

In my latest tests (after the fix explained above), I have never seen "cuts" inside the depth values corresponding to a particular subtitle. So, maybe your test is biased by the bug of the current version, or you have a movie with a larger shift than the 5 frames of the default "window". Anyway, I guess that problem will be solved with the new version...
__________________
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 10th September 2014, 10:47   #94  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,393
BD3D2MK3D v0.49

Finally, the fix for the 3D-planes bug is here. It was difficult to fix it, because in addition to the wrong frame rate used previously when converting the timecodes of the subtitles to frame numbers (23.976 fps non-drop frames instead of 24 fps drop frames timecodes), Thalyn has discovered a big bug in the output of tsMuxeR. I have had to implement a workaround for that bug, and that was not easy, difficult to test, and somewhat tedious. But this version should work well and has been extensively tested by Thalyn and myself.

The problem of tsMuxeR is that it retrieves the streams in the M2TS (or SSIF) files rather than in the MPLS file. That's normal for a demuxer, because the MPLS does not always lists all streams present in the M2TS files. But the drawback is that tsMuxeR shows the streams in the order of their IDs, and not in the order of the MPLS. In the other hand, all players shows the audio and subtitle streams as they are in the MPLS, and not necessarily in the order of their IDs. It was therefore difficult for the user to check what streams he wants to include in the MKV with the preview, since the streams are not necessarily presented in the same order. But that's not the main problem.

As you know, tsMuxeR shows also the number of the 3D-plane associated with a specific stream. To properly convert the subtitles to 3D, the right 3D-plane must be used. But the 3D-plane numbers are stored in the MPLS file, in the order of the MPLS, and not in the order of the IDs. Hence the tsMuxeR bug. It assigns the 3D-planes sequentially to the streams, but since the streams are not in the order of the MPLS, the corresponding 3D-planes are sometimes completely wrong!

Currently, BD3D2MK3D uses a workaround to restore the audio and subtitle streams in their correct order and to re-assign the 3D-planes to the right subtitle streams. I have the intention to write myself a complete parser of MPLS files, but I need some time and the info needed is difficult to get (hence this thread). Since I wanted to quickly fix the 3D-plane bug, I have preferred to implement a temporary workaround. I will do the parsing myself in a forthcoming version.

Luckily, with the previous versions, the 3D-planes are usually correctly assigned to the subtitle streams, because the order of the subtitle streams in the MPLS is often equal to the order of the IDs. But unfortunately it's not always the case. So, if you have created 3D subtitles with a previous version of BD3D2MK3D, it may have used a wrong 3D-plane, and the depths of the subtitles can be more or less wrong. You may want to verify if the subtitles are correct with the new version, and convert them again if needed.

To see if a subtitle had a wrong 3D-plane with an old version, open the BD in the new version, select the playlist, and examine the list of subtitle streams in tab 1. You will see strings like "Stream #0", "Stream #1", "Stream #2", "Stream #3"... That numbers correspond to the order of the IDs, used by tsMuxeR. If the MPLS file lists the streams in a different order, that streams will be presented in a non-increasing order, such as "Stream #0", "Stream #2", "Stream #1", "Stream #3"... In this example, the streams #0 and #3 have not moved, and they had therefore the correct 3D-plane with the previous versions of BD3D2MK3D. You don't need to re-convert them. But as you can see, streams #1 and #2 have been inverted, and therefore the 3D-planes were wrong in the previous versions. You should therefore verify them, and if the depths of the subtitles are obviously incorrect, you should re-convert them to 3D with the correct 3D-plane. Sorry for that!

Here is a concrete example. This is what you can see when you select 00004.mpls of the 3DBD The Smurfs:
Code:
Streams of 00004.mpls,  1:42:43, 16 chapters,  00002+00003.ssif  :

Video   : MPEG4/ISO/AVC (Profile: High@4.1  Resolution: 1920:1080p  Frame rate: 23.976)
Video   : MPEG4/ISO/MVC (H.264/MVC Views: 2 Profile: High@4.1  Resolution: 1920:1080p  Frame rate: 23.976  3d-pg-planes: 32)
Audio   : Eng DTS-HD  (Bitrate: 1536Kbps  core + MLP data.Sample Rate: 48KHz  Channels: 5.1 (DTS Master Audio))
Audio   : Eng AC3  (Bitrate: 448Kbps Sample Rate: 48KHz Channels: 5.1)
Audio   : Fra AC3  (Bitrate: 448Kbps Sample Rate: 48KHz Channels: 5.1)
Audio   : Nld AC3  (Bitrate: 448Kbps Sample Rate: 48KHz Channels: 5.1)
Audio   : Nld AC3  (Bitrate: 448Kbps Sample Rate: 48KHz Channels: 5.1)
Audio   : Ita AC3  (Bitrate: 448Kbps Sample Rate: 48KHz Channels: 5.1)
Audio   : Eng AC3  (Bitrate: 192Kbps Sample Rate: 48KHz Channels: 2)
Audio   : Eng AC3  (Bitrate: 192Kbps Sample Rate: 48KHz Channels: 2)
Subtitle: Eng PGS  (Stream #0 3d-plane: 0)
Subtitle: Eng PGS  (Stream #1 3d-plane: 1)
Subtitle: Ara PGS  (Stream #5 3d-plane: 3)
Subtitle: Nld PGS  (Stream #4 3d-plane: 14)
Subtitle: Fra PGS  (Stream #2 3d-plane: 11)
Subtitle: Hin PGS  (Stream #6 3d-plane: 4)
Subtitle: Ita PGS  (Stream #3 3d-plane: 2)
Subtitle: Eng PGS  (Stream #7 Resolution: 1920:1080 Frame rate: 23.976 3d-plane: 5)
Subtitle: Ara PGS  (Stream #11 Resolution: 1920:1080 Frame rate: 23.976 3d-plane: 6)
Subtitle: Nld PGS  (Stream #10 Resolution: 1920:1080 Frame rate: 23.976 3d-plane: 13)
Subtitle: Fra PGS  (Stream #8 Resolution: 1920:1080 Frame rate: 23.976 3d-plane: 12)
Subtitle: Ita PGS  (Stream #9 Resolution: 1920:1080 Frame rate: 23.976 3d-plane: 15)
Subtitle: Eng PGS  (Stream #12 Resolution: 1920:1080 Frame rate: 23.976 3d-plane: 7)
Subtitle: Ara PGS  (Stream #16 Resolution: 1920:1080 Frame rate: 23.976 3d-plane: 9)
Subtitle: Nld PGS  (Stream #15 Resolution: 1920:1080 Frame rate: 23.976 3d-plane: 16)
Subtitle: Fra PGS  (Stream #13 Resolution: 1920:1080 Frame rate: 23.976 3d-plane: 10)
Subtitle: Ita PGS  (Stream #14 Resolution: 1920:1080 Frame rate: 23.976 3d-plane: 8)
The streams in red have moved, and therefore the 3D-plane numbers ware wrong in the previous versions.

Note that in addition to the different order, tsMuxeR shows also always all streams physically present in the M2TS/SSIF files. However, sometimes, a stream is skipped in the MPLS file, because, for various reasons, the author of the BD doesn't want it to be accessible to the users. When it's the case, that stream cannot have a 3D-plane, because the 3D-planes are defined only for the streams really present in the MPLS. Since it is possible to demux it anyway, currently BD3D2MK3D continues to list it, but it is rejected to the end of the list, it has no 3D-plane and I've added the stream 'Phantom track!', to let the users know that that stream is not officially present in the MPLS. If you decide to demux it anyway, BD3D2MK3D will pick an existing and valid 3D-plane, but without guarantee that it's the right 3D-plane to use. If you want to demux that track anyway, it might be a good idea to click the "Show all 3D playlists" button, and see if there is another MPLS that uses that track "officially". (A good example of this are the Japanese audio and subtitle tracks of 300: Rise of an Empire. In the main movie MPLS, the 2 Japanese tracks are phantom tracks, but there is an additional MPLS file with the English and Japanese languages only.)

Big thanks to Thalyn for having discovered that bugs in my code and in tsMuxeR, and for having tested numerous betas!

In addition to the fix for the wrong frame rate and wrong 3D-plane numbers, the new version fixes also some other minor bugs, improves some things and adds a new hidden debug option (useful mainly for me and the beta-testers). I'm too lazy to describe that points in details, but here is the change log:
Quote:
# v0.49 (September 10, 2014)
# - Fix: Changed the frame rate when converting the time codes of the subtitle files from 23.976 to 24 (drop frames timecodes).
# - Fix for a tsMuxeR bug: The order of the audio and subtitle tracks is not always correct. The order is now restored.
# - Fix for a tsMuxeR bug: When the order of the subtitle streams is wrong, the 3D-plane numbers were assigned to the wrong streams!
# - Added the number of changes of depth value in the stats about the 3D-planes data.
# - Fix: Tool -> Convert subtitles to 3D (with 3D planes): It was impossible to convert only the forced subtitles when the input format was XML/PNG.
# - Improved the detection of the language from the filename when processing a BD SUP file from the Tools menu.
# - Tool -> Find dependent-view (MVC) file(s): Improved method to detect the M2TS of the MVC streams
# - In tab 1, you can now copy the content of the two lists to the clipboard by right-clicking the listbox.
# - Added the hidden option "debug" in the config file to run the program in debug mode.
# - Added Debug -> 3D-plane debug info, to display the content of a 3D-plane file in human readable form.
# - Added Debug -> Show tsMuxeR/eac3to's MPLS info, to show the unmodified output of tsMuxeR or eac3to for the current MPLS.
Please download the new version and don't use the older versions any more!
__________________
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 September 2014 at 11:15.
r0lZ is offline  
Old 10th September 2014, 11:12   #95  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,393
Here is a list of the 3D BDs affected by the 3D-planes bug of tsMuxeR, discovered so far by Thalyn, Nico and me. If you discover other examples, please let us know.

300: Rise of an Empire (Has also a "phantom" Japanese subtitle track) (Only some editions)
Despicable Me
Dredd
Frankenweenie
Ghost Rider 2 (Has also a "phantom" English subtitle track)
Gravity
John Carter (Only some editions)
Need For Speed
Pacific Rim
Rio
Sanctum
The Great Gatsby
The Smurfs
Thor II (Only some editions)
Wolverine

There are much more BDs with the audio tracks presented in the wrong order, but since that was not the cause of bugs with the previous versions, I don't list them here.

I will check my 3DBD collection to see if I can find more examples, and I will add them in this post...
__________________
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; 15th September 2014 at 16:31. Reason: added new titles discovered by Nico
r0lZ is offline  
Old 22nd September 2014, 02:30   #96  |  Link
Marty
Registered User
 
Join Date: May 2014
Location: Most, Czech Republic
Posts: 15
Java error

Hi all,

i am a newbie in using bd3d2mk3d soft and solves the problem. After click on Convert subtitles to 3D, pop up error window, i atach this

Name:  java error.jpg
Views: 730
Size:  199.9 KB

Edit: im using Win7-64 bit, Java 32-bit i have installed

Last edited by Marty; 22nd September 2014 at 02:32.
Marty is offline  
Old 22nd September 2014, 06:50   #97  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,393
Welcome to the Doom9 forums, Marty.

I don't know the cause of this error. Are you sure that you have the latest version of java? (32-bit is OK.)

Try to use the C++ version of BDSup2Sub, and see if it helps. (Change the version to use with the Settings menu. I don't recommend yo use the ++ version, but in this case, maybe there will be a better error message, or it will work just fine.)

What is the source of the subtitle you are converting? I see it's an XML file. I guess you have converted another stream to XML first. What program did you use to do that conversion, and what was the format of the original stream?

I suppose that the error can be caused by something odd in the source XML file, like a malformed string. Have you manually modified it before converting it?

Can you send me the "Titanic 3D.xml" file as well as the 3D-plane file, and, if you still have it, the "temp.3D_left.xml"? (You'll find my email address at the bottom of the PgcEdit home page.)
__________________
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; 22nd September 2014 at 06:53.
r0lZ is offline  
Old 22nd September 2014, 12:02   #98  |  Link
Marty
Registered User
 
Join Date: May 2014
Location: Most, Czech Republic
Posts: 15
Thx for quick reaction.

Yes i have latest version of 32-bit Java. I converted .srt subtitles in 3D subtitler.

I progressed by this video guide - https://www.youtube.com/watch?v=vuBhJ0yVTOM
Marty is offline  
Old 22nd September 2014, 13:50   #99  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,393
I didn't know that guide. Thanks for the link.
I received the files, and I will have a look...
__________________
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 22nd September 2014, 14:05   #100  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,393
Oops! I see. There is a big bug when converting subtitles to full-SBS or full-T&B. I will release a fix very soon.
Thanks 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  
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 14:50.


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