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

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

 

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

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 24th January 2018, 17:12   #1401  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,401
Quote:
Originally Posted by Tenker View Post
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
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV

Last edited by r0lZ; 24th January 2018 at 17:15.
r0lZ is offline  
Old 24th January 2018, 17:19   #1402  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,401
Quote:
Originally Posted by Rexian View Post
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.
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline  
Old 25th January 2018, 03:10   #1403  |  Link
Rexian
Registered User
 
Join Date: Apr 2004
Posts: 15
Quote:
Originally Posted by r0lZ View Post
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 is offline  
Old 25th January 2018, 05:42   #1404  |  Link
Rexian
Registered User
 
Join Date: Apr 2004
Posts: 15
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
Rexian is offline  
Old 25th January 2018, 10:12   #1405  |  Link
Tenker
Registered User
 
Join Date: Jul 2005
Posts: 19
Quote:
Originally Posted by r0lZ View Post
...
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
Tenker is offline  
Old 25th January 2018, 13:20   #1406  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,401
Quote:
Originally Posted by Tenker View Post
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
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline  
Old 25th January 2018, 13:25   #1407  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,401
Quote:
Originally Posted by Rexian View Post
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
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline  
Old 25th January 2018, 15:10   #1408  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,401
BD3D2MK3D v1.6

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. (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!
Quote:
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
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV

Last edited by r0lZ; 25th January 2018 at 15:13.
r0lZ is offline  
Old 30th January 2018, 22:02   #1409  |  Link
hiltr0n
Registered User
 
Join Date: Feb 2017
Posts: 12
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.
hiltr0n is offline  
Old 30th January 2018, 22:24   #1410  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,215
Try changing:

MkvToolNixGUI -> Header editor -> Video track -> Fields Video Display Width/Heigth

And Save.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline  
Old 30th January 2018, 22:53   #1411  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,401
Quote:
Originally Posted by tebasuna51 View Post
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.
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline  
Old 30th January 2018, 23:13   #1412  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,570
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.
sneaker_ger is offline  
Old 31st January 2018, 12:10   #1413  |  Link
von Suppé
Registered User
 
von Suppé's Avatar
 
Join Date: Dec 2013
Posts: 319
Quote:
Originally Posted by sneaker_ger View Post
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?
von Suppé is offline  
Old 31st January 2018, 12:35   #1414  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,215
Quote:
Originally Posted by von Suppé View Post
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
PAR = Pixel Aspect Ratio
SAR = Storage Aspect Ratio

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
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline  
Old 31st January 2018, 12:47   #1415  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,401
SAR (in h264) means Sample AR, not Size AR. See here. 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.
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV

Last edited by r0lZ; 31st January 2018 at 13:07.
r0lZ is offline  
Old 31st January 2018, 12:51   #1416  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,215
Quote:
Originally Posted by r0lZ View Post
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:

Quote:
Originally Posted by sneaker_ger View Post
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
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline  
Old 31st January 2018, 13:44   #1417  |  Link
von Suppé
Registered User
 
von Suppé's Avatar
 
Join Date: Dec 2013
Posts: 319
Ah, this is a relief. I really got nervous after all these years of learning to understand the meaning of these phrases and criterea... pffff...

I understand my confusion now. All's well then.

Thanks for the quick reactions guys
von Suppé is offline  
Old 5th February 2018, 22:09   #1418  |  Link
te36
Registered User
 
Join Date: Jan 2018
Posts: 2
Thanks & Questions

First post, First off:
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)
te36 is offline  
Old 6th February 2018, 01:20   #1419  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,401
Welcome to the D9 forums, te36!

About the problem of the aspect ratio, see this recent reply 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.)
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV

Last edited by r0lZ; 6th February 2018 at 01:30.
r0lZ is offline  
Old 6th February 2018, 01:48   #1420  |  Link
te36
Registered User
 
Join Date: Jan 2018
Posts: 2
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 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.
te36 is offline  
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

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

Forum Jump


All times are GMT +1. The time now is 02:19.


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