View Full Version : BD3D2MK3D v1.17: Convert 3D BDs or MKV to 3D SBS, T&B or Frame-sequential MKV
r0lZ
24th January 2018, 17:12
I use the Program Subtitle Edit just to check the SUB.
You have replied that when I've asked if you have converted the subtitles to DVD SUB format. So, I did not understand that indeed, it's what you did. And now, I understand better the problem.
As I wrote above, when the subtitles must be converted to IDX/SUB (DVD format), BDSup2Sub (++ or Java) has to reduce the numbers of colours from 16 millions to just 4, and the 256 levels of transparencies also to 4. Unfortunately, to do that, it uses a fixed palette. You can edit it in the GUI, but the palette is never modified dynamically by BDSup2Sub itself to better clone the colours of the original subtitles. It's why I've added an analysis of the original colours of the subtitles, and BD3D2MK3D generates two palette files (one for BDSup2Sub.jar and one for ++, as they are different). When the final 3D XML/PNG stream is converted to DVD SUB, the generated palette is used, and the subtitles should look better than with the original default palette.
Since the palette is never used when the program converts the 3D PNGs to BD SUP, I did not understand why the colours were wrong. But now, I have realized that you did not convert to BD SUP, but rather to DVD SUB. So, I have verified the palettes, and indeed, I've found that I have introduced a bug in v1.5, due to the new method used to convert the subtitles to 3D. I have fixed the bug, and I will release a new version soon, probably tomorrow.
Sorry for the inconvenience.
BTW, may I know why you have selected the DVD SUB format rather than BD SUP? The quality of the subtitles is less good, and if your player supports the BD SUP format, I strongly recommend to use it! Also, I recommend to use exclusively the BD SUP format to burn (hardcode) the subtitles in the movie, if you use that feature.
Anyway, thanks for the bug report.
r0lZ
24th January 2018, 17:19
Thanks r0ltZ! Will try again tonight. I just noticed __MUX_3D_OPTIONS.txt has this -
--aspect-ratio
0:16/18
Can I change it to something else (like 0:16/9) and run __MUX_3D.cmd to avoid re-encoding? I am assuming Settings > Full-SBS/TAB Aspect Ratio would do something similar?
Yes, you can!
And you can also change the SAR in __ENCODE_3D.cmd if you wish to check the two settings.
Rexian
25th January 2018, 03:10
Yes, you can!
And you can also change the SAR in __ENCODE_3D.cmd if you wish to check the two settings.
Didn't work with 16/9 in the mux option file. Tried with the SAR 2:1 (option for LG in Settings) and on first attempt avs2yuv.exe crashed within 10 seconds of starting. Tried again and it's running so far (~5 mins) ... will update once done.
Rexian
25th January 2018, 05:42
Finally, some good news! SAR 2:1 worked and the TV now automatically switches to 3D and fills the entire screen. Thanks r0ltZ!
The mkv from makemkv works as 2D on the TV (though works in Kodi/mpc-hc) but this works right on the TV with Plex / Emby / Xplay :)
Tenker
25th January 2018, 10:12
...
BTW, may I know why you have selected the DVD SUB format rather than BD SUP? The quality of the subtitles is less good, and if your player supports the BD SUP format, I strongly recommend to use it! Also, I recommend to use exclusively the BD SUP format to burn (hardcode) the subtitles in the movie, if you use that feature.
Anyway, thanks for the bug report.
So I always unconsciously had the first version of a software ...
Where can I change this?
Thank you for your quick help
tenker
:thanks:
r0lZ
25th January 2018, 13:20
So I always unconsciously had the first version of a software ...
Where can I change this?I agree that I should have changed the default for that option. When BD3D2MK3D has been created, the BD SUP format was supported only by a few hardware players, so I've decided to set DVD SUB as the default. But things have changed, and I can probably assume now that the BD SUB is a better default. I will change that immediately.
You can change the subtitle format in the bottom of tab 2: Select Streams. You can even select "Both" if you still need DVD SUB for compatibility with your players and you want also the best quality for the future.
r0lZ
25th January 2018, 13:25
Tried with the SAR 2:1 (option for LG in Settings) and on first attempt avs2yuv.exe crashed within 10 seconds of starting. Tried again and it's running so far (~5 mins)The crash is strange, especially if it happens only once, and restarting the encoding works well. Anyway, it's certainly not due to the new SAR. I suppose it has been caused by bad vibrations. ;-)
Good to know that the SAR recommended for LG works well for your LG. :-)
Thanks for the info!
r0lZ
25th January 2018, 15:10
V1.6 is available. It fixes the bug of the black subtitles in DVD SUB (VobSub) format introduced in the previous version and reported here (https://forum.doom9.org/showthread.php?p=1831531#post1831531). (Thanks Tenker!) That bug doesn't affect the subtitles in BD SUP format.
It has also a few minor improvements, and a new possibility to restrict the displacements of the subtitles in X or Y only when using the subtitle tool Clone Subtitle Positions.
Please note that BD3D2MK3D doesn't support the new version of MkvMerge, as it has removed the format of its option file, used currently by BD3D2MK3D. I may change that later, but that will require some time. In the meantime, DO NOT update MkvMerge!
v1.6 (January 25, 2018)
- Added the possibility to move the subtitles only along the X or Y axis only in Subtitle Tools -> Clone Subtitle Positions
- Added a warning in the dialog explaining the various ways to decrypt a commercial 3DBD about the MakeMKV bug with forced subtitles streams extracted from some BDs (notably Avatar 3D)
- Improved the way the Java installation is detected and the message in case of improper installation (due to frequent problems caused by the Java installer!)
- Fix: Wrong palette colors for the conversion of the subtitles to DVD SUB (Bug introduced in v1.5)
- The MKVToolnix exes have NOT been updated and will not be updated any more to the latest version (v20+) as the new versions are not compatible with BD3D2MK3D any more!
Download: BD3D2MK3D.7z (http://download.videohelp.com/r0lZ/BD3D2AVS/BD3D2MK3D.7z)
hiltr0n
30th January 2018, 22:02
Sorry if this is a noob question, but is there a way to adjust the SAR after I've encoded? I did a bunch at 1:1 but need to be at 1:2 and I'd love to not re-encode.
tebasuna51
30th January 2018, 22:24
Try changing:
MkvToolNixGUI -> Header editor -> Video track -> Fields Video Display Width/Heigth
And Save.
r0lZ
30th January 2018, 22:53
Try changing:
MkvToolNixGUI -> Header editor -> Video track -> Fields Video Display Width/Heigth
And Save.
That changes the PAR. The SAR is in the h264 stream itself, and AFAIK it is not possible to change it without re-encoding. But perhaps there are programs that can modify simple things like that in the AVC stream directly. I know that such programs exist for mpeg 2 and DVD VOB files, but I don't know if something similar exists for h264 or h265.
Anyway, if you need to re-encode and you still have the project, you can edit the SAR in __ENCODE_3D.cmd, and relaunch the encoding.
sneaker_ger
30th January 2018, 23:13
Such tools exist for H.264:
https://forum.doom9.org/showthread.php?t=174563
https://forum.doom9.org/showthread.php?t=152419
Whether your own player reacts to bitstream and/or container flag has to be tested.
von Suppé
31st January 2018, 12:10
Such tools exist...
I don't get this. Can somebody please elaborate?
I always thought that DAR = SAR x PAR
where
DAR is (resulting) display aspect ratio
PAR = Horizontal/vertical display-ratio of a single pixel
SAR = Size ratio; the actual number of horizontal pixels to the actual number of vertical pixels of the video.
This equation makes (mathematically) sense to me.
If I'm wrong with this, please tell me, I'll gladly stand corrected.
If not, how on earth can you "just change" SAR (without resizing)? Or is there another thing to only changing the SAR header?
tebasuna51
31st January 2018, 12:35
I always thought that DAR = SAR x PAR
where
DAR is (resulting) display aspect ratio
PAR = Horizontal/vertical display-ratio of a single pixel
SAR = Size ratio; the actual number of horizontal pixels to the actual number of vertical pixels of the video.
You are right with the wikipedia:
DAR = Display Aspect Ratio (https://en.wikipedia.org/wiki/Display_aspect_ratio)
PAR = Pixel Aspect Ratio (https://en.wikipedia.org/wiki/Pixel_aspect_ratio)
SAR = Storage Aspect Ratio (https://en.wikipedia.org/wiki/Aspect_ratio_(image)#Distinctions)
But here 'sar' is used like Sample Aspect Ratio, the previous wikipedia PAR Pixel_aspect_ratio
Then really we can change the wikipedia PAR using the x264 parameter --sar
r0lZ
31st January 2018, 12:47
SAR (in h264) means Sample AR, not Size AR. See here (https://forum.videohelp.com/threads/323530-please-explain-SAR-DAR-PAR#post2003533). I don't remember exactly its definition, but it describes the aspect ratio of the pixel. A SAR of 1:1 corresponds therefore to square pixels. (According to some sources, SAR was previously called PAR, Pixel AR.) AFAIK, in the AVC streams of a 2D BD, the SAR is always 1:1.
It seems logical to assume therefore that Half-SBS would require a SAR of 2:1, but it's not the case. Most, if not all TVs and hardware players require 1:1, even if the pixel is rectangular. It's the value used by BD3D2MK3D.
The value to use is not clear for Full-SBS or Full-T&B. Stricto sensu, they have square pixels in the h264 stream, but some players (notably most LG TVs) require respectively 1:2 or 2:1. I have never understood why. Unfortunately, BD3D2MK3D cannot know that, and I have adopted 1:1 by default, but this can be changed with Settings -> Full-SBS/T&B Aspect Ratio.
To make things even more complex. the AR in the MKV header describes the size of the picture. It its value is easy to figure out for a 2D movie (16:9 or 1920:1080 for example), the value for Half and Full SBS and T&B are less straightforward. Is it the size of the two joined pictures (as saved in the MKV) that matters, or the final size of a single view? These 2 sizes are 16:9 for Half-SBS and Half-T&B, but the width or height is 2 times as big for Full-SBD and Full-T&B. Again, the value to use depends of the player, and although it seems that 16:9 works for all players for Half-SBS and Half-T&B, it's not as easy for Full-SBS and T&B, and again, you have to check yourself the correct value for your hardware player.
Note also that many TVs (notably most Samsung TVs) assume that all 3D movies are in 16:9, and ignore completely the SAR in the AVC stream and the Picture AR in the MKV header. They stretch the picture to occupy the whole screen anyway. (It's why it is a very, very bad idea to crop the black borders of the 3D movies.)
This is extremely confusing, also because some TVs use the AR from the header for AVI movies, but they prefer to use the AR from the video stream for MKV files. I don't understand why they use different methods just because the container is different!
[EDIT] tebasuna51 has replied before me.
tebasuna51
31st January 2018, 12:51
That changes the PAR. The SAR is in the h264 stream itself, and AFAIK it is not possible to change it without re-encoding.
If we assume DAR,PAR,SAR wikipedia definitions.
The Storage Aspect Ratio SAR or pixel resolution can't be changed without recode of course.
With MkvToolNixGUI - Header editor we can change the container Display Aspect Ratio, like:
Whether your own player reacts to bitstream and/or container flag has to be tested.
we can try first this method (0 time and size consuming, only header change).
If don't work we can try modify the sar (PAR) in h264 streams like sneaker_ger say.
If also don't work you can recode changing the '--sar' (PAR) in __ENCODE_3D.cmd
von Suppé
31st January 2018, 13:44
Ah, this is a relief. I really got nervous after all these years of learning to understand the meaning of these phrases and criterea... :eek: pffff...
I understand my confusion now. All's well then.
Thanks for the quick reactions guys :)
te36
5th February 2018, 22:09
First post, First off:
:thanks: ;):thanks:;) Great tool.
Secondly: a few questions. If there is any FAQ where these should go into, i'd be happy to make that happen once i know the answers.
All about Full SBS encoding (h265):
1) Kodi-windows/Zidoo X9s show these files with very disturbed aspect ratio. But both can zoom them to correct AR (kodi: pixel AR = 0.5). WinDVD 12 displays them correct.
1.a) So, whose fault is this - players fault, or does BD3D2MKV3D by default not encode the right AR for full SBS ?
1.b) How can i change the AR(i guess MKV AR) in BD3D2MKV3D to fix this ?
2) Kodi 17.6/Win 10 on Intel GPU shows me blocking artefacts. These go away when i disable in Kodi DXVA2 hardware acceleration. So it sounds like a DXVA2 bug. But maybe there is some h265 encoding parameter to tune this - for maximum compatibility (even with broken decoder like probably intels DXVA2 ?).
3) I am so totally confused about the warnings BD3D2MKV3 emits about subtitles and full SBS encoding. Can someone try to explain to me
3.a) Whats the difference in the use of subtitles with half vs. full SBS encoding... Why is full SBS encoding supposedly worse.
3.b) Are there _any_ subtitles for MKV for which depth could be encoded
in an MKV file (native mkv that is, not when just packaging BD DVD TS/MVC streams) ?
On the wish-list, and i'd be most happy if i was just overlooking these options in the twisty little maze of options already available
:
a) configurable encoding bitrate for audio (useful especially when encoding multiple languages/commentary tracks).
b) encode just a chapter (important for testing)
r0lZ
6th February 2018, 01:20
Welcome to the D9 forums, te36!
About the problem of the aspect ratio, see this recent reply (https://forum.doom9.org/showthread.php?p=1831642#post1831642) to almost the same question.
I can't help you for x265 encoding questions. I don't know at all x265, and I use personally only x264. Maybe you should post your questions in the x265 thread.
Currently, afaik there is no standard to include the 3D depth information of the subtitles within the MKV container, so BD3D2MK3D uses "pre-computed" 3D subtitles instead of 2D subtitles + depth info, like in the original 3D BD (where the subtitles are regular 2D SUB streams + 3D depth info stored in the so-called "3D-Planes" or "offset sequences"). BD3D2MK3D uses the offset sequences of the original BD to compute the horizontal displacement of the left and right subtitles so that they are displayed over the two views of the SBS stream at their right positions to produce the correct depth effect (parallax). That means that the 2D subtitle stream must be converted to 3D by duplicating the image of the subtitle and moving slightly the two instances horizonatlly by the amount of pixels stored in the offset sequence. Unfortunately, the resolution of the Full-SBS (or Full-T&B) video stream is problematic. It is easy to understand that two subtitles scaled at 50% horizontally fit in the standard size of an HD movie (1920x1080). However, to build the 3D subtitles for Full-SBS, it is necessary to compose them on a canvas twice as large as the final resolution of the movie (3840x1080). Unfortunately, that size is simply not supported by the SUP streams, limited to standard HD resolution, and the two versions of BDSup2Sub that BD3D2MK3D requires to convert the subtitles to 3D cannot handle that size. Now, with the new UHD movies, 4K subtitle streams exist, but they must be 3840x2160 and not the bizarre Full-SBS resolution (UHD horizontally and HD vertically), still not well supported. Anyway, BDSup2Sub cannot generate subtitles for that formats. Hence the warning in BD3D2MK3D. I haven't written that the result is "worse" for full-SBS than for Half-SBS. It's simply impossible, at least currently.
However, it is possible to hardburn the subtitles on the Full-SBS video stream, if you really want the 3D subtitles, because the subtitle for the left eye is burnt on the left video stream and the subtitle for the right eye is burnt on the right video stream BEFORE the two video streams are joined together to form the Full-SBS combined stream. It is never necessary to use a larger subtitle stream than the original HD.
Note also that subtitles in the ASS (Advanced Sub Station Alpha) format are not restricted to any resolution and therefore can be used in a Full-SBS MKV. But ASS is a text based format, and the 3D subtitles in the original BD are always in SUP (graphic) format. It is therefore difficult to convert the original 2D SUP stream to ASS 3D automatically. But you can do it manually with SubtitleEdit to OCR the original SUP stream as a SRT (text) stream, and then convert that SRT to ASS 3D with BD3D2MK3D. It will use the 3D depth info from the original 3DBD, and optionally it cxan clone the position of the original subtitles. It's a long and somewhat difficult work, you don't have the guarantee that the effect will be perfect (due to differences in font, size, outline, placement...) but it's possible. Of course, your player must also support the ASS format, and it's rarely the case of standalone players or TVs.
For your wish list, you can already select the quality for the AAC encoding of the audio tracks. (See the settings menu.) It's not possible when you convert to AC3, but IMO, BD3D3MK3D uses reasonable defaults (different for stereo and 5.1). And if you really want to encode with another bitrate, you can simply use the Audio conversion tool (from the Tools menu) after the project has been created to overwrite the AC3 or AAC streams created by BD3D2MK3D. In the GUI of that tool, you can select any bitrate or AAC quality. Also, note that the AC3 core is simply extracted from TrueHD tracks. It is not re-encoded, to preserve the best quality. I don't want to change that.
Unfortunately, currently, the existing free MVC decoders for Avisynth can only decode all frames sequentially. In other words, it is not possible to seek to a certain point in the movie, and it is necessary to start the decoding at the beginning of the movie. It is therefore not possible to encode a single chapter. (In fact, there is a way to do it with a tool written by Slavanap, but the frames before the beginning of the chapter will need to be decoded anyway, and that will be long and confusing. I don't have and will not implement that possibility.) But for your tests, you can restrict the encoding to a certain number of frames. Just edit __ENCODE_3D.cmd and change the two -frames arguments to any number. (If you want to cut exactly at a chapter point, you will find the frame numbers of the chapters in chapters_3D.qpfile.)
te36
6th February 2018, 01:48
Thanks a lot for the answers. Will try to find better forum for x265 question.
I've wiped off my exploded brain from the floor after reading through the subtitle explanations :p The zidoo x9s has in its proprietary media player a bunch of options how to display subtitles with 3D. I have to revisit the options, maybe i understand their effect better after your explanations. It sounds to me almost as if i should not try to convert to 2D subtitles, but keep 3D? subtitles with a fixed depth that makes them stay out very much in-front so they never overlap... Lets see. Burned in subtitles definitely d not make sense to me where i would hope to have my the RIPs of my blu rays be at least dual language. The extraction of forced vs. non-forced subtitles is on the top of best features in BD3D2MKV3D.
I have seen the Chinese Blu ray ripper being able to convert individual chapters without noticeable lead-in time that would otherwise be required to decode the rest of the move. Also Blu ray players can of course start decoding at chapter boundaries. But of course, i have no idea if any of the toolchains BD3D2MKV3D uses would make that easy or impossible. Should be reasonably easy though to modify the CMD as you explained to quickly run through different encoding options after a full decode is on disk. Optimizing h265 parameters for example.
hiltr0n
23rd February 2018, 07:23
I have another question. I am doing Full 3D SBS and need to have my file resolution be 3840 x 2160 after compressing instead of 3840 x 1080. Is there a way to achieve this? I realize this is a bit odd since I technically would be scaling the vertical resolution 2x but there is a good reason. I purchased an Nvidia Shield TV which can playback my Full 3D SBS files just fine with hardware acceleration turned off. However, with that setup, it won't playback 4K HDR material, and a bunch of other things without hardware acceleration turned on. In an effort to make this setup user friendly (wife and kids), the only solution I currently have is to change the resolution of my 3D files and keep hardware acceleration turned on. I'm hoping there is some text I can add to the "__ENCODE_3D.cmd" that will do this. I've tried adjusting the SAR to various values, but it still looks at the original resolution of 3840 x 1080.
r0lZ
23rd February 2018, 11:31
Sorry, I did not notice this comment.
The zidoo x9s has in its proprietary media player a bunch of options how to display subtitles with 3D.If it has an option to show the 3D subtitles BEFORE the cut of the 2 views and the final display, you should select that. Also, perhaps you'll find an option to move or resize the subtitles (for example to place them in the black border of the movies shot in Cinemascope). You should avoid that options like the plague, as they ruin the 3D effect.
It sounds to me almost as if i should not try to convert to 2D subtitles, but keep 3D? subtitles with a fixed depth that makes them stay out very much in-front so they never overlap... Lets see.It's the best option you can try if the original BD has no 3D-Planes. But anyway, the true 2D subtitles can only be displayed on the surface of the screen. So, if you can display the 3D subtitles correctly with your player, it is much better to use the 3D-Planes. The fixed-depth method you suggest if better than nothing and should be used when the 3D-Planes are empty, badly created or absent, but that method requires a player that can display the 3D subtitles anyway. So, use it only when you don't have another solution.
BTW, when a movie shot in Cinemascope has no usable 3D-Planes, in addition to the fixed depth it is also often useful to move the subtitles in the bottom black border, just to be sure that they will never enter in the foreground objects. BD3D2MK3D has no tool to move the subtitles in that black area, but it can move the video frame up to enlarge the black bar at the bottom. (See the option in the last tab.) I will probably add a subtitle tool to move the subtitles as well, when I will have some time...
I have seen the Chinese Blu ray ripper being able to convert individual chapters without noticeable lead-in time that would otherwise be required to decode the rest of the move. Also Blu ray players can of course start decoding at chapter boundaries. But of course, i have no idea if any of the toolchains BD3D2MKV3D uses would make that easy or impossible.It is easy to start encoding at any point in the movie when you encode a 2D movie. The problem with BD3D2MK3D is that it is not sufficient to decode the 2D AVC video stream. It must also decode the second view, encoded in MVC, and that's more difficult. Anyway, as I wrote above, BD3D2MK3D uses avisynth to decode the movie, and currently, all free MVC decoders are not able to begin decoding after the start of the movie.
Should be reasonably easy though to modify the CMD as you explained to quickly run through different encoding options after a full decode is on disk. Optimizing h265 parameters for example.Yes, you can do that easily to check the x265 encoding options. However, when you know what settings are correct for your movie, you may want to edit also the label of the video stream in the __MUX_3D_OPTIONS file, and the ENCODER_SETTINGS field in the __TAGS_3D.xml file. Although they do not influence the encoding, they are kept in the final MKV file for reference, and should correspond to the encoding parameters really used to encode the final MKV.
r0lZ
23rd February 2018, 11:58
I am doing Full 3D SBS and need to have my file resolution be 3840 x 2160 after compressing instead of 3840 x 1080. Is there a way to achieve this? [...] I'm hoping there is some text I can add to the "__ENCODE_3D.cmd" that will do this.
Yes, you can do it, but you have to edit the __ENCODE_3D_MOVIE.avs file, not __ENCODE_3D.cmd.
In __ENCODE_3D_MOVIE.avs, you will see this:
# Build Side-by-Side stream
StackHorizontal(Left, Right)
AssumeFPS("ntsc_film")
Just add a resize command between the two original command, like this:
# Build Side-by-Side stream
StackHorizontal(Left, Right)
LanczosResize(3840, 2160)
AssumeFPS("ntsc_film")
Note that there is a lot of avisynth Resize commands (http://avisynth.nl/index.php/Resize). Some give better results than others, but are usually slower. There are endless discussions on what is the best command to enlarge an image. There are also specific parameters to fine-tune these commands. You will have to select the one that you like yourself. Lanczos is among the best resize methods, but is somewhat slow. Anyway, since here you just want to multiply the height of the picture by exactly 2, a somewhat basic resize should give good results.
And don't ask me what SAR and PAR you have to use so that your player will display correctly the movie encoded in that unusual resolution. As I've explained previously, there is no established standard for the aspect ratios for 3D SBS and T&B, and the values to use may depend of your player. Just remember to change the SAR in __ENCODE_3D.cmd and the --aspect-ratio field in __MUX_3D_OPTIONS. I suppose that you can use 0:16/9 in __MUX_3D_OPTIONS, as it's the AR of the full-SBS as well as the final, decoded movie. The SAR in __ENCODE_3D.cmd is more difficult to figure out. Anyway, it might be a good idea to check the movie with several players. Remember that you will probably not use the same player during your whole life!
Good luck!
hiltr0n
23rd February 2018, 16:28
Fantastic! Exactly what I was hoping to do. Yeah, I'll be testing various SAR values so that my players playback correctly (currently Roku Premiere+ and Nvidia Shield). And I agree, I won't use the same player my whole life. Thanks for this.
Actionable Mango
2nd March 2018, 02:59
Thank you r0lZ, this tool is wonderful. I've ripped my disc library in the past but have always had to keep the 3D discs out as an exception to that. Now I can finally include my 3D titles as well.
Unfortunately, the resolution of the Full-SBS (or Full-T&B) video stream is problematic. It is easy to understand that two subtitles scaled at 50% horizontally fit in the standard size of an HD movie (1920x1080). However, to build the 3D subtitles for Full-SBS, it is necessary to compose them on a canvas twice as large as the final resolution of the movie (3840x1080). Unfortunately, that size is simply not supported by the SUP streams, limited to standard HD resolution, and the two versions of BDSup2Sub that BD3D2MK3D requires to convert the subtitles to 3D cannot handle that size.
Would subtitles work on Frame Sequential video streams then? With FS, the frames would be "standard HD resolution" so it wouldn't have the problem you describe. Or is there a different problem with FS that prevents subtitles from working there?
r0lZ
2nd March 2018, 10:54
Thanks for the thanks, and welcome to the Doom9 forums, Actionable Mango.
Would subtitles work on Frame Sequential video streams then? With FS, the frames would be "standard HD resolution" so it wouldn't have the problem you describe. Or is there a different problem with FS that prevents subtitles from working there?
Unfortunately, there is still a problem. With FS, the video stream contains one frame for the left eye, then one frame for the right eye, and so on. On the other hand, the subtitle streams contain subtitles starting at a specific time code and ending at another time code. There is no way to specify "this subtitle stream must be displayed on the left (or right) frames only", and therefore it is impossible to mux real 3D subtitles with a FS video.
Again, it's a problem related to the lack of a consistent 3D video standard, as it should be possible to add the necessary "left/right view" information in the header of the subtitle stream to inform the 3D players, but it's not the case. So, currently, muxing two different streams for the two eyes is useless. The player will pick only one, and display it in 2D.
However, like for full-SBS, it is possible to burn the subtitle stream on the image, during the encoding of the video stream (with the option on the last tab of BD3D2MK3D). It's not perfect, but that works with all players, and you can be sure that the subtitles will appear exactly where and when they should. The price to pay is that there is no way to hide the subtitles, for example when you play the audio in your native language.
Actionable Mango
2nd March 2018, 23:54
According to the LG OLED65E6P manual, TAB, SBS, and Frame Sequential are all supported 3D modes.
So far I've tested full resolution TAB and SBS, and both work and look great. Both automatically trigger 3D mode. I did this test with two different movies, so I cannot directly compare file size or quality.
Later tonight my latest encode test will be done, which is full resolution Frame Sequential, so I can test to see if that works too.
Of the three other posters in this thread with LG 4K 3D TVs, I've noticed you all do full resolution TAB. Why is everyone using TAB over SBS or Frame Sequential? Is it just a coincidence? Is TAB better in some way (higher quality? more compatible with other players? smaller size? future proof? it provides balance to the universe?)
r0lZ
3rd March 2018, 11:01
LG TVs (HD and UHD) use always passive glasses that filter the polarized light. That means that they emit half the pixels with a particular polarization, and the other half with the opposite polarization. As far as I know, all LG TVs are based on the same model. One line of pixel contains the pixels for the left view, the next one for the right view and so on. (I have read somewhere that LG is now able to offer full resolution for the two eyes, but theoretically, it's impossible.) Therefore, it seems logical to use Half-TAB instead of Half-SBS, as there is exactly the same number of line for the left and right eyes in the encoded video and in the screen. You encode 1920x540 and you see exactly that. If you use Half-SBS, half the pixels are not at the right position and are useless. You see a 960x540 image.
However, if that logic is correct for Half-TAB, IMO there is absolutely no reason to prefer Full-TAB over Full-SBS or FS. Since the video resolution is full anyway, the passive HD TV will throw away half the resolution regardless of the 3D frame packing. But the habit to prefer TAB over SBS is well anchored, and there are certainly many web sites that continue to pretend, probably wrongly, that Full-TAB gives a better quality with all kind of LG TVs.
I don't know how 3D UHD LG TVs react to Half-TAB or Half-SBS. IMO, the quality loss when using Half-SBS is probably minimal, if not completely absent, but I'm not sure.
On the other hand, Half-SBS is largely considered better for active 3D TVs. I don't know why, as with active glasses, all pixels are used to display the left and right views. But it is a fact that Half-TAB gives less good results on my Samsung HD TV. Again, I think that Full-SBS/TAB/FS are strictly equivalent.
r0lZ
3rd March 2018, 11:09
So far I've tested full resolution TAB and SBS, and both work and look great.
Have you had to modify the Full-SBS/T&B Aspect Ratio in the settings menu of BD3D2MK3D to obtain a correct picture, or did it work correctly out of the box? It seems that the default aspect ratios for the Full resolutions is not always correct and give distorted results on some LG TVs. I would like to know if I need to modify the default values, or if the LG TVs that do not display the full resolutions correctly are exceptions.
Both automatically trigger 3D mode.
Did you encode in h265 or h264? BD3D2MK3D sets the 3D information in the MKV header anyway, and when encoding in h264, also in the video stream. As far as I know, only x264 "understands" the --frame-packing option, so currently, that information is not set in the video stream itself when it is encoded in h265. My Samsung TV switches to the correct 3D mode only when the information is present in the video stream, and ignore the MKV header, and therefore it cannot display the h265 videos in 3D automatically. :-(
I would like to know if LG takes the 3D info in the MKV header into account. Or does it detect the 3D mode with the 3D string in the file name?
Actionable Mango
5th March 2018, 19:49
Have you had to modify the Full-SBS/T&B Aspect Ratio in the settings menu of BD3D2MK3D to obtain a correct picture, or did it work correctly out of the box?
Did you encode in h265 or h264?
Or does it detect the 3D mode with the 3D string in the file name?
I can't answer the first question (yet) because I modified the ratio setting right from the start based on other LG users posts of their settings.
I encoded in H264. I had started up an H265 encode, but the estimated time was over 100 hours, lol. I have a Mac Mini, which is a low end computer, and in my case even worse because it's a 6-year old model with the slowest CPU option. With H264 I can do 1 movie a day.
I don't know that the LG is aware of the filename since I am using Plex, not an LG app, to play the content. I'm not sure the Plex server even gives the filename to the Plex client, much less the LG TV itself. But, for what it's worth, Plex installed on the TV automatically switches to 3D mode, and Plex installed on the AppleTV does not. On the AppleTV 3D still works via Plex, but it must be manually activated. I don't know if that gives you the clue you are looking for.
I really appreciate that you put this tool together. I would like to contribute back in some way. If there are any tests you'd like me to do, I'd be genuinely happy to do them. Just keep in mind it will be slow getting back to you, considering my computing power.
Tests to try:
Try default Aspect Ratio
Try H.265
Remove 3D information from filenames and see what happens
If there are any others to add to the list, let me know.
I have to admit, I'm not super excited about doing the H.265 test since it will use my computer for 4 days. I also have a very low end budget laptop ($280) that has an Apollo Lake Celeron supposedly with hardware acceleration for HEVC, both encoding and decoding. Will that hardware acceleration work with BD3D2MK3D? If so, I could switch to that and perhaps H.265 testing could potentially be much faster.
Is there a freely available file somewhere with short-length 3D content that I could use for these tests? All I have as sources are my movie discs which are quite long.
r0lZ
5th March 2018, 20:25
Thanks for the info. It's already very informative.
I know that encoding with x265 is much slower than with x264, but take in mind that you can use a faster preset and still get a much smaller file than with a slow x264 preset. The compression ratio of h265 is extraordinary! However, do it only if you think that it's useful for you. I don't need much testing.
Unfortunately, x264 and x265 do not use hardware acceleration. According to their development teams, it is not possible to obtain a good quality with the encoder algorithms necessary to use the acceleration, so they prefer to do it the slow way.
To do quick tests, I suggest to encode a Pixar short. On all 3DBDs with Pixar animated films, there is a short movie, usually excellent, and well suited to do quick tests. If you don't have a Pixar DB, you can also encode a 3D menu or another short clip. Use the Show All 3D Playlists option in the first tab of BD3D2MK3D to see if there are short clips hidden by default because they are too short to be interesting. If you want, I can also post the iso of the short Netblender demo BD somewhere (not officially available any more), but although it's a demo, it is probably copyrighted, and I'm not sure I can.
Actionable Mango
5th March 2018, 20:37
IMO there is absolutely no reason to prefer Full-TAB over Full-SBS or FS.
I finished my TAB/SBS/FS testing. The LG plays all of them (via Plex), and automatically switches to 3D for all of them. They all look the same to me quality-wise, and this time I did a direct comparison by encoding the same movie three times. If there is a difference, I cannot see it.
Interestingly, since Plex on the AppleTV requires manually switching to 3D mode, I cannot use FS files there. This is because LG's "manually switch to 3D mode" has TAB and SBS choices only, no choice for FS. Therefore, playback from Plex on the AppleTV is limited to TAB/SBS (and I assume would be the same for any external media player).
Unfortunately, there is still a problem. With FS, the video stream contains one frame for the left eye, then one frame for the right eye, and so on. On the other hand, the subtitle streams contain subtitles starting at a specific time code and ending at another time code. There is no way to specify "this subtitle stream must be displayed on the left (or right) frames only", and therefore it is impossible to mux real 3D subtitles with a FS video.
Well I was doing FS test anyway, so I decided to see what would happen if I toggled the subtitles on. Lo and behold, they work!
To be clear, these are not hard-coded subtitles. They are the default settings (3D only, Blu-ray SUP, 0 depth added) and they can be toggled on and off during playback.
I'm pretty happy! I now have a solution that automatically triggers 3D mode, is full resolution, and I can select optional audio tracks and subtitle tracks.
:cool:
Thanks again for your tool, and to the others who contributed to it as well.
r0lZ
6th March 2018, 10:19
I cannot use FS files there.
FS is not supported by most players, so IMO, since Full-SBS and Full-TAB are well supported, you should use one of those formats.
Well I was doing FS test anyway, so I decided to see what would happen if I toggled the subtitles on. Lo and behold, they work!
Hum, sorry to disappoint you, but you have seen the 2D subtitles. And using 2D subtitles for a 3D movie is a torture for the brain!
They are the default settings (3D only, Blu-ray SUP, 0 depth added)
Since BD3D2MK3D cannot generate the 3D subtitles for Full-SBS, Full-TAB and FS, it replaces them automatically with the 2D version of the subtitles, even if you have selected 3D only.
You can verify easily that the subtitles are in 2D if you have a look at the filenames in the project. You will see, for each subtitle, something like:
00200.track_4610.Fra.2D.sup
00200.track_4610.Fra.sup
With Half-SBS or Half-TAB, you would have seen also "00200.track_4610.Fra.3D.sup", as well as a folder "00200.track_4610.Fra.3D_2D" with the temp XML and PNG files necessary to convert the 2D stream to 3D.
If you really want to check if your player supports the 3D subtitles in any full resolution, you should convert them manually to 3D (with the Subtitles Tools menu). Of course, it doesn't make much sense to convert them to Half-SBS or Half-TAB, so you will probably want to convert them to FS as 2 different streams. You will have to mux them manually (or edit the __MUX_3D_OPTIONS.txt file and launch the __MUX_3D.cmd to rebuild the final MKV file). I don't know how it will be possible to inform the player that it must use the 2 streams at the same time, and what stream is for the left or right eye. If Plex is really smart, perhaps it is possible to simply include "left" or "right" in the label of the stream? But honestly, I'm almost sure that they will be recognised as 2 independent 2D streams.
Actionable Mango
6th March 2018, 19:18
I've run the filename test by stripping all the 3D information from the filename. The TV still starts 3D mode automatically.
Hum, sorry to disappoint you, but you have seen the 2D subtitles. And using 2D subtitles for a 3D movie is a torture for the brain!
That's totally okay. The reason I need on/off subtitles is because I am a little hard of hearing and some times I cannot understand what was said, so I back up and have the subtitles on for a few seconds. Then I can turn them off so they don't distract me from the movie.
You are right they are 2D, but that is not important for my temporary purpose. If I needed subtitles on all the time, such as for a foreign film, I'd burn them in as you suggested earlier.
Actionable Mango
12th March 2018, 22:01
I've done two more tests.
The 1:2 ratio setting "for some LG TVs" has to be on. With the setting off, the video displays at half size with large black bars all the way around.
H.265 FrameSequential does not work. The LG TV will not automatically turn on the 3D mode for H.265 FS like it will for H.264 FS. Also, the TV has no way to turn on 3D mode manually for FS; it only has manual modes for TAB and SBS.
I have started an H.265 TAB test, but it will be a couple more days before it is done. Boy I hope I remembered to turn the 1:2 ratio back on. :scared:
I will try an H.265 SBS test after that. If there is anything else you'd like me to try, please let me know.
My current 6-year old base model Mac Mini is very slow for this work. I might look into getting a new computer for Plex hosting and video encoding. Will the encoding speed scale well with additional cores? For example if I get a quad core of a certain speed will it be about twice as fast as a dual core of the same speed?
r0lZ
13th March 2018, 10:39
Thanks for the tests!
The 1:2 ratio setting "for some LG TVs" has to be on. With the setting off, the video displays at half size with large black bars all the way around.
OK. I will change the default value then. I hope other TV brands need the same setting!
H.265 FrameSequential does not work. The LG TV will not automatically turn on the 3D mode for H.265 FS like it will for H.264 FS. Also, the TV has no way to turn on 3D mode manually for FS; it only has manual modes for TAB and SBS.
It's not really surprising. FS is usually not well supported by modern TVs (but can be mandatory for some old material).
I have started an H.265 TAB test, but it will be a couple more days before it is done. Boy I hope I remembered to turn the 1:2 ratio back on. :scared:
Normally, when you change a setting in the menu, it is automatically remembered from session to session. (However, if you change a setting in a tab, and if Save Tab Settings on Exit is off, you have to manually save them with Save Tab Settings Now.)
I will try an H.265 SBS test after that. If there is anything else you'd like me to try, please let me know.I don't think so. And I don't need a specific test for h265+TAB. If your material works fine for h264+TAB and h265+SBS, it will certainly work well for h265+TAB. So, do that test only if YOU are interested in its result.
My current 6-year old base model Mac Mini is very slow for this work. I might look into getting a new computer for Plex hosting and video encoding. Will the encoding speed scale well with additional cores? For example if I get a quad core of a certain speed will it be about twice as fast as a dual core of the same speed?
I suppose so, yes. At least, on my 4-core machine, all cores are working at 95-100% during the encoding. However, I'm not specialist of x264 and x265. If you want a better answer, post this question in the x264 or x265 forum.
Note also that if you buy a new computer witrh a modern Intel CPU, you will benefit of the hardware acceleration of the Intel MVC decoder, used by the avisynth script during the encoding to build the two views that will be encoded by x265 or x265. The benefit is not immense, but it exists.
Wildfire
13th March 2018, 19:25
Thanks for the tests!
OK. I will change the default value then. I hope other TV brands need the same setting!
I have a LG TV which works just fine with the default setting, as does my father's LG. I expect things to go the wrong way if this setting is changed and I don't change it back...
mini-moose
14th March 2018, 11:38
hi
I get a lot of crashes with x264, sometimes at the very end of the encode (seems completed but the exe crashes) and sometimes in the middle. I did however update x264 to a newer version than the old 2851 that comes in the pack. I'm unsure if that's the cause or the switch to FRIM for default decoder.
Also the demux/project making seems to take a lot longer now but I could be wrong. I had one take over 2h on an SSD. It did have a lot of subtitles to go through but it wasn't the first time and I can't recall it taking so long.
r0lZ
14th March 2018, 12:25
I have a LG TV which works just fine with the default setting, as does my father's LG. I expect things to go the wrong way if this setting is changed and I don't change it back...
OK, I will not change the default, but perhaps I'll create a small dummy project for new users to test the "difficult" parameters like the aspect ratios in Full-SBS/TAB.
However, can you confirm that your LG TVs work fine in FULL-SBS or FULL-TAB mode? I know that they work correctly in Half-SBS and Half-TAB.
r0lZ
14th March 2018, 12:37
I get a lot of crashes with x264, sometimes at the very end of the encode (seems completed but the exe crashes) and sometimes in the middle. I did however update x264 to a newer version than the old 2851 that comes in the pack. I'm unsure if that's the cause or the switch to FRIM for default decoder.
There have been several reports of x264 crashes lately (reported above in this thread). Try an older exe, and if you have an Intel CPU, try to disable the hardware acceleration for the MVC decoder. Anyway, since I'm not involved in the development of x264, I can't help much more. Sorry.
Also the demux/project making seems to take a lot longer now but I could be wrong. I had one take over 2h on an SSD. It did have a lot of subtitles to go through but it wasn't the first time and I can't recall it taking so long.
Indeed, the conversion of the subtitles to 3D takes a lot of time and sometimes (but rarely) it is necessary to do an additional pass to convert them properly. Also, converting lossless audio (especially DTS-HD-Master) to AC3 and especially AAC is very slow. Otherwise, the speed of the demux (the longest operation) has certainly not changed, since the demux is still done with the same version of tsMuxeR. If the demux takes really longer, I would suspect a problem related to your hardware, the drivers, or Windows.
mini-moose
14th March 2018, 12:54
There have been several reports of x264 crashes lately (reported above in this thread). Try an older exe, and if you have an Intel CPU, try to disable the hardware acceleration for the MVC decoder.
OK, I will try that. Is HW acceleration something that's been added in recent versions or specific to FRIM? I can't recall any crashes before when DG was default.
r0lZ
14th March 2018, 14:01
No, hardware acceleration for MVC decoding exists since the beginning, but its default setting, "auto", means that it is used only if the right Intel drivers are installed on your system and of course if you have an Intel CPU supporting it. Since many Intel drivers have had bugs and numerous problems in the past, I suggest to force BD3D2MK3D to use the software decoders only, because they do not depend of the drivers (and the speed loss is not really important). So, if you don't experience problems with the hw acceleration turned off, try to update the Intel drivers, and set the setting to auto again. An update of the drivers *may* solve the problem.
mini-moose
14th March 2018, 14:49
No, hardware acceleration for MVC decoding exists since the beginning, but its default setting, "auto", means that it is used only if the right Intel drivers are installed on your system and of course if you have an Intel CPU supporting it. Since many Intel drivers have had bugs and numerous problems in the past, I suggest to force BD3D2MK3D to use the software decoders only.
thanks r0lZ. I will try that next time!
I think I may have suggested it before: Would it be possible to add an option to disable all the attachment files? I know they don't cause any harm, but I just don't like adding stuff I don't feel I need. I always edit down the mux options text file to remove them.
r0lZ
14th March 2018, 18:04
OK, the attachments are for documentation only, except the cover art, that you can easily omit just by not defining them in the 4th tab. I'll add a global option for the other attachments.
Actionable Mango
14th March 2018, 19:58
If your material works fine for h264+TAB and h265+SBS, it will certainly work well for h265+TAB. So, do that test only if YOU are interested in its result.
I am, just for thoroughness. Okay, here are the results for 2016 LG OLED65E6P 4K 3D TV.
Full resolution, not half.
Playback via Plex installed on the TV.
The special "1:2 / 2:1 for some LG" ratio setting has to be on for my TV.
H264 TAB - Works. Automatically switches to correct 3D mode.
H264 SBS - Works. Automatically switches to correct 3D mode.
H264 FS - Works. Automatically switches to correct 3D mode.*
H265 TAB - Works. Must manually switch to correct 3D mode.
H265 SBS - Works. Must manually switch to correct 3D mode.
H265 FS - Does not work. I suspect it would work if there was a manual choice for FS, but the graphical user interface for manual activation only supports TAB and SBS.
* This is the only mode supporting subtitles that can toggle on and off.
I have a LG TV which works just fine with the default setting, as does my father's LG. I expect things to go the wrong way if this setting is changed and I don't change it back...
It might be helpful to share your year/model so others with LG TVs will know which way to go.
mini-moose
15th March 2018, 10:10
I'll add a global option for the other attachments.
thanks r0lZ
r0lZ
15th March 2018, 11:02
Thanks for the tests, Actionable Mango.
To clarify, can you describe exactly how you use Plex?
My old Samsung TV doesn't support the 3D subtitles, but with the Plex app, I can see them... indirectly. Of course, I have installed the Plex Media Server on the PC, but when using the TV app, I've been disappointed to see that the subtitles are there but not selectable "in this video mode". I have had to change the video playback mode to transcoding and now I can select the subtitles. In other words, the TV with the Plex app cannot directly display the subtitles. To see them, the media server must burn them over the video. That works, but since the video is transcoded in real time, the quality is less good than the original MKV, and the PC is working hard during the playback. So, for me, the Plex solution is better than nothing, but certainly not perfect.
Do you also need to transcode the movies to enable the subtitles, or can you see them with the direct streaming video mode? I suppose that the answer depends of the possibility of the TV to display embedded BD SUP subtitles. Unfortunately, my Samsung cannot.
Actionable Mango
16th March 2018, 01:00
To clarify, can you describe exactly how you use Plex?
Sure. In all cases (SBS/TAB/FS) I can select subtitle streams directly in the Plex TV app with no warning about the video mode. However, the actual results are mixed:
For SBS and TAB, it is completely unusable because the TV does one or both of the following (it is inconsistent): Automatically drops out of 3D mode, and/or loses the correct ratio, becoming half-size. Additionally, it always shows the subtitles in either only the left or only the right view only (can't remember which).
For FS, it is substantially different. The subtitles come on and they look pretty decent. There can be some depth problems with the movie content in the area immediately in and around the letters. So it's slightly wonky but still very, very usable. I believe these are the 2D subtitles (as you stated earlier), because I encoded this three times with three different added depths (-10, 0, +10) and they all looked roughly the same to me. (I assume if they were 3D subtitles then there would have been very obvious differences). With no notification or action on my part, the server silently switches from Plex streaming to transcoding, but there is no apparent change in picture quality. *
* There is one big caveat here. My little Mac Mini could not keep up with transcoding the movie + subtitles. So although the PQ was still perfect, the framerate was like a slide show. My positive description above is based on a temporary addition of a second Plex server installed on a powerful gaming machine that had no problems with transcoding.
* There is also one small caveat. If I flip subtitles on and off too rapidly/frequently in FS files, it will occasionally show the poor symptoms I described for TAB/SBS. That's not really a valid use case though.
r0lZ
16th March 2018, 11:13
I see. So, t show the subtitles, it seems that the Plex transcoding is necessary anyway, and therefore a powerful PC. I can confirm that with Half-SBS, the 3D subtitles are displayed correctly with transcoding enabled and no change of the size of the subtitles. With Full-SBS, Full-TAB or FS, the problem is that the subtitles are in 2D anyway, and Plex can't help, even in transcode mode.
Thanks for the numerous tests and the useful information!
Actionable Mango
5th April 2018, 19:22
r0ltZ, can I humbly suggest a feature for your to-do list? A lot of 3D movies seem to get the shaft when it comes to audio. For example an ATMOS track is available for a movie, but only on the 2D disc. I don't really understand this, as both discs are typically included in the same case together, and looking at file sizes there is room on the 3D disc.
I think it would be great in BD3D2MK3D to be able to open two sources, one for the 3D video source, and the other for the same movie but with better audio such as ATMOS, then merge the two into a 3D MKV file with ATMOS.
I'm hoping this is easy, as MKVtoolnix does this and it's already in the bundle of tools used by BD3D2MK3D. The technique seems simple:
I simply used MakeMKV to rip both the 3D Blu-ray and the 2D Atmos Blu-ray into MKVs. Then opened MKVToolNix and muxed the 3D MVC video, chapters and subtitles from the first MKV with only the TrueHD7.1/Atmos audio track of the second MKV. Took about 25 minutes to compile and I have 1 perfect 3D MVC MKV Atmos file. No sync issues, no playback issues in Kodi 14/15 and just in fact finished watching it and it looked fantastic and sounded amazing!
Source for that quote is the "update" section of the first post here:
http://www.avsforum.com/forum/39-networking-media-servers-content-streaming/1939705-gravity-3d-mkv-atmos-how-do.html#post32777961
If not, I can just do this manually before starting BD3D2MK3D. But the great thing about BD3D2MK3D is to put many separate tools and processes into a single, easy-to-use GUI, which I really appreciate.
I also know I can't use this currently, because the LG's ARC out won't support ATMOS. But I don't know how I'll play these files in the future, and that could easily be Plex on a little media player box that supports bitstreaming ATMOS. I have already purchased two ceiling speakers.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.