View Full Version : BD3D2MK3D v1.17: Convert 3D BDs or MKV to 3D SBS, T&B or Frame-sequential MKV
tomilein
28th June 2017, 00:12
@r0lZ
Hello and thank's for your reply.
You are right, it's fast and easier way over MkvToolnix.
Works great.
Thank's for statement.
@tebasuna51
Hello and thanks you too for the Hint.
r0lZ
13th July 2017, 08:15
v1.1 (July 13, 2017)
- Added Cinavia detection by right-clicking on an audio track in tab 2. See also the Help -> Cinavia Detection menu.
- Tools -> Convert Audio: Added the possibility to specify a positive or negative gain.
- Convert SRT to ASS 3D: Added the percentage of the margin height in the analysis of the guide file (useful for SubtitleEdit)
- Added Help -> BDSup2Sub (Java) Version.
- Fix: The list of MPLS files of the Preview M2TS menu was sometimes wrong for multi-angle movies
- Fix: Some typos.
- Updated the MkvToolnix exes to the latest version (v13.0.0)
- Updated x264 to the latest version (v0.152.2851)
- Updated x265 to the latest version (v2.4+36)
- Updated the Intel Media SDK (libmfxsw32.dll) to the latest version (v7.17.4.21, 2017)
- FRIMSource v1.27 has NOT been updated yet, due to a possible bug. See the BD3D2MK3D and FRIM threads at Doom9 for more info.
This version is mainly an update of the external tools used by BD3D2MK3D, but it contains also some improvements. I have also added the possibility to check the audio streams (one at a time) for Cinavia using CinDe. See the help menu for details.
Download: BD3D2MK3D.7z (http://download.videohelp.com/r0lZ/BD3D2AVS/BD3D2MK3D.7z)
r0lZ
13th July 2017, 09:02
Please note that the new version of FRIMSource has NOT been included in this release, because it crashes for me. Videofan3d has released it recently (thanks!) but on my machine, it crashes systematically as soon as I try to decode a MVC stream. Videofan3d is unable to reproduce the problem, and therefore he cannot fix the bug (if any). The problem might also be caused by something on my system. More info in the FRIM thread (https://forum.doom9.org/showthread.php?p=1811937#post1811937).
So, to help videofan3d, I ask you to try the new FRIMSource (32-bit) and report here or in the FRIM thread if it works for you. If it appears that I'm the only one with that problem, the next release of BD3D2MK3D will contain the new version.
To check the new FRIMSource, do this:
Copy the FRIMSource.dll from the toolset directory of BD3D2MK3D elsewhere (or rename it), just to be able to restore it if the new FRIMSource doesn't work for you.
Grab the new FRIMSource.dll from the "FRIM version 1.27 (x86) (https://drive.google.com/file/d/0BymRNDHq74DEbFFrd0E5OFFIdGc)" archive available in the FRIM thread (https://forum.doom9.org/showthread.php?p=1650646#post1650646), and put it in the toolset directory. (You don't need to copy all files. FRIMSource.dll is sufficiant. Be sure to use the 32-bit version!)
Open BD3D2MK3D and verify if FRIMSource is selected in the Settings -> MVC Decoder menu.
Similarly, be sure to select Settings -> MVC Decoder -> Hardware acceleration -> Disabled, especially if you have the Intel CPU compatible with the hardware acceleration.
Create a new BD3D2MK3D project.
Launch the encoding of the project created by BD3D2MK3D. It will either crash immediately, or work fine. Report the result here.
If you have the right Intel chipset, please test also if FRIMSource works also in hardware accelerated mode. Be sure to install the latest Intel drivers, and select Settings -> MVC Decoder -> Hardware acceleration -> Enabled. Everything else is identical.
Note that you can check FRIMSource with an existing project as well. To use FRIMSource in software mode, you may have to edit the "__ENCODE_3D_MOVIE.avs" file, and verify the following lines:
The LoadPlugin("FRIMSource.dll") must be active (without the "#" character at the beginning of the line), and you can comment out the LoadPlugin("DGMVCDecode.dll"), like this:
LoadPlugin("D:\Tcl\work\BD3D2MK3D\toolset\LoadHelper.dll")
#LoadPlugin("DGMVCDecode.dll")
LoadPlugin("FRIMSource.dll")
Similarly, the FRIMSource command should be active, and the DGMVCSource command MUST be commented out, like this:
# Load the two video streams (128606 frames per stream)
#interleaved = DGMVCSource("00000.track_4113.264", "00000.track_4114.mvc", view = 0, frames = 128606, mode = "auto") # Old syntax for mode: hw = 0
interleaved = FRIMSource("mvc", "00000.track_4113.264", "00000.track_4114.mvc", num_frames = 128606, cache = 2, platform = "sw")
(The arguments of the commands may differ. Do not change them, except the platform argument, as explained below. You should only verify the "#" characters at the beginning of the lines.)
To test the software mode, verify that the last argument of the FRIMSource command is:
platform = "sw"
You can also force the hardware mode with platform = "hw", but that works only if you have a compatible Intel CPU with the right Intel drivers correctly installed.
Experienced users can also download this archive (http://download.videohelp.com/r0lZ/tmp/TestFRIM.7z), and encode the test.avs script from the command line or with Simple X264 Launcher, or just preview it in AvsPMod.
When you report here if FRIMSource works or not, please be sure to specify if you have tested it in hardware or software mode.
Thanks in advance for any help!
tebasuna51
14th July 2017, 03:18
In __ENCODE_3D_MOVIE.avs:
...
LoadPlugin("D:\Programa\Video\BD3D2MK3D\toolset\LoadHelper.dll")
#LoadPlugin("DGMVCDecode.dll")
LoadPlugin("FRIMSource.dll")
##LoadPlugin("VSFilter.dll")
#LoadPlugin("SupTitle.dll")
# Load the two video streams (158712 frames per stream)
#interleaved = DGMVCSource("00009.track_4113.264", "00009.track_4114.mvc", view = 0, frames = 158712, mode = "sw") # Old syntax for mode: hw = 1
interleaved = FRIMSource("mvc", "00009.track_4113.264", "00009.track_4114.mvc", num_frames = 158712, cache = 2, platform = "sw")
...
Of course can't load ("FRIMSource.dll")
modified to:
LoadPlugin("D:\Programa\Video\BD3D2MK3D\toolset\FRIMSource.dll")
and is working now without crash.
W7 64 bits, Avs+ r2508, MT (both 32 and 64 bits)
r0lZ
14th July 2017, 06:55
Thanks for your test, but, normally, you don't need to provide the full path because the LoadHelper.dll (with the full path) is there to add its path to the search path of avisynth. It's the (only) goal of LoadHelper: You can simply specify the path once, and all other LoadPlugin commands can be specified without the full path (as long as the DLLs are in the same directory, of course). You can verify that LoadHelper works if you use DGMVCDecode instead of FRIM.
All versions of BD3D2MK3D since a long time use that technique and it has always worked. On my computer, the LoadPlugin("FRIMSource.dll") works as expected. The old FrimSource.dll works fine without specifying its path, but the new one crashes, with or without its path. And when the DLL is not found, avisynth displays a clear error message in the video, something like "LoadPlugin: unable to load "full\path\to\plugin.dll" ...". It is not shown for me, and it's an evidence that the plugin is found and loaded (or, at least, avisynth tries to load it).
Anyway, for my tests here, I have not used LoadHelper, and I have specified the full path to FRIMSource.dll, with the same result. It crashes. And BTW, it crashes without any error message by avisynth. I can only see the infamous Windows dialog "An avisynth script editor has stopped working. Windows is checking for a solution to the problem. [Cancel]". :-(
vadlerg
14th July 2017, 09:55
Hi r0lZ,
At first thank you for this nice piece of work. I really like BD3D2MKV3D.
I’ve recently invested in an LG 3D UHD TV set and started experimenting with 3D encodings. The TV itself goes very easy with 4K Level 5.1 materials - my impression is - it may like HEVC more than H264 if it’s possible. 3D functions are working well so I’ve tried to play 3840 x 2160 Half-OU (3840 x 1080 Top/Bottom) encoded movie and it presents an astonishing crisp 3D picture.
So my question: If I’ve a normal 1920 x 1080 3D Blu-ray and wanting to create a 4k 10bit Half-OU HEVC movie then what is the correct settings in BD3D2MKV3D?
I suppose the settings are forcing profile 5.0 and setting Full-OU for stacking. After creating the .avs script I should edit the stacking line with .BicubicResize(3840, 2160) what is a horizontal resize by 2.
Is this correct?
r0lZ
14th July 2017, 11:46
Thanks for your kind words!
Personally, I don't think that you will obtain a better picture by encoding in 4K Half-OU. IMO, it is better to simply encode in 2K Full-OU, without any resize at all. It's why there is no possibility to do it from the GUI (plus the impossibility to generate 3D subtitles for 4K).
If you want to do it anyway, you will have to generate the project in HALF-T&B (because otherwise the aspect ratios will be incorrects). I suppose that you know already how to select the x265 encoder and set its color depth to 10-bit.
When the project has been generated, edit the __ENCODE_3D_MOVIE.avs script to replace the original resizes with your own. It's easy. Look near the end of the script. You will need to change the line highlighted in red below and add another line:
[...]
# Build Top & Bottom stream
StackVertical(VerticalReduceBy2(Left), VerticalReduceBy2(Right))
AssumeFPS("ntsc_film")
# Hardcode subtitles
[...]
The final script should be like this:
[...]
# Build Top & Bottom stream
StackVertical(Left, Right)
LanczosResize(3840, 2160)
AssumeFPS("ntsc_film")
# Hardcode subtitles
[...]
In the example above, I have used the classic lanczos resize method, but you can use another method (http://avisynth.org.ru/docs/english/corefilters/resize.htm), and/or specify additional parameters if you wish.
Save the script and encode normally. I don't think that there are other things to change. Try to encode a short clip first, just to be sure, but that should work.
Please note that it is currently not possible to generate 3D subtitles suitable for the UHD (in SBS or T&B) due to limitations in the external tools currently used by BD3D2MK3D, but if you need to encode a movie with subtitles, it should be possible to hardcode them on the video. Let me know if you need to learn how to do it.
Good luck!
tebasuna51
14th July 2017, 12:26
And when the DLL is not found, avisynth displays a clear error message in the video, something like "LoadPlugin: unable to load "full\path\to\plugin.dll" ...".
Yes, the message was:
Avisynth error:
Cannot load file 'D:/tmp/1/Musketeers/00009/FRIMSource.dll'. Platform returned code 126:
No se puede encontrar el módulo especificado.
Same path than __ENCODE_3D_MOVIE.avs
Same problem with DGMVCDecode.dll
If you use LoadHelper.dll in previous versions to do the job, and work previously for me, maybe is by my recent change from AviSynth to AviSynth+
EDIT:
Yes, work all fine with AviSynth 2.60, even with the new FRIMSource.dll
r0lZ
14th July 2017, 12:56
Ah, OK, so AviSynth+ doesn't handle the path "normally". Good to know. Maybe it's something to tell to the author.
But so, beside the path problem, the new FRIMSource.dll works correctly for you. Damn! What could be wrong on my system?
tebasuna51
14th July 2017, 13:08
About Avs+ Plugin Autoloader you can see http://avisynth.nl/index.php/AviSynth%2B
Is easy replace the LoadHelper.dll function but then you need different avs for each system.
I don't think than authors change the Avs+ behaviour.
r0lZ
14th July 2017, 13:15
Thanks.
I don't think than authors change the Avs+ behaviour.
Is it not supposed to be compatible with the "classic" avisynth? Currently, it is not.
tebasuna51
14th July 2017, 13:29
You can follow a recent discussion about compatibility here https://forum.doom9.org/showthread.php?p=1811053#post1811053
vadlerg
14th July 2017, 14:35
Personally, I don't think that you will obtain a better picture by encoding in 4K Half-OU. IMO, it is better to simply encode in 2K Full-OU, without any resize at all. It's why there is no possibility to do it from the GUI (plus the impossibility to generate 3D subtitles for 4K).
I don't wish to open a discussion about screen resolution, but that is obvious VGA is superior to CGA or EGA. Or better described 3840 x 1080 for the left and right eye is four times as many pixels as 1920 x 540 am I right?
If it's not straight enough - VerticalReduceBy2(X) throws away every second line so it will be never so nice as keeping all the lines.
https://www.cnet.com/news/4k-tvs-with-passive-3d-finally-a-good-use-for-all-those-pixels/
So for 4K UHD passive TV owners it would be nice to have the possibility to set the option for 3d 4k 10bit UHD. (for ex. DVDFab has it) I am kindly requesting the feature if you mind.
I will experiment further but your recommended enlarging is not expecting the 4x data in the calculations so I do not know how the automatic settings for the encode will work.
r0lZ
14th July 2017, 18:39
I don't wish to open a discussion about screen resolution, but that is obvious VGA is superior to CGA or EGA.
Right, but here, the ORIGINAL resolution is 1920x1080 per view. If you encode in Full-SBS or Full-T&B, the resolution is untouched, without any resize. It's obviously the best way to preserve the original quality. If you upscale the views to double the height or width, the gain is minimal, since you can only extrapolate new pixels out of the existing ones. Actually, even with a good resize filter, the quality IS somewhat degraded. However, I can agree that a good resize of the source can be (but is not necessarily) better than letting the TV doing it.
Or better described 3840 x 1080 for the left and right eye is four times as many pixels as 1920 x 540 am I right?UHD Half-T&B is only two times the number of original pixels, not 4x.
If it's not straight enough - VerticalReduceBy2(X) throws away every second line so it will be never so nice as keeping all the lines.Wrong. VerticalReduceBy2 use a much more sophisticated algorithm, similar to bilinear or bicubic. No pixels are thrown away. A resize to shrink an image does NOT need complex resize filters, as no new pixels are created. And it's even more simple to divide the height exactly by 2. In this precise case, you cannot do a better job than with VerticalReduceBy2. I've checked several filters, and the ReduceBy2 filters are extremely good and fast. There is no reason to use a slower filter. And with my suggestion to encode in standard HD but in FULL-OU, the resolution of both images is unchanged, and the VerticalReduceBy2 filter is never used.
https://www.cnet.com/news/4k-tvs-with-passive-3d-finally-a-good-use-for-all-those-pixels/
Thanks for the link, but I will read the article tomorrow. I have to go.
So for 4K UHD passive TV owners it would be nice to have the possibility to set the option for 3d 4k 10bit UHD. (for ex. DVDFab has it) I am kindly requesting the feature if you mind.Perhaps I'll do it, but it's not in my priority.
I will experiment further but your recommended enlarging is not expecting the 4x data in the calculations so I do not know how the automatic settings for the encode will work.
That's correct. I forgot to explain that you have to select at least level 5. But I don't know much HEVC encoding, and currently, BD3D2MK3D doesn't handle the x265 levels anyway, even for standard HD Half or Full-SBS/T&B. You have to specify the correct options yourself.
r0lZ
15th July 2017, 16:26
I've read the article (https://www.cnet.com/news/4k-tvs-with-passive-3d-finally-a-good-use-for-all-those-pixels/) about the advantages of 4K passive 3D TV over standard 2K active or passive 3D TV, and I agree completely. But the fact is that it doesn't say that the picture is better when the 3D source is in 4K. It's only the resolution of the TV that matters, because the drawback of a passive TV is that it can only use every second line to display the image for a specific eye, and that introduces problems similar to the old crappy interlaced NTSC or PAL videos. With the vertical resolution doubled, the TV can display all lines of the 2K source (but still with blank lines between them, but they are thin enough to be barely visible). Of course, to do this, the source must be encoded in Full-T&B, not in half-T&B. And it's what you get if you select the Full option in the last tab of BD3D2MK3D. There is absolutely no need to enlarge the width of the video to benefit of that advantage of the 4K passive TVs. So, upscaling the video to UHD Half-T&B has exactly the same effect but is not better than Full-T&B, since the height of the picture is equal to the original in both cases.
The only gain of UHD Half-T&B over HD Full-T&B might be in the horizontal resolution, totally independent of the quality of the 3D. As I wrote above, there might be a very little gain because the software (and slow) resize made with avisynth might be better than the resize made in real time by the hardware of the TV, but that's another thing, not related at all to the 3D. And since modern TVs have powerful graphic cards specialized in that kind of treatment, I'm not convinced that their resize is less good than a software resize. It may even be better.
Anyway, if you really want to encode heavy 3D movies with twice as much pixels than in Full-T&B, you know now how to do it. Personally, I'm still not convinced of the interest of implementing that feature in BD3D2MK3D. Of course, I may change my mind if someone can prove that the interest is big, or if there are enough peoples requesting that feature.
vadlerg
15th July 2017, 18:16
Thank you for your effort understanding my situation. I have made Full-OU encoding already so I got 1920 x 1600 Top/Bottom picture where is no right chance to tell the TV set which AR the original picture was. So the AR is never correct in this case. eg. looks like 4:3 on 16:9. There is two solution as far as I see. One is setting an AR value for the picture in the stream and hope the TV set understands it. The second and safe one is upscale horizontal by 2. At the and I will have a 3840 x 1600 (or 2160) Full-OU encoding with the right AR and no lines lost from the original encoding. That is my goal.
Personally, I'm still not convinced of the interest of implementing that feature in BD3D2MK3D. Of course, I may change my mind if someone can prove that the interest is big, or if there are enough peoples requesting that feature.
I don't think the interest is a big one. Home 3D is dying slowly. UHD 4K Blu-ray has no profile definition for UHD 3D so there will be no movie releases in 4k 3D. I got this 2016 TV model nearly at half-price with excellent features. My smallest kid is a real 3D fan and I had the promise since years to have a 3d TV set. So we have it and I am creating the 4k 3D for it. Thanks again.
r0lZ
15th July 2017, 18:44
The problem of the aspect ratio is certainly due to the cropping of the black bars of your movie shot in Cinemascope format. It is well known that most 3D TVs MUST have a non-cropped, full 16:9 3D picture, as otherwise they extend it to occupy the whole screen. It's probably due to the badly defined 3D standard, that imposes the 16:9 format. And it's why I have never added a crop option in BD3D2MK3D. It's explained in details in the Help -> Why no crop? menu.
In your example, the HD full-T&B 3D movie MUST have the resolution 1920x2160. Everything else is wrong. Dot.
Note also that BD3D2MK3D sets the correct aspect ratio in the video stream (SAR) and in the MKV container (PAR). But most TVs do not take them into account.
Majinseed
12th August 2017, 15:08
first off, thank you so much for this little gem.
after having bought a 3d-capable tv I now need to go trough a lot of disks and your tool is really great!
however, I might have found a bug. There is a checkbox to prevent the encoder logs etc from being added to the output file, but apparently they still are being added.
Python_61
16th August 2017, 08:00
I am getting the following error message when BD3D2MK3d v 1.1 attempts to encode a 3D video, on my laptop.
"The type of file 'MKV3D_3d.264' could not be recognized"
My desktop does not give me this error.
Does anyone here know what I need to do to eliminate this error?
Thanks
Python_61
sfatula
24th August 2017, 21:33
Ok, confused by subtitles. I did try and read previous discussions, but, could not find my specific case and could have missed it. I have the BD Avatar 3D. On this bluray, is a set of subtitles. One of them (4608) has forced subs included with non forced subs.
In the ideal world, what I want is the forced subs only to be displayed, though, one day I may need all subs. So, in other words, I do want both types. But for now, I do not want to display all subs.
Using KODI as a player, the doc for Kodi says:
"Many movies have subtitles encoded for secondary languages spoken during the film – when these are added to the movie, they are known as forced subtitles and are always visible (despite not being hard encoded). As of Gotham, Kodi recognizes and respects the forced flag for showing subtitles (even if subtitles are turned off by default, the forced flag will trigger them being turned on). "
It also says:
"If you are using an .mkv file, the forced subtitles may be included in the file when originally encoded. If so, Kodi will automatically recognize that they are present and will display them at the appropriate times. If they are not included, or if the header was not properly edited, you will need to use external subtitles."
So, in theory, Kodi will respect the forced flag and only show those if subtitles are disabled. But I have done something wrong? What actually happens is Kodi displays all subtitles, disabled or not. That makes me think they have been merged and encoded into the video by bd3d2mk3d perhaps?
Is there a way to include the subtitles (with both forced and non forced) into the mkv file so that Kodi can only display the forced ones unless subtitles are turned on? Confused. Does the format actually matter for Kodi, vobsub vs bluray sup? Hardcode is set to none on page 5. I selected the top option for 4608, and checked nothing thinking this would simply include the subtitles as is (both forced and unforced)
sneaker_ger
24th August 2017, 21:38
Note that Blu-ray and MKV work differently. On a Blu-ray subtitlines lines are marked forced. So you can have a single track with forced and non-forced lines. But in mkv tracks get a forced flag (or not). To make it even more complicated, the forced line flags may be kept in mkv for certain formats (namely DVD style idx/sub and Blu-ray style sup/pgs). Some players (LAV Splitter) can be set up to make use of both depending on what the user wants. I don't know how Kodi works but most players seem to look at the track flags of the mkv container. For those players a work-around is to duplicate the subtitle track (but only keeping the forced lines for the duplicate) so you have two tracks. Or hardcoding the forced lines but not the non-forced ones.
(Not all Blu-rays are authored to use forced line flags. Some use multiple tracks similar to mkv but without any flags.)
sfatula
24th August 2017, 21:53
Kodi does allow as shown mixed unforced and forced subtitles. See for example: https://forum.kodi.tv/showthread.php?tid=174362&pid=1516339#pid1516339
My question is about what I am doing wrong in bd3d2mk3d, what boxes and I not checking or should be checking?
And as a followup in case Kodi simply does not work properly on a 3D mkv, can I check both subtitles in bd3d2mk3d, use 1 to extract forced only and set to default, and, use the other as a second subtitle "track" so that I can play either one? Will they both save to the mkv? Edit - looks like it does work but would have been slightly preferred in one file.
r0lZ
28th August 2017, 09:12
Sorry for replying only now, guys. For whatever reason, I haven't received the notifications of the new replies. And I was in holidays, far away from my computer.
first off, thank you so much for this little gem.
after having bought a 3d-capable tv I now need to go trough a lot of disks and your tool is really great!
however, I might have found a bug. There is a checkbox to prevent the encoder logs etc from being added to the output file, but apparently they still are being added.
Thanks for your kind words, and welcome to the Doom9 forums.
The option in the third tab suppresses only the ENCODER_SETTINGS tag (somewhat redundant with the info already included by x264 in the video stream). It doesn't suppress the inclusion of the most informative files in the final MKV. Why would you want that?
I am getting the following error message when BD3D2MK3d v 1.1 attempts to encode a 3D video, on my laptop.
"The type of file 'MKV3D_3d.264' could not be recognized"
My desktop does not give me this error.
Does anyone here know what I need to do to eliminate this error?
Welcome to you too!
Can you describe exactly what you did? If I understand correctly, you have created a 3D MKV with MakeMKV, then created a new job with BD3D2MK3D, and finally launched it to create the final MKV, but MkvMerge doesn't recognise the 264 file. Correct?
IMO, that problem can be caused by the laptop going to sleep mode during the encoding with x264. It is well knows that x264 doesn't support well the sleep mode. Normally, you should launch __ENCODE_3D_LAUNCHER.cmd (and NOT directly __ENCODE_3D.cmd). You can also tick the option "Exit and encode immediately" in the little dialog when BD3D2MK3D created the project.
Both methods call __ENCODE_3D.cmd, but after having disabled (temporarily) the automatic sleep option of Windows. That should work. If it's not sufficient, try to change the power plan of your laptop so that it goes never to sleep automatically. And anyway, I recommend to use only the desktop computer to encode the project. It is probably much more powerful.
Let me know if launching the correct CDM file has solved the problem.
r0lZ
28th August 2017, 09:50
Ok, confused by subtitles. I did try and read previous discussions, but, could not find my specific case and could have missed it. I have the BD Avatar 3D. On this bluray, is a set of subtitles. One of them (4608) has forced subs included with non forced subs.
In the ideal world, what I want is the forced subs only to be displayed, though, one day I may need all subs. So, in other words, I do want both types. But for now, I do not want to display all subs.
Using KODI as a player, the doc for Kodi says:
"Many movies have subtitles encoded for secondary languages spoken during the film – when these are added to the movie, they are known as forced subtitles and are always visible (despite not being hard encoded). As of Gotham, Kodi recognizes and respects the forced flag for showing subtitles (even if subtitles are turned off by default, the forced flag will trigger them being turned on). "
It also says:
"If you are using an .mkv file, the forced subtitles may be included in the file when originally encoded. If so, Kodi will automatically recognize that they are present and will display them at the appropriate times. If they are not included, or if the header was not properly edited, you will need to use external subtitles."
So, in theory, Kodi will respect the forced flag and only show those if subtitles are disabled. But I have done something wrong? What actually happens is Kodi displays all subtitles, disabled or not. That makes me think they have been merged and encoded into the video by bd3d2mk3d perhaps?
Is there a way to include the subtitles (with both forced and non forced) into the mkv file so that Kodi can only display the forced ones unless subtitles are turned on? Confused. Does the format actually matter for Kodi, vobsub vs bluray sup? Hardcode is set to none on page 5. I selected the top option for 4608, and checked nothing thinking this would simply include the subtitles as is (both forced and unforced)
The forced subtitles in the original BD can be authored in two different ways.
They can be (and are often) in their own separate stream. That means, for example, that you will have (at least) two streams in a specific language, like French: one for all subtitles, to be used if you watch the movie in its original audio language, and one with only the forced subtitles, to use when you watch the movie with the audio in your own language. The forced subtitles translate only written words or parts of the dialogs that have not been translated.
The forced subtitles can also be some subtitles specifically tagged as forced in a stream containing both the forced and not forced subtitles. That method is less often used, but it exists.
Unfortunately, BD3D2MK3D has no way to know how the subtitles are authored, because the forced streams are not specifically marked as forced. It presents therefore the whole list of streams to the user, and it tries to guess if there are forced streams or not. It does that this way. It ignores the language of the first audio stream (usually English), because there are often other subtitle tracks in the same language (director comments, hearing impaired...) For the other tracks, it considers that there are (probably) forced tracks if there are several streams in the same language. For example, it will probably consider that there are forced streams if there are two subtitle tracks in French. In that case, it enables automatically the "Forced subtitle are authored in their sepatate streams" option in track 2, and you cannot select the "forced streams only" pseudo-streams. You can of course change that option if BD3D2MK3D is wrong.
When that option is off, you can select the "forced only" sub-streams, and BD3D2MK3D will try to extract the forced subtitles from the complete demuxed stream. If it cannot find the forced streams, it will issue a warning. In the other hand, when the option is ticked, YOU have to tell BD3D2MK3D what stream is forced, by ticking the option "forced" of that streams. (Use the preview to see the subtitles. And use a good player that doesn't modify the order of the subtitles.) Usually, the first stream in a specific language contains all subtitles, and the second one contains only the forced subtitles.
BD3D2MK3D builds the __MUX_3D_OPTIONS.txt file (used to tell MknMerge how to build the final MKV) with the information it has. It sets the "forced" flag in the MKV header of the stream if the stream contains only the forced subtitles extracted from a full subtitle stream, and it sets it also for complete streams if the user has manually set the forced flag for that stream in tab 2.
Now, it may be possible that Kodi respects ONLY the global forced flag of the current subtitle stream, OR ONLY the forced flag of the individual subtitles within a subtitle stream that is not globally tagged as forced. I don't know Kodi enough to be sure of what it does, but AFAIK, BD3D2MK3D does correctly its job.
However, I don't remember if BD3D2MK3D tags all individual subtitles as forced in a globally forced stream. That should not be necessary since the global flag in the MKV header of the stream is theoretically sufficient, but Kodi may ignore it.
Anyway, be sure to tick the "forced" flag in tab 2 for the correct streams, and if the problem persists, let me know. I may need to modify slightly the way the individual subtitles are tagged.
Note also that you can modify easily the global forced flag of a stream without having to start the whole conversion over, and without having to recompute the x264 stream. Just edit the __MUX_3D_OPTIONS.txt with a text editor, and change the following lines:
--forced-track
0:no
to:
--forced-track
0:yes
Then launch __MUX_3D.cmd to rebuild the final MKV.
If you want to test if Kodi will react at the individual forced subtitles within a stream containing only forced subtitles and you suspect that they have not been individually tagged as forced, you can open the stream in BDSup2Sub (use the Subtitle Tools menu to launch it), and tag any subtitle as forced with Edit -> Edit Frame -> Forced Caption option. Then export the subtitle stream and use it to build a new MKV. (Edit the __MUX_3D_Options.txt file if necessary, and launch __MUX_3D.cmd to rebuild the final MKV without computing the x264 stream again.)
Sorry if that's somewhat confusing. Unfortunately, due to limitations in the BD format and usual bad authoring, it is difficult to completely automate the handling of the forced subtitles.
[EDIT] sneaker_ger has correctly resumed the situation and its difficulty. Normally, BD3D2MK3D is able to handle the two cases, but as I've explained above, it needs a little help from you.
r0lZ
28th August 2017, 10:05
Kodi does allow as shown mixed unforced and forced subtitles. See for example: https://forum.kodi.tv/showthread.php?tid=174362&pid=1516339#pid1516339
My question is about what I am doing wrong in bd3d2mk3d, what boxes and I not checking or should be checking?
Verify the forced options in tab 2. You cannot do much more. But I may have to set also the individual forced flags on all subtitles of the globally forced track. And I will also have to verify if the individual forced flags are correctly preserved when a stream is converted to 3D.
(BTW, do you use 2D or 3D subtitles?)
And as a followup in case Kodi simply does not work properly on a 3D mkv, can I check both subtitles in bd3d2mk3d, use 1 to extract forced only and set to default, and, use the other as a second subtitle "track" so that I can play either one? Will they both save to the mkv? Edit - looks like it does work but would have been slightly preferred in one file.
It's already what BD3D2MK3D does anyway. Most players need two different subtitle streams, as they are usually unable to show only the forced subtitles from a complete stream. And, of course, I have not written BD3D2MK3D to be used only with Kodi. ;-)
Oh, another thing. A DVD player shows the forced subtitles of a stream containing both forced and normal subtitles only if the stream is "current". That means that it has to be selected, but not enabled. Perhaps Kodi needs something similar. But since there is no way to declare a stream as "current" in a MKV, perhaps you have to be sure that the stream containing the forced captions is the first in the list of subtitle streams. To force BD3D2MK3D to do that, be sure to tick the "default" option for that stream in tab 2. The stream with the default option will be the first in the MKV, and will have the "default" flag set. Maybe that will make the difference. However, normally, the default stream must be shown anyway, including its non forced subtitles. But AFAIK, no players respect that rule. I don't know for Kodi.
sfatula
28th August 2017, 23:25
Probably a false alarm. I did the process again as I had already split into two streams the subtitles and the second time, with a single stream some forced and some not, Kodi plays only the forced ones just as it should (with subs disabled). If you enable them, it plays them all. Perhaps there was a glitch in the encoding, or, perhaps Kodi had a glitch at the time. Will save and post an example next time.
sfatula
5th September 2017, 18:52
When I run the program against San Andreas 3D bluray, and select only the truehd stream and not the ac3 stream, the file output is named 00098.track.4253.Eng.thd+ac3. So, it did not decouple the thd from ac3. I really don't want the ac3 track. I note there is an option to only select the ac3 track, but, I do not check that of course. Why not only the thd? Yes, I know that's so other stuff can play it, etc. but I don't want it. So, I end up having to use ffmpeg or mkvextract to get only the thd, manually.
von Suppé
6th September 2017, 08:13
First of all, a big thanks to r0lZ for this awesome software. Unbelievable that I never was aware of the possibilities of this tool.
I'm doing lots of subtitle creating/editing. Also wanting to be able to do that for 3D subs and understanding this piece of gem software, I'm near completing reading this whole thread phew. Wow, it's dazzling...
Why not only the thd?
Looking at the "2: Select streams"-tab I at first was also a bit confused about keeping only the True-HD track.
The box "Use the 5.1 core of DTS-HD, TrueHD and E-AC3 audio streams..." is misleading indeed.
I don't know if this has been addressed already, but TrueHD in a mkv is different than TrueHD on bluray video disc.
TrueHD has no "core". On BD video, next to the TrueHD stream (which is independent) there is an embedded, also independent AC3 stream for legacy reasons. These two independent streams can be "muxed" as one track on BD video.
However, you can't mux both streams as one audiotrack in mkv container. It is possible to mux both streams as separate tracks of course.
DTS-HD is differently in its build-up. It has indeed a (lossy) dts-core (like you'll find on a dvd-video), which is, of course, independent. Next to that core there is extra (dependant) audiodata, which, combined with the dts-core, makes up for the DTS-HD audio. A DTS-HD track can be muxed (as one track) in both BD's m2ts- and mkv container.
So, looking at the previously mentioned box, I would suggest changing it into something like this:
One box for DTS-HD that would say something like: Use only dts-core (If checked, only the dts-core will be muxed. If unchecked, the whole DTS-HD stream will be muxed (as one audiotrack) in the resulting mkv)
And a second box for TrueHD in which one has three choices, something like:
1: AC3 only (one track: only the legacy AC3 track will be muxed)
2: TrueHD only (one track: only the TrueHD track will be muxed)
3: TrueHD track + AC3 track (so, both independent tracks will be muxed as two audiotracks). With maybe the possibility to set one or the other as "default track" ?
von Suppé
8th September 2017, 10:23
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.
TSMuxeR shows you the 3D-Plane number, but it is right that it can have some bugs... ...and it's one of the major reasons that have motived me to write my own MPLS parser.
Does that mean that, when remuxing a main movie only with tsMuxer, I should specify the 3d-Plane number found by BD3D2MK3D?
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?
There is normally one depth value per frame in each 3D-Plane, but some depths may be undefined (hex 0x80) if there is no subtitle at that frame.
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...
r0lZ
13th September 2017, 09:05
Again, sorry for the late reply. I am not notified of the replies to this thread any more. Not sure why.
When I run the program against San Andreas 3D bluray, and select only the truehd stream and not the ac3 stream, the file output is named 00098.track.4253.Eng.thd+ac3. So, it did not decouple the thd from ac3. I really don't want the ac3 track. I note there is an option to only select the ac3 track, but, I do not check that of course. Why not only the thd? Yes, I know that's so other stuff can play it, etc. but I don't want it. So, I end up having to use ffmpeg or mkvextract to get only the thd, manually.
Currently, it is only possible to keep either the AC3 or the THD sub-track with BD3D2MK3D. So, you are wrong. By default, BD3D2MK3D doesn't keep both sub-tracks in the final MKV. IMO, there is no real need to keep both.
If you have selected the option to keep only the "core" in tab 2, then BD3D2MK3D demuxes only the AC3 track, and of course it muxes it in the final MKV. The advantage is the great compatibility, the small file size and the speed of the demux process.
If the "core" option in tab 2 is not ticked, then indeed BD3D2MK3D demuxes the combined THD+AC3 track. But it's not that combined track that is muxed. As von Suppé has explained, it's impossible anyway, because MKV doesn't support that combined tracks. When the audio track is muxed, mkvmerge disregards the AC3 sub-track automatically, so that the audio track really muxed in the final MKV is the THD track alone. There is absolutely no need to split the combined track manually or change anything in the way BD3D2MK3D works.
Technical notes:
When the combined THD+AC3 track is muxed with mkvmerge, BD3D2MK3D uses the --audio-tracks argument to specify what sub-stream mkvmerge must keep. "--audio-tracks 0" keeps only the THD track. "--audio-tracks 1" keeps only the AC3 track.
Example of muxing only the THD track from a THD+AC3 file, generated by BD3D2MK3D:
(The magic is highlighted in red)
### Audio stream(s)
--track-name
0:Chinese (TrueHD 5.1 48/96KHz)
--language
0:zho
--default-track
0:yes
--sync
0:5005
--compression
0:none
--audio-tracks
0
00001.track_4352.Zho.thd+ac3
If you want to keep both tracks, you have to untick the "core" option in tab 2 to demux the combined track instead of just the AC3, then, when the project has been created on disc, edit the __MUX_3D_OPTIONS.txt file to duplicate the whole section concerning the audio track (as in the example above), and change the --audio-tracks 0 argument to --audio-tracks 1, and edit the track name accordingly. It's the main reason why BD3D2MK3D doesn't demux the THD track only. For a little bit of wasted disc space, it lets the power user decide exactly what to do, including, if he wish, keep the THD and the AC3 sub-streams as two separate streams.
r0lZ
13th September 2017, 09:26
First of all, a big thanks to r0lZ for this awesome software. Unbelievable that I never was aware of the possibilities of this tool.
I'm doing lots of subtitle creating/editing. Also wanting to be able to do that for 3D subs and understanding this piece of gem software, I'm near completing reading this whole thread phew. Wow, it's dazzling...
Thanks for your kind words!
Looking at the "2: Select streams"-tab I at first was also a bit confused about keeping only the True-HD track.
The box "Use the 5.1 core of DTS-HD, TrueHD and E-AC3 audio streams..." is misleading indeed.
I agree that the terminology is not correct in the case of THD+AC3, as there is no core+extension but two sub-streams muxed together as one combined stream.
If I have decided to include only a single option, it's because usually there is only a single HD audio track in a movie. It can be either THD+AC3 or DTS-HD/MA, but I have never seen a movie containing a THD AND a DTS-HD/MA track at the same time.
The user can select either the "lite" and compatible option of demuxing only the AC3 sub-stream or the DTS core, or he can opt for the best quality and keep either the THD or the DTS-HD/MA stream. IMO, there is no need to split that option in 4 different parts, as I don't think that it makes much sense to keep the two streams from a combined THD+AC3 stream. (And a power user can do it anyway, as explained at the end of my previous post.) Furthermore, the 3D BDs containing a THD+AC3 stream are very rare, and I don't want to add too many options, difficult to understand for the casual users.
However, I agree that using the term "core" for THD+AC3 is not correct. But the place in the GUI is limited, and I haven't enough room to explain in details what the option does. If someone proposes a better name for that option, short enough to fit in the GUI, I will of course accept to use it instead of the current text.
So, looking at the previously mentioned box, I would suggest changing it into something like this:
One box for DTS-HD that would say something like: Use only dts-core (If checked, only the dts-core will be muxed. If unchecked, the whole DTS-HD stream will be muxed (as one audiotrack) in the resulting mkv)
And a second box for TrueHD in which one has three choices, something like:
1: AC3 only (one track: only the legacy AC3 track will be muxed)
2: TrueHD only (one track: only the TrueHD track will be muxed)
3: TrueHD track + AC3 track (so, both independent tracks will be muxed as two audiotracks). With maybe the possibility to set one or the other as "default track" ?
Well, that would be perfect, but as I wrote above, IMO it's overkill.
Another way to handle the THD+AC3 problem would be to present the two sub-streams in the list of streams as two totally independent streams. The user will have the possibility to select the THD stream or/and the AC3 stream independently, and tick the Default option for the stream he prefers. And the option to keep only the core will be related to the DTS streams only. But that would require many changes to the way BD3D2MK3D handles the audio streams, and that may introduce new bugs, so I'm not sure I will do it.
r0lZ
13th September 2017, 10:28
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.
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.
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.
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 (http://forum.doom9.org/showthread.php?t=169651) for more info.
von Suppé
13th September 2017, 17:54
Thanks for your verbose explaination, r0lZ. I'm still a bit dazzled (again) :D, but I'll dig in and try to hang in there.
It seems I have a lot of testing to do. One thing please...
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...Now, this I don't understand. Remembering what all was said in this thread, I assumed that re-encoding the MVC stream only happened whithin the process of creating a 3D-mkv.
When I want to remux main-movie only to 3D BD-iso, doesn't tsMuxer only have to remux the already present dependant videostream, that would remain untouched, if I understood correctly? I mean, tsMuxer isn't a (re-)encoder, not?
r0lZ
14th September 2017, 07:36
When I want to remux main-movie only to 3D BD-iso, doesn't tsMuxer only have to remux the already present dependant videostream, that would remain untouched, if I understood correctly? I mean, tsMuxer isn't a (re-)encoder, not?Yes, that's correct. The SEI messages are lost only if you re-encode the video. If you demux it and remux it untouched, the 3D-Planes are preserved. You have just to provide the right 3D-Plane numbers (as shown by BD3D2MK3D) and everything should be fine.
von Suppé
15th September 2017, 08:30
Thanks r0lZ, that's clear; it's what I also thought.
When using the "Extract 3D-planes from MVC" tool, and reading about your self-made mpls parser, must I therefore always choose the right playlist (*.mpls file)? Or would the outcome be an exact match if I would choose the *.ssif- or even the (smaller) dependent *.m2ts stream as input?
r0lZ
16th September 2017, 12:42
The dependent (MVC) M2TS file contains the SEI messages with the 3D-Planes, but unfortunately, the tool to extract them works only on the elementary MVC stream. You must therefore demux the MVC stream from the dependent M2TS, the SSIF or (indirectly) from the MPLS. Using the dependent M2TS is the fastest solution because it's a less big file, but that will not work if the movie is made of several parts (when the playlist shows several M2TS files for the same movie, like in multi-angle movies). Finally, you should extract the 3D-Planes from the demuxed stream with MVCPlanes2OFS.exe (a CLI tool) or the "Extract 3D-planes from MVC" menu of BD3D2MK3D.
Or you can just prepare a project with BD3D2MK3D, move the 3D-Planes stuff out of the project folder, and delete the project. That's longer, but it's simple and you can do other things while BD3D2MK3D is working. It will also give you a detailed log of the extracted 3D-planes, and their correspondance with the subtitle streams. (Note that you must select at least one subtitle track in tab 2 for this to work, as otherwise the 3D-Planes are not necessary and of course not extracted.)
von Suppé
16th September 2017, 19:47
Thanks r0lZ, it's clear. I'll go do some work and see if things are going ok.
Cheers
Edit: Should I be worried if BD3D2MK3D finds lesser mpls files than BDInfo?
von Suppé
17th September 2017, 20:13
Ok, I think first try-out went well. Remuxing Avatar 3D movie only. I wasn't sure if all subtitles would have to be remuxed, but I just gambled and checked only 2 subtitles I wanted to keep, specifying the 3D-plane numbers found by BD3D2MK3D (in this case the same as found by tsMuxer).
Output ISO plays wonderful! 3D sups have the proper placemements and depths, just as in the original.
As I am further learning about my 2 mediaplayers' 3D capabilities (or lack of them) I also did a BD3D2MK3D project to create a 3D mkv and...move the 3D-Planes stuff out of the project folder...I carefully specified the project folder, but I can't see any of the "3D-Plane-**.ofs" files, nor the "3D-Planes.log" that I would have if I use the 3D-planes extraction tool. I also went through the "BD3D2MK3D.log". Are they stored somewhere in another, maybe temporary created folder?
r0lZ
18th September 2017, 07:21
Edit: Should I be worried if BD3D2MK3D finds lesser mpls files than BDInfo?
BD3D2MK3D shows you only the 3D playlists. Furthermore, it hides the useless 3D playlists such as the menus, the duplicates and the shorts playlists (less than 1 minute). Also, sometimes there are several playlists referencing the same M2TS/SSIF files, but with less or no references to the 3D-Planes, or other missing stuff in some of them. In such case, BD3D2MK3D tries to shows you only the "best" playlist. To see why a MPLS has been rejected, open the log window. As soon as a BD3D is opened, you will see the list of MPLS files, and why they are added or rejected from the list of 3D MPLS to show.
If you want to see all 3D Playlists, click on the option in the upper right corner of the first tab. But you will have to decide yourself what playlist to use. It's not always simple, especially with protected discs.
You can even inspect the 2D Playlists (but not convert them) with File -> Explore 2D content of 3DBD. Of course, the 2D MPLS have no 3D extensions and therefore no MVC stream and no 3D-Planes.
So, although by default BD3D2MK3D shows you only the most useful 3D playlists, it can show you all playlists, like BDinfo.
r0lZ
18th September 2017, 07:32
I wasn't sure if all subtitles would have to be remuxed [...]You don't need to include all subtitles. Just the languages you need. Of course, if you don't remux all subtitles, there will be useless 3D-Planes in the MVC, but that's not a problem.
As I am further learning about my 2 mediaplayers' 3D capabilities (or lack of them) I also did a BD3D2MK3D project to create a 3D mkv andI carefully specified the project folder, but I can't see any of the "3D-Plane-**.ofs" files, nor the "3D-Planes.log" that I would have if I use the 3D-planes extraction tool. I also went through the "BD3D2MK3D.log". Are they stored somewhere in another, maybe temporary created folder?
No, they are stored in "[project folder]\[movie title]\[MPLS number]". But as I have explained above, the 3D-Planes are extracted only when they are needed to convert the subtitles to 3D. (It's a relatively long operation, and I don't want to force the user to wait if it's not necessary.) Therefore, you have to select at least one subtitle stream, and also specify that you want it (them) in 3D (or 2D and 3D) in the second tab. (Sorry, I forgot to specify that second requirement in my previous post on this subject.)
You can even use BD3D2MK3D as a demuxer, to demux all necessary streams. If you select the audio and subtitle you really need, you will find them in the project folder at the end of the operation, with the video streams and the chapters as well, and you will not need to demux anything else. And an additional advantage is that BD3D2MK3D merges together the different parts of a multi-angle or multi-story movies. You can therefore use it if you want to remove all angles but one.
Or you can also use BD3D2MK3D just to confirm the 3D-Plane numbers, and demux the streams with tsMuxeR. After all, you don't need to demux the 3D-Planes if you don't re-encode the MVC. Generating a whole project with BD3D2MK3D just to have its full 3D-Planes log may be overkill!
However, you may need the OFS files if you want to check what is the "best" 3D-Plane to use with an additional subtitle stream you want to add to the original BD. There are several tools in the Subtitles menu that can help you decide what stream to use, but you need the 3D-Planes and the subtitles in XML+PNG format. In that case, it is probably a good idea to generate the BD3D2MK3D project.
von Suppé
18th September 2017, 10:20
Thanks so much about the MPLS handling info. This is good to know.
...No, they are stored in "[project folder]\[movie title]\[MPLS number]"... ...are extracted only when they are needed to convert the subtitles to 3D
Then I think to know why I don't have these files/folders. I was doing a "Frame Sequential" mkv. If my understanding & memory serves me right, in that case only 3D subs can be done if you hardcode a subtitle on both left- and right-eye streams. Eventhough the "Subtitles type" in tab 2 was set to "3D only", I left the option in "Hardcode subs on video" on tab 5 to "None".
I do wonder however, why the created "**.2D.sup" files aren't an exact match of the demuxed (2D) sups. They don't have to be altered, my guess?
As for the 3D-planes extraction tool:
...the tool to extract them works only on the elementary MVC stream. You must therefore demux the MVC stream from...
Can't help myself for trying out, but in the 3D-planes extraction tool's browser window it is however possible to select the ssif file as input (setting the "filetype" box to "All files (*.*)". And it will output. I compared this output to the result of demuxed mvc file as input.
Both show 6 same-named *.ofs files that are the same size, but not bit-equal (checked with hash-checker). Both "3D-Planes.log" files do show same summary data for the first 5 planes, but Plane 6 is very different indeed.
Of course, from now on I will always run the 3D Planes extractor with the firstly demuxed mvc as source.
Edit:
...Generating a whole project with BD3D2MK3D just to have its full 3D-Planes log may be overkill...Maybe, but once a project is finished, to me it proved very educational to look at the project folder.
Seeing all these files created and used, specially when you choose the windows explorer column "Date created", you can almost chronologically step-by-step follow what steps were taken. Very informative.
Of course I'll do a lot more testing and will certainly use the enormously handy subtitle tools.
For now, cheers
r0lZ
18th September 2017, 10:48
I have noticed several times some problems with the original (2D) subtitle streams, especially in Asian films. They contain often bad or empty subtitles, that can and should be removed. Also, BDSup2Sub merges identical subtitles if the gap between them is very short. So, I've decided to load and save the 2D subtitles anyway, just to clean them up. It's also during that first conversion that BD3D2MK3D analyses the stream, determines if there are forced subtitles, and see if the stream can be directly converted to 3D.
However, using the 2D version saved by BDSup2Sub may be a bad thing in some precise circumstances, notably when two (or more) different subtitles are displayed at the same time. It seems that the standard version of BDSup2Sub cannot properly handle them, as it removes the two subtitles. If you want to avoid this, you can try to replace BDSup2Sub.jar with the fork developed by Scorpius666 and available here (https://forum.doom9.org/showthread.php?p=1812398#post1812398). Or, if you are confident enough, just use the demuxed stream as it is. (It's the stream without the 2D or 3D extension in the BD3D2MK3D project directory.) Since you don't need to convert them to 3D, the original stream should be OK if it is displayed without problems when you play the original BD.
I haven't written MVCPlanes2OFS.exe myself, but I helped its author. The problem is that the detection of the SEI messages is fairly basic, and I cannot assume that the extraction works correctly when used on a complex file with a lot of multiplexed streams. So, IMO, extracting the 3D-Planes from the SSIF or dependent M2TS may work fine, but it may also fail, depending of the mux and the situation. It is at least safer to extract them from the demuxed MVC elementary stream, so it is a good idea to do it.
von Suppé
18th September 2017, 17:32
...you can try to replace BDSup2Sub.jar with the fork developed by Scorpius666 and available here (https://forum.doom9.org/showthread.php?p=1812409#post1812409)
I'm sorry, something is not clear. I downloaded the latest version here: https://github.com/mjuhasz/BDSup2Sub/wiki/Download
but it's the same version you have already in your toolset folder.
Can you please confirm this is the proper, latest "fork"?
I have always been using this version as latest download from Videohelp site.
r0lZ
18th September 2017, 22:23
Oops, sorry, the link I gave you points two posts too far. It should have pointed here (https://forum.doom9.org/showthread.php?p=1812398#post1812398). [Previous post fixed] And the fork (called officially BDSup2Sub "enhanced") can be downloaded here (https://github.com/naikel/BDSup2Sub/tree/enhanced).
BD3D2MK3D distributes v5.1.2 by Mjuhasz, the latest "official" version (because I want to be sure that there are no new bugs in the fork before distributing it).
von Suppé
19th September 2017, 19:40
Thank you, r0lZ.
So, reading this, I think it would be proper custom to always load a demuxed SUP in BDSup2Sub or its fork and export again, just to make sure that errors are cleared out.
I was surprised to see how many warnings there were with SUP from Avatar, for instance.
Tenker
28th September 2017, 12:27
@rOIZ
@ll
I have not had any problems with your SUPER software.
Unfortunately, I can not convert the 3D movie "Wonder Woman".
My PC is an i7-4710HQ with Windows 10 64bit.
+ all files were unpacked without problems
00098.track_4113.264 = 21.428.288 KB
00098.track_4114.mvc 0 11,350,934 KB
00098.track_4353.Deu.dtsma = 2.415.318 KB
- after starting the "__ENCODE_3D.cmd"
@echo off
set path=D:\!_Video\BD3D2MK3D\toolset;%path%
echo Encoding movie in 3D
echo Movie: Wonder.Woman.2017.3D
echo Encoding started %date% %time%
@echo on
"D:\!_Video\BD3D2MK3D\toolset\avs2yuv.exe" ^
"__ENCODE_3D_MOVIE.avs" -frames 203220 -o - ^
| "D:\!_Video\BD3D2MK3D\toolset\x264_8bit_x64.exe" ^
--bitrate 15000 --pass 1 --stats "00098_3D.stats" ^
--preset medium ^
--sar 1:1 --range tv --colormatrix bt709 ^
--frame-packing 3 --qpfile chapters_3D.qpfile --frames 203220 --fps 24000/1001 ^
--output "00098_3D.264" --demuxer y4m --stdin y4m -
@echo Pass 1 finished %date% %time%
"D:\!_Video\BD3D2MK3D\toolset\avs2yuv.exe" ^
"__ENCODE_3D_MOVIE.avs" -frames 203220 -o - ^
| "D:\!_Video\BD3D2MK3D\toolset\x264_8bit_x64.exe" ^
--bitrate 15000 --pass 2 --stats "00098_3D.stats" ^
--preset medium ^
--sar 1:1 --range tv --colormatrix bt709 ^
--frame-packing 3 --qpfile chapters_3D.qpfile --frames 203220 --fps 24000/1001 ^
--output "00098_3D.264" --demuxer y4m --stdin y4m -
@echo off
echo Encoding finished %date% %time%
REM Optionnaly mux the video and demuxed streams to MKV.
REM Note: The mux is disabled if no streams are demuxed.
if exist "__MUX_3D.cmd" cmd /c "__MUX_3D.cmd"
REM Everything done: do the post-processing (Shutdown computer...)
if exist "__POSTPROCESS_3D.cmd" cmd /c "__POSTPROCESS_3D.cmd"
exit /B
the video was buckled = about 110 fps
https://www2.pic-upload.de/thumb/33995556/Image1.jpg (https://www.pic-upload.de/view-33995556/Image1.jpg.html)
https://www2.pic-upload.de/thumb/33995557/Image2.jpg (https://www.pic-upload.de/view-33995557/Image2.jpg.html)
https://www2.pic-upload.de/thumb/33995558/Image3.jpg (https://www.pic-upload.de/view-33995558/Image3.jpg.html)
Normal value is always about 25 fps
- The video file 00098_3D.264 is only 15.078 KB large
Can you please help me?
Many thanks and many greetings
Tenker
EDIT; I have tried both versions 1.0 and 1.1 without success
tebasuna51
29th September 2017, 10:40
The fps than you show are the encode speed: 110 encoded frames per second.
Not related with fps to play than is a correct 24000/1001
The problem is when the first pass finish with a bitrate of 14 Kb/s instead something like the 15 Mb/s selected.
I don't know for what, the command line to encode seems fine.
Put the __ENCODE_3D_MOVIE.avs to see anything wrong.
r0lZ
29th September 2017, 11:18
I don't understand. Indeed, even with a powerful i7 CPU, an encoding speed of 115fps is very fast! And the final file size is also abnormal.
IMO, there is something wrong with the decoding of the video. Have you played the final MKV? Does it contain video, or just black frames? Verify if the end of the movie contains real images too.
I have already noticed that sometimes, x264 encodes the beginning of the movie correctly, but suddenly all encoded frames are totally black, without reason, and up to the end of the movie. I have never understood what is causing that (rare) problem, but that seems related to an x264 bug. Anyway, when that happens, relaunching the encoding is sufficient, and the second time the movie is encoded successfully.
I suspect a problem with the PC going in Sleep mode during the encoding, or something like that. There is a well known x264 bug that makes it fail to encode properly when it wakes up from sleep mode. Do you encode with a portable computer? Are you sure you have launched __ENCODE_3D_LAUNCHER.cmd and NOT directly __ENCODE_3D.cmd ? __ENCODE_3D_LAUNCHER.cmd ensures that the computer will not go to sleep mode during the encoding.
Also, I suggest to use only the CRF encoding mode. It produces ALWAYS a slightly better quality than 2-pass for the same overall bitrate, so 2-pass should be used ONLY when the final file size must be precisely controlled (for example to burn the MKV on a DVD). Since the CRF mode requires only a single pass, it has less chances to encounter a problem, and it works very well.
Also, are you sure that the original BD has been properly decrypted? You cannot encode directly the original protected BD.
Anyway, I did Wonder Woman without problem myself, so it should not be a problem to encode it.
Tenker
29th September 2017, 12:32
Thank you very much for your quick and detailed reply.
What is NKV?
The 00098_3D.264 video is only black.
Yes, the decode has run on a notebook.
I have started the process automatically (then "__ENCODE_3D_LAUNCHER.cmd" started) and the file "__ENCODE_3D.cmd" was started without success.
DVDFab has converted the 3D ISO without problems, abe I ALWAYS use your software.
I start to test CRF encoding mode with automatic "__ENCODE_3D_LAUNCHER.cmd" start and reports.
What file and how do I have to change it so I can encode CRF instead of 2-pass?
Thank you rOIZ
r0lZ
29th September 2017, 12:59
What is NKV?
A typo! :rolleyes: It's MKV. Sorry. (I've fixed it in my previous post.)
The 00098_3D.264 video is only black.
Yes, the decode has run on a notebook.
I have started the process automatically (then "__ENCODE_3D_LAUNCHER.cmd" started) and the file "__ENCODE_3D.cmd" was started without success.
DVDFab has converted the 3D ISO without problems, abe I ALWAYS use your software.
I start to test CRF encoding mode with automatic "__ENCODE_3D_LAUNCHER.cmd" start and reports.
OK, so it seems that you have encountered the rare "black frames" bug. As I wrote, I don't know its cause, so I can't help you more.
Just retry.
What file and how do I have to change it so I can encode CRF instead of 2-pass?
There are a lot of files to modify slightly. It is better to start over. But before doing so, just relaunch __ENCODE_3D_LAUNCHER.cmd, and let it run for a couple of minutes. Then, have a look at the encoding process. If it's again above 100fps, then the bug happens again. Kill the encode and redo the whole project, this time in CRF mode. Verify also when the second pass is running. The first pass may be OK, and the bug may happen only during the second pass.
Otherwise, if the encoding speed is normal, let the encoding run, and carefully verify if the final MKV is OK, especially near the end of the movie. As far as I know, the black frames bug can occur at any point in the movie, but it continues always up to the end of the movie. Therefore, if the end of the credits is OK, the rest should be OK too.
Sorry for the wasted time. Unfortunately, I have no way to reproduce the bug, and I cannot understand exactly why it happens and how to implement a workaround to fix it. Anyway. I'm sure it's not a bug in BD3D2MK3D itself, and therefore I am probably unable to fix it myself, even if I could understand it.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.