View Full Version : BD3D2MK3D v1.17: Convert 3D BDs or MKV to 3D SBS, T&B or Frame-sequential MKV


Pages : 1 [2]

Sxc
31st May 2016, 13:58
Well, I've read some doc on 10bit color depth support and the BD standard and compatibility with avisynth (including this doc (http://avisynth.nl/index.php/High_bit-depth_Support_with_Avisynth)), and I'm not sure it is a good idea to implement it. AFAIK, currently, avisynth is still limited to 8-bit (although some filters may use more bits internally), and I wonder if encoding in 10-bit is really interesting if avisynth returns a 8-bit video anyway.

Perhaps it is possible to use various alternative filters within avisynth to output 10 or 12-bit, but honestly, I don't know how, I'm not sure they will be compatible with the filters BD3D2MK3D requires, and again, given the fact that the input BD is encoded in 8-bit (TV range), I don't think that the gain will be major. Note also that most monitors and TVs are 8-bit only, and therefore you can only expect a more or less well dithered 8bit color depth in final, even if the whole processing and encoding processes are made correctly in 10 or 12-bits.

So, unless somebody can explain what I'll have to do to effectively support 10 or 12-bit color depth during the whole process and can show me clearly that there is a big advantage, I will not do it. Sorry.

Anyway, if you really want to encode in 10 or 12-bit, you can replace the x264/x265 exe with the 10/12-bit version, as you know. You can even create several small cmd files to restore the 8-bit version or overwrite it with another version, and call the right batch when necessary, before launching the encoding.

Well, setting aside the fact that the source was only encoded at 8bit, re-encoding the freshly decoded uncompressed video from avisynth using 10bit is giving a better quality file (no banding that wasn't visible on the source when being played appearing in the encode) with a not insignificant smaller filesize than using H.264 to get equivalent quality.

It's certainly easy enough to replace the executable as you say anyway, but their is a trend now to use H.265 with 10 bit on re-encodes of content that was originally H.264 8bit is common, especially for animated material.

r0lZ
31st May 2016, 15:12
Well, 10-bit and x265 encoding have above all the reputation to be incompatible with most hardware. Only a few peoples can afford an extremely expensive 10-bit monitor, and I'm even not sure that 10-bit HD TVs exist. 10-bit will probably slowly become a new standard (probably with 4K UHD), but even that is not sure. Most peoples are still happy with the standard PAL or NTSC resolution of the DVD, and I'm not sure the market is ready for high quality 10-bit HD!

My main concern is that Avisynth is not supposed to output 10-bit. It should theoretically output only 8-bit (furthermore, limited by the TV range, so it's effectively less than 8-bit.) If you do the resize with x264, I agree that some new colors can appear, but afaik it is not possible to resize with x265. The removal of the noise during the compression is mainly responsible of the banding, but I don't know if encoding in 10-bit gives better result, because the noise is removed anyway. Is the encoder smart enough to replace the noisy pixels with an uniform color chosen among the 10-bit colors? Or does it simply remove the pixels not equal to its neighbours, therefore replacing the pixel with a color available in the 8-bit range? Honestly, I don't know.

And what happens if you play the movie on a 8-bit monitor or TV? Again, I suppose that the quality of the reduction from 10 to 8-bit depends of the TV. A high quality, 10-bit aware monitor will probably generate some dithering in order to globally keep the original colors, but mid-range TVs and monitor will probably simply truncate the 2 additional bits of colors, and display terrible banding artefacts, reducing the gain to nothing. Most TVs may even fail to recognise the 10-bit colors correctly, and either refuse to play the file or play it with totally wrong colors.

Also, supporting the other color depths is not as trivial as it looks. For example, I have to take into account that 10-bit h264 is not compliant with the BD standard, and therefore I have to disable the BD Compatible option when something else than 8-bit x264 is selected. In the other hand, if you replace the exe, you are supposed to know what you are doing! ;)

Anyway, I will try to do some tests. If it appears that many TVs and monitors benefit of the 10-bit encoding, I will implement it. But currently, I'm sceptical.

r0lZ
8th June 2016, 08:21
As I suspected, my tests of 10-bit h264 encodings have proven that most hardware players do not support it. In fact, I have tested it on 3 TVs and 2 hardware media players, and it has always been rejected! On my PC, it is accepted by all software players I've tested, but perhaps due to the 8-bit monitor I'm using, I can't see any significant difference with the 8-bit encoding. I have also noted that the banding problem is already very visible in some original BDs, and is usually only a very little bit strengthened by the 8-bit re-encode (with h264 and the default CRF 23!) Therefore, I'm now totally convinced that encoding in 10-bit is usually not a good idea, except if you have the 10-bit compatible equipment and a very small improvement is important for you. But I have also seen that modifying my code to support the 10 and 12-bit encoders was relatively easy, so I did it anyway. Therefore, it is now possible to encode in 10-bit (and 12-bit in h265 too). There is a warning if you select that option to explain why it's probably not a good idea, but you can do it. So, here is the new version. I hope you will enjoy it.

Note that due to the new colour depth support, I have been forced to rename the x264 and x265 executable files in the toolset folder. You will see a dialog when you launch v0.90 for the first time, asking if the old files can be deleted. You should accept only if all projects generated with previous versions of BD3D2MK3D have been already encoded, as otherwise the __ENCODE_3D.cmd script will not find the x26* exe and fail.

This version contains also some little improvements and fixes two bugs in Convert SRT to ASS 3D.


v0.90 (June 8, 2016)
- Added the possibility to select the colour depth (8, 10 or 12-bit) of the final video in the last tab.
- Added 2 procedures in the context menu of the MPLS list in tab 1 to sort the playlists by MPLS or by M2TS/SSIF number(s)
- Added 4 procedures in the context menu of the MPLS list in tab 1 to easily remove the MPLS that do not contain the movie. (Useful mainly for protected BDs.)
- Added the URL to download the x265 builds by LigH in Help -> x265 version. (Thanks LoRd_MuldeR!)
- Bug fixed again in Convert SRT to ASS 3D: The first subtitle was sometimes missing when the input file is encoded in UTF-8/16.
- Bug fixed in Convert SRT to ASS 3D: The vertical positions of the subtitles was wrong when using a guide file.
- Updated MkvToolnix executables to the latest version (v9.2.0)
- Due to the new colour depth option, the file names of the x264 and x265 executables in the toolset folder have changed.

Download: BD3D2MK3D.7z (http://download.videohelp.com/r0lZ/BD3D2AVS/BD3D2MK3D.7z)

Sxc
9th June 2016, 02:38
Thanks for adding that supportt, and agree with you regarding using H.264 10 bit, there is next to no hardware support for it. Where it makes a big difference is with H.265 encodes.

The android hardware players (as well as Samsung/LG Smart TV) that have H.265 support also support 10bit files. There is a noticeable difference between using 8 and 10 bit when it comes to banding in my experience, especially in dark scenes. The down sampling being done from the 10bit to 8 bit when it appears on your 8bit display on your computer is still superior to just having encoding it as 8bit with H.265.

I know at least my OLED 4K TV is rendering the 10bit with 10bits too.

r0lZ
9th June 2016, 09:40
Oh, yes, of course, if you have a 4K TV, 10bit is supported. AFAIK, 10bit is part of the UHD specs, so all UHD TVs must support it. Anyway, now, you can easily encode even in 12bit x265 if you wish.

Triple-M
12th June 2016, 14:15
Today i installed your newest Version but now i can't encode the 3D movie. When i open the Launcher, a window open but nothing happen. Also the Microsoft Security Essentials detect a Virus/Trojaner in BD3D2MK3D. I was shocked!

r0lZ
12th June 2016, 16:59
The virus detection is a false positive, as you can see with VirusTotal (https://www.virustotal.com/en/file/bd9e49272bf1ba63d4e6b390ef36621cc4dd48de1c965941ba8c0b848b99d920/analysis/1465745452/): Detection ratio: 0 / 56, and Joti (https://virusscan.jotti.org/en-GB/filescanjob/o1bdbe6p58): 1 / 20. It's almost perfect. Even M$ does not detect a virus. However, ClamAV detects shutdowngui.exe (in the toolset folder) as a PUA (Potentially Unwanted Application). It's probably because, as its name suggests, shutdowngui can shut the computer down. It is used to do just that, when the Shutdown option is enabled in the last tab. I have written myself that program, and it has not been modified since years. Anyway, a PUA is not a virus. It's just a program that can do potentially dangerous things. It is up to you to decide if you want to keep it or not. (You don't need it if you don't use the Shutdown option.)

I have no idea why "nothing happens" when you launch BD3D2MK3D, but it's probably because M$ blocks it due to the false positive virus detection. You should try to update your virus definitions or add the BD3D2MK3D folder to its ignore or false positive list. Or better, stop using the very bad M$ Security Essentials and install a good antivirus. Avast, Avira, AVG and Panda are free and already much better that the M$ SE. You may also want to scan BD3D2MK3D.exe and/or the other programs in the toolset folder with VirusTotal, just to be sure. But the scan I did was made with the version downloaded from my homepage, and it is virus free, so you should obtain the same result (unless the exe has been infected on YOUR computer).

Conclusion: Do not panic, and try to fix your antivirus problem. Anyway, the problem is not on my side.

Triple-M
12th June 2016, 18:01
i have deinstalled Microsoft Security Essentials and installed another AntiVirus but after demux still doesn't happen, the Windows hangs...

r0lZ
12th June 2016, 19:31
What's exactly the problem ? When does it hang ? Is the small window with the demux progress already opened ? What is the BD you are processing ? Can you post the BD3D2MK3D.log file (from the project directory) here ?

Triple-M
13th June 2016, 08:22
Here is the Log:


Log file generated by BD3D2MK3D v0.90
Conversion of "M:/Pixels (2015)/Pixels (2015).MVC.mkv" to Side-by-Side.
Movie title: Pixels
Generating project "Pixels\MKV3D"...

*******************************************************************************

Main job started Mon Jun 13 09:02:59 CEST 2016.

Saving file "MKV3D.demux.meta"...
Saving file "chapters_2D_no_delay.ogm.txt"...
Saving file "chapters_2D_no_delay.qpfile"...
Saving file "chapters_3D_delay.ogm.txt"...
Saving file "chapters_3D.qpfile"...

-------------------------------------------------------------------------------

*** Demuxing the streams...
Network Optix tsMuxeR. Version 2.6.9. www.networkoptix.com
Decoding H264 stream (track 1): Profile: High@4.1 Resolution: 1920:1080p Frame rate: 23.976
H.264 muxing fps is not set. Get fps from stream. Value: 23.976
Decoding H264 stream (track 2): H.264/MVC Views: 2 Profile: High@4.1 Resolution: 1920:1080p Frame rate: 23.976
MVC muxing fps is not set. Get fps from stream. Value: 23.976
H264 bitstream changed: insert nal unit delimiters
H264 bitstream changed: insert nal unit delimiters
Decoding DTS-HD stream (track 3): Bitrate: 1536Kbps core + MLP data.Sample Rate: 48KHz Channels: 5.1 (DTS Master Audio)
Decoding PGS stream (track 4): Resolution: 1920:1080 Frame rate: 23.976
Processed 152232 video frames
Processed 152232 video frames
Flushing write buffer
Demux complete.
Demuxing time: 15 min 13 sec


-------------------------------------------------------------------------------

*** Retrieving audio delays from "Pixels (2015).MVC.mkv"...
Stream 2: 0 ms

-------------------------------------------------------------------------------

*** Extracting 3D-planes from MVC stream...
Extracting 3D-planes from MVC file with BD3D2MK3D v0.90 (c) r0lZ and MVCPlanes2OFS v2.0 (c) 2015 by Nico8583
Input MVC file: "MKV3D.track_1.mvc"
Output folder: "."
Command: "C:\Users\Desktop\BD3D2MK3D\toolset\MVCPlanes2OFS.exe" "MKV3D.track_1.mvc" "."

Unable to open file MKV3D.track_1.mvc

Extraction took 0 seconds (00:00:00)
Extracted 0 3D-planes with 0 frames @ 0 fps.

-------------------------------------------------------------------------------

*** Converting "MKV3D.track_3.Deu.sup" to 3D BD SUP. Please wait!

* Warning: Subtitle track "MKV3D.track_3.Deu.2D.sup" is associated with the 3D-plane file 3D-Plane-05.ofs, but the 3D-Plane #5 doesn't exist or is empty.
There are no other 3D-planes to use. Using constant depth of 0 (+ additional depth of 0)!
The subtitles will appear on the surface of the screen (unless yuou have specified a non-zero additional depth).
*** Converting subtitle file "MKV3D.track_3.Deu.sup" to 3D SBS using 3D-plane "" + additional depth 0...
Subtitle language: deu (German)
*** Converting subtitle "MKV3D.track_3.Deu.sup" to "temp_2D.xml"...
> "C:\\ProgramData\\Oracle\\Java\\javapath\\java.exe" -Xmx256m -jar "C:\\Users\\Desktop\\BD3D2MK3D\\toolset\\BDSup2Sub.jar" "MKV3D.track_3.Deu.sup" -o "MKV3D.track_3.Deu.3D_2D/temp_2D.xml" --palette-mode keep --minimum-time 1 --language de --force-all set --convert-fps 24p,24p
* BDSup2Sub "temp_2D.xml": ERROR: Input file not found: M:\Pixels (2015)\Pixels\MKV3D\MKV3D.track_3.Deu.sup
ERROR: Input file not found: M:\Pixels (2015)\Pixels\MKV3D\MKV3D.track_3.Deu.sup
child process exited abnormally
*** BDSup2Sub close error: child process exited abnormally
child process exited abnormally. No captions in subtitle stream?
*** Found 0 captions, including 0 forced captions.
ERROR: Can't convert "MKV3D.track_3.Deu.sup" to XML/PNG format!
Deleting temp directory "MKV3D.track_3.Deu.3D_2D".
* Can't convert "MKV3D.track_3.Deu.sup" to 3D BD SUP!

-------------------------------------------------------------------------------

*** Converting "MKV3D.track_3.Deu.sup" to 2D VobSub. Please wait!
No captions found in "MKV3D.track_3.Deu.sup" or conversion error. Stream skipped.

-------------------------------------------------------------------------------

*** Generating the avisynth script...

*** Saving "__ENCODE_3D_MOVIE.avs"...
Saving file "__ENCODE_3D_MOVIE.avs"...
*** Generating the batch files...

*** Saving "__ENCODE_3D.cmd"
x264 command:
"C:\Users\Desktop\BD3D2MK3D\toolset\avs2yuv.exe" ^
"__ENCODE_3D_MOVIE.avs" -frames 152232 -o - ^
| "C:\Users\Desktop\BD3D2MK3D\toolset\x264_8bit_x64.exe" ^
--crf 15 --preset slower ^
--bluray-compat --profile high --level 4.1 --open-gop --keyint 24 --slices 4 ^
--colormatrix bt709 --colorprim bt709 --transfer bt709 --b-pyramid strict ^
--vbv-bufsize 30000 --vbv-maxrate 40000 --aud ^
--sar 1:1 --range tv --colormatrix bt709 ^
--frame-packing 3 --qpfile chapters_3D.qpfile --frames 152232 --fps 24000/1001 ^
--output "MKV3D_3D.264" --demuxer y4m --stdin y4m -
*** Generating the batch files...

*** Saving "_ENCODE_2D.cmd"
x264 command:
"C:\Users\Desktop\BD3D2MK3D\toolset\x264_8bit_x64.exe" ^
--crf 15 --preset slower ^
--bluray-compat --profile high --level 4.1 --open-gop --keyint 24 --slices 4 ^
--colormatrix bt709 --colorprim bt709 --transfer bt709 --b-pyramid strict ^
--vbv-bufsize 30000 --vbv-maxrate 40000 --aud ^
--qpfile chapters_2D_no_delay.qpfile --fps 24000/1001 --sar 1:1 ^
--output "MKV3D_2D.264" "MKV3D.track_1.264"

*** Saving "__TAGS_3D.xml"

> x264_8bit_x64.exe --version
x264 0.148.2692 64f4e24
(libswscale 4.1.100)
(libavformat 57.34.100)
(ffmpegsource 2.22.0.1)
built by Komisar on Apr 13 2016, gcc: 4.9.2 (multilib.generic.Komisar)
x264 configuration: --bit-depth=8 --chroma-format=all
libx264 configuration: --bit-depth=8 --chroma-format=all
x264 license: GPL version 2 or later
libswscale/libavformat/ffmpegsource license: GPL version 2 or later


*** Saving "__MUX_3D.cmd"

*** Saving "__MUX_3D_OPTIONS.txt"
*** Adding attachments...

*** Saving "_TAGS_2D.xml"

> x264_8bit_x64.exe --version
x264 0.148.2692 64f4e24
(libswscale 4.1.100)
(libavformat 57.34.100)
(ffmpegsource 2.22.0.1)
built by Komisar on Apr 13 2016, gcc: 4.9.2 (multilib.generic.Komisar)
x264 configuration: --bit-depth=8 --chroma-format=all
libx264 configuration: --bit-depth=8 --chroma-format=all
x264 license: GPL version 2 or later
libswscale/libavformat/ffmpegsource license: GPL version 2 or later


*** Saving "_MUX_2D_REENCODED.cmd"

*** Saving "_MUX_2D_REENCODED_OPTIONS.txt"

*** Saving "_MUX_2D_LOSSLESS.cmd" and "_MUX_2D_LOSSLESS_OPTIONS.txt"

*** Saving "__POSTPROCESS_3D.cmd" and "_POSTPROCESS_2D.cmd"
*** Done. Avisynth script and batch files generated.

-------------------------------------------------------------------------------


Job finished Mon Jun 13 09:18:27 CEST 2016
Whole job took 15 minutes and 28 seconds.

Done with warnings!

* Warning: Subtitle track "MKV3D.track_3.Deu.2D.sup" is associated with the 3D-plane file 3D-Plane-05.ofs, but the 3D-Plane #5 doesn't exist or is empty.
There are no other 3D-planes to use. Using constant depth of 0 (+ additional depth of 0)!
The subtitles will appear on the surface of the screen (unless yuou have specified a non-zero additional depth).
* Can't convert "MKV3D.track_3.Deu.sup" to 3D BD SUP!

Launch "__ENCODE_3D_LAUNCHER.cmd" to encode the 3D video (and optionally mux to MKV).

*******************************************************************************


When demux is finished, i click on "ENCODE 3D LAUNCHER" and a little window open. Then only the Cursor is blinking and nothing else happen.

r0lZ
13th June 2016, 08:46
Hum, it seems that the demuxed streams do not have the usual stream numbers, and BD3D2MK3D tries to process the wrong files. I don't understand why, so I need more info. Can you show me the content of the project folder Pixels\MKV3D ? Also, please post here the content of the MKV3D.demux.meta file. And finally, I need the content of the stream list of the first tab of BD3D2MK3D, when the 3D MKV created by MakeMKV is loaded. (Just right-click on the large pane and select "Copy to clipboard" and paste the text here.) In the meantime, I will try to reproduce the problem here, but since I don't understand it, that may be difficult.

The MakeMKV input mode is very new and in this case, it seems that it has a bug. If you want, you can try to process the BD with another decrypter, and create an ISO, then mount it and process it with BD3D2MK3D, or use AnyDVD HD to decrypt the original BD on the fly. Opening an unprotected BD "normally" should work without problem.

Sxc
19th June 2016, 07:12
Welcome to the Doom9 forums, Sxc!

The SAR has been changed in v0.86. It is now 1:1 for all frame packing modes (Full and Half SBS and T&B). It seems that it's the best SAR to use with the vast majority of players. It's the conclusion of a long discussion and many tests (starting with this post (http://forum.doom9.org/showthread.php?p=1758904#post1758904)).

Do you have a problem with the new setting? AFAIK, as soon as you switch to 3D mode (or the TV switches automatically to 3D mode), the SAR should be ignored and the aspect ratio should be correct. At least, it's what happens with my Samsung TV.

If your TV does not display the movie correctly, try to change Settings -> Full-SBS/T&B aspect ratio. And if that doesn't work, you can edit the __ENCODE_3D.cmd script and change the --sar option manually.

I will consider that suggestion. But take in mind that the 10 or 12 color bit modes are not compatible with many hardware players and/or graphic cards. But I agree that reducing the banding artefacts is a good thing if it works for you. Banding remains certainly the most noticeable problem of the videos encoded in h264 or h265.

Sorry to dredge this old subject up, but the change in SAR does break it for playing back 3D full TAB movies on LG 4K OLED TV (just got around to doing an encode with it).

I end up with a pillarboxed video as compared to the perfection I had before.

Can I trouble you to make it user selectable just whenever you next do a release, I appreciate you making the changes you have which is making my life easier already :)

r0lZ
19th June 2016, 07:24
Are you sure it's the SAR that is the culprit? AFAIK, only your TV seems sensible to the new SAR values.

But it's OK. I will add an option to control it.

Sxc
19th June 2016, 11:24
Yep it definitely doesn't like the SAR, did a quick encode of a trailer from the same ISO and same effect, did it again with SAR 2:1 and its full screen all good again.

r0lZ
19th June 2016, 11:32
Just to be sure, the SAR 2:1 you have used, it's for Full-T&B. Right?

Sxc
19th June 2016, 11:45
Yes, that's correct, I'm doing all mine as Full T&B.

r0lZ
19th June 2016, 13:56
OK, I've already added the option. But be patient. I will release the new version later, when some other things will have changed...

r0lZ
21st June 2016, 13:08
Today i installed your newest Version but now i can't encode the 3D movie. When i open the Launcher, a window open but nothing happen. Also the Microsoft Security Essentials detect a Virus/Trojaner in BD3D2MK3D. I was shocked!
After many PMs with Triple-M, we have been able to understand what was the problem. It was due to a big bug in tsMuxeR, when the input file is a 3D-MVC MKV file (created by MakeMKV) has at least one dot in the file name (not including the dot of the .mkv extension of course).

When tsMuxeR demuxes a file, it creates the elementary streams with the same file name than the original file followed by the track number, and, of course, the extension of the file type. To do that, it must of course remove the .mkv extension of the original file name. And here is the bug. Instead of removing the part of the file name beginning with the LAST dot, it removes everything after the FIRST dot! For example, if the original MKV is "Creature.From.The.Black.Lagoon.1954.3D.mkv", it should create elementary streams like "Creature.From.The.Black.Lagoon.1954.3D.track_1.avc", but due to that bug it creates instead "Creature.track_1.avc" !
BD3D2MK3D expected the right file name, and since it was not found, the whole procedure failed.

I have never noticed that bug because I don't use often MVC-MKV files as input, and the bug did not happen when a BD was used for the input. Also, the tests I did in MKV input mode were made with filenames without dots. Thanks to the bug report and the discussion I've had with Triple-M, I have been able to implement a workaround for that nasty bug.

It is also confirmed that the virus reported by the M$ Security Essentials was a false positive.

There is also a new option, requested by Triple-M by PM, to save the final SBS or T&B MKV in the source folder of the original MVC-MKV. (Of course, that option is available only in MVC MKV input mode.)

This version adds also the SAR option requested by Sxc here (http://forum.doom9.org/showthread.php?p=1771021#post1771021).


v0.91 (June 21, 2016)
- Added the option Full-SBS/T&B aspect ratio -> Use SAR 1:1 for all modes to go back to the SAR 2:1 or 1:2 for Full-SBS and T&B.
- Added an option in the last tab to save the final MKV in the source folder (available only in 3D MKV input mode)
- Workaround for a tsMuxeR bug when opening a 3D-MVC MKV file with dots in the file name.
- Fix: Help -> x264 Version and Help -> x265 Version were broken in v0.90.
- Updated the x265 binaries to the latest version (v1.9+200)

Download: BD3D2MK3D.7z (http://download.videohelp.com/r0lZ/BD3D2AVS/BD3D2MK3D.7z)

Privateer5000
21st June 2016, 21:42
Hi r0lZ, i have a Problem with the latest version. After Opening a 3D Bluray, i selected the necessary stream, did all my settings and hit run, it started to demux the streams, but when it finished demuxing the stream i got an error Message. This is what the Log File says:
can't read "videooutputbasename": no such variable
can't read "videooutputbasename": no such variable
while executing
"set infn $videooutputbasename$ext2$ext1"
(procedure "GenerateAvs" line 1146)
invoked from within
"GenerateAvs"
invoked from within
".nbf5.gf.gen invoke "
invoked from within
".nbf5.gf.gen instate {pressed !disabled} { .nbf5.gf.gen state !pressed; .nbf5.gf.gen invoke } "
(command bound to event)

Sadly i already deleted Version 0.90, so i am not able to downgrade. Perhaps you could make the last version, or last 2, of BD3D2MK3D available for download after releasing a new version, so People like me can do a downgrade. Hope you can fix it soon.

r0lZ
21st June 2016, 23:24
Damn! Right. Thanks for the report.
It's a bug I've just introduced with the workaround for the tsMuxeR bug in v0.91.
Here is the fix. Please let me know if it works for you. I haven't much time to test right now.

v0.92 (June 22, 2016)
- Fix: Bug introduced in v0.91: videooutputbasename not properly initialised

Download: BD3D2MK3D.7z (http://download.videohelp.com/r0lZ/BD3D2AVS/BD3D2MK3D.7z)

Privateer5000
22nd June 2016, 19:51
Thanks for the fast fix. Now it works like it should. Thank you very much

rod93
6th July 2016, 18:43
hi
i try to encode a bd3d in frame sequential but when i want to see it on 3d projector with powerdvd 15, the film isn't in 3d why?

(i was thinking fs was in 2040*1080 but the output file is in 1080p why?)

thank you to save me

r0lZ
6th July 2016, 19:02
Welcome to the Doom9 forums, rod93.

First, if you use BD3D2MK3D, please use the BD3D2MK3D official thread (http://forum.doom9.org/showthread.php?t=170828). This one is obsolete and dead since July 2014.

Frame sequential 3D is just like a normal video, without changes in resolution, but there are two times the number of frames (so 47.952 fps instead of 32.976). Therefore, the 1080p resolution is absolutely normal.

FS is usually not well supported by most players. I suggest to try to use Half-SBS or Half-T&B first. If that works, try Full-SBS or Full-T&B. That should work on PC with a good player (but most relatively old hardware players will probably refuse to play the full resolution.) Also, be sure to use the last version of BD3D2MK3D.

[EDIT] The previous post, by rod93, has been posted in the old "Guide to convert BD 3D to 3D Left+Right Stereoscopic and Anaglyph", and moved here by tebasuna51 after a few replies. Hence my request in the beginning of this post.

rod93
7th July 2016, 00:09
Ok so full t&b mâke à 3840*2160 mkv ?

Envoyé de mon 6039Y en utilisant Tapatalk

rod93
7th July 2016, 00:13
Powerdvd dont support fs ?

Envoyé de mon 6039Y en utilisant Tapatalk

r0lZ
7th July 2016, 09:36
Ok so full t&b mâke à 3840*2160 mkv ?
No. 1920 x 2193. In Full-SBS, the two full size 1080p images are stacked vertically: 1920 x (1080*2) = 1920 x 2193. In full-SBS, it's the opposite: 3840 x 1080.

Powerdvd dont support fs ?
I don't know. I don't use PowerDVD. But anyway, your projector must support the resolution or frame rate.

Also, have you tried to change the PowerDVD 3D-mode setting manually? Many players do not automatically switch to the right 3D-mode, because they ignore the stereoscopy and frame-packing info stored in the MKV. When it's the case, you have to go to the 3D settings menu of the player, and select yourself the right SBS, T&B or FS mode.

youli
7th July 2016, 09:44
Hello, r0lZ. Hello, everyone.
I made the first HEVC 10-bit full over-under BD-Rip for test of my new UHD TV LG 55UF85.
It looks great!

Really, x265 default settings trying to convert noise pixels to flat areas for bitrate reduction - it looks like artefacts. After tests for preserving high-frequency detail by x265 encoder, and also saving of the native noise during the compression I added few command line options (bold):
--me umh --subme 7 --aq-mode 3 --aq-strength 0.7 --no-sao --no-deblock --rd 3 --psy-rd 0.8 --b-adapt 1 --ctu 64 --rc-lookahead 24 --bframes 4 --merange 25 --ipratio 1.1 --pbratio 1.0 --qcomp 0.8 --rdoq-level 1 --psy-rdoq 0.7

Media info:
wpp / ctu=64 / min-cu-size=16 / max-tu-size=32 / tu-intra-depth=1 / tu-inter-depth=1 / me=2 / subme=7 / merange=25 / no-rect / no-amp / max-merge=2 / temporal-mvp / early-skip / recursion-skip / rdpenalty=0 / no-tskip / no-tskip-fast / strong-intra-smoothing / no-lossless / no-cu-lossless / no-constrained-intra / fast-intra / open-gop / no-temporal-layers / interlace=0 / keyint=250 / min-keyint=23 / scenecut=0 / rc-lookahead=24 / lookahead-slices=8 / bframes=4 / bframe-bias=0 / b-adapt=1 / ref=1 / limit-refs=0 / no-limit-modes / no-weightp / no-weightb / aq-mode=3 / qg-size=32 / aq-strength=0.70 / cbqpoffs=0 / crqpoffs=0 / rd=3 / psy-rd=0.80 / rdoq-level=1 / psy-rdoq=0.70 / no-rd-refine / no-signhide / no-deblock / no-sao / no-sao-non-deblock / b-pyramid / cutree / no-intra-refresh / rc=crf / crf=23.0 / qcomp=0.80 / qpmin=0 / qpmax=51 / qpstep=4 / ipratio=1.10 / pbratio=1.00

http://s018.radikal.ru/i527/1607/0d/ecd9301559d0t.jpg (http://s018.radikal.ru/i527/1607/0d/ecd9301559d0.png) http://s002.radikal.ru/i198/1607/06/c1bc4ae6f5f0t.jpg (http://s002.radikal.ru/i198/1607/06/c1bc4ae6f5f0.png)

x265 [info]: frame I: 669, Avg QP:20.95 kb/s: 23348.66
x265 [info]: frame P: 98386, Avg QP:22.91 kb/s: 11636.39
x265 [info]: frame B: 66156, Avg QP:24.43 kb/s: 3368.81
x265 [info]: consecutive B-frames: 36.1% 61.9% 1.4% 0.5% 0.2%

encoded 165211 frames in 37868.77s (4.36 fps), 8373.20 kb/s, Avg QP:23.51

r0lZ, thanks again for your program!:)

r0lZ
7th July 2016, 09:50
Thanks for the info, and for the thanks, youli !

rod93
7th July 2016, 12:41
Thank you i will test in fp
Its working on t&b in full HD res


Envoyé de mon 6039Y en utilisant Tapatalk

rod93
7th July 2016, 23:57
ok it's working very well with t&b in x264

i trying in x265 can you help me to configure it for that profil for have quality with a reasonable size?

tebasuna51
8th July 2016, 09:42
i trying in x265 can you help me to configure it for that profil for have quality with a reasonable size?

The quality/size is controlled by the crf parameter. There are other parameters than can be changed, can improve some movie sources but not for all sources.

The x265 encoder is still under development and, by the moment, is better let default parameters and use only the CRF, to control the quality/size, and PRESET (..., Medium, Slow, ...) to control the encoding time.

BTW you can read this post (http://forum.doom9.org/showthread.php?p=1773155#post1773155).

r0lZ
8th July 2016, 09:54
Well, I don't encode in x265 myself, because my TV doesn't understand that format yet. I have simply encoded the default settings in BD3D2MK3D. (For example, the default CRF value is 28 instead of 23 for x264.) Many peoples consider the default CRF values too high, and they prefer to encode with a lower CRF, between 17 and 20 for x264. Personally, I use often the CRF 20, but with a slower preset (slow or slower instead of medium, again for x264), but take in mind that x265 is by nature much slower than x264, and selecting a slow preset can result in extremely long encoding times.

Personally, I don't like to change individual settings precisely, because usually that give worse results than a good preset, that has been fine-tuned by specialists to give excellent results. But again, some peoples want to try different settings, perhaps (and IMO too often) because they have read somewhere on the net that incredible compression with low quality loss can be archived with specific settings. It's usually not true, and often, that settings were conceived when there was no "Preset" setting in x264. It was therefore necessary to give all settings explicitly anyway. But now, things are much more simple, and I see no good reason to overwrite the selected preset with specific settings. If you are not happy with an encoding, try to lower the CRF or use another preset first, and specify manually additional settings only if you know what you are doing.

Also, don't forget that x265 is still under constant development, and it may have some bugs or weakness that will be fixed over time. Therefore, it might be difficult to say today what are the best parameters for that encoder. And, of course, there is no "best" method. The quality of the encoding depends greatly of the source video, and even with the same source, some peoples may prefer an encoding that others don't like. So, there is no precise answer to your question.

Here (http://forum.doom9.org/showthread.php?p=1773155#post1773155) in the BD3D2MKL3D thread, youli has posted recently a message explaining that he is not happy with the x265 default settings, and he suggests to add manually a lot of additional settings. Maybe he is right. You can try his settings if you wish. But don't ask me if that will certainly give better results than the default parameters. Honestly, I don't know.

You may also use the SSIM or PSNR tunes to have a relatively precise and objective measure of the quality of the encodings. You should encode the same short clip several times with different settings, and compare the final SSIM or PSNR values to determine the "best" method. However, remember that it's not because one settings gives excellent results with your test clip that it's the best setting for any video source. See the articles on Wikipedia for more info (SSIM (https://en.wikipedia.org/wiki/Structural_similarity), PSNR (https://en.wikipedia.org/wiki/PSNR)).

[EDIT] tebasuna51 has posted his reply when I was writing mine. And he has explained essentially the same thing than me.

@tebasuna51: Perhaps you can move these new posts in the BD3D2MK3D thread?

tebasuna51
8th July 2016, 21:30
@tebasuna51: Perhaps you can move these new posts in the BD3D2MK3D thread?

Done.

youli
10th July 2016, 04:14
ok it's working very well with t&b in x264

i trying in x265 can you help me to configure it for that profil for have quality with a reasonable size?

For example:

--crf 23 --preset ultrafast --me umh --subme 7 --aq-mode 3 --aq-strength 0.7 --no-sao --no-deblock --rd 3 --psy-rd 0.9 --b-adapt 1 --ctu 64 --rc-lookahead 24 --bframes 4 --merange 25 --ipratio 1.2 --pbratio 1.1 --qcomp 0.8 --rdoq-level 1 --psy-rdoq 1.5 --sar 2:1

P.S.
1. It will no fast, just settings based on ultrafast preset only!
2. You can get the file size between 5 - 20GB, it depends of movie. For example, with one sound stream R.I.P.D. - 5,12 GB or Ant-man - 17,2 GB.
3. Option "--sar 2:1" for LG TV.

youli
10th July 2016, 06:04
You may also use the SSIM or PSNR tunes to have a relatively precise and objective measure of the quality of the encodings. You should encode the same short clip several times with different settings, and compare the final SSIM or PSNR values to determine the "best" method...
Yes, you are right. But...

If the "psy" and "aq" optimizations are enabled, then they will reduce the level of SSIM, and also misrepresent the level of PSNR. Rather, these values will be assessed incorrectly.
I mean this options : "--rd, --psy-rd, --rdoq-level, --psy-rdoq" and "--aq-mode, aq-strength".

Correct results of PSNR and SSIM can only be obtained if psycho-visual optimizations and adaptive quantization are disabled.

Of course I assessed structure similarity during the tests. If crf = 23, the SSIM Mean about 98.9%.

For x264 "Avg QP" for B frames recommended less than 23.
It can be assumed, that for x265 "Avg QP" for B frames recommended less than 28.

x265 [info]: frame I: 560, Avg QP:20.08 kb/s: 29462.21
x265 [info]: frame P: 81439, Avg QP:23.06 kb/s: 10158.44
x265 [info]: frame B: 55969, Avg QP:25.15 kb/s: 2148.81

So above, I have a slight excess of the bitrate at --crf 23.

r0lZ
10th July 2016, 07:32
Afaik, when you specify the SSIM or PSNR options, the incompatible optimisations are automatically disabled. Of course, if you specify them manually (via the Additional Options field of BD3D2MK3D), they will conflict, and I don't know exactly what will happen, but I suppose you're right and the values will be assessed incorrectly.

youli
10th July 2016, 08:07
I made a lot of rips. In my experience, in most cases the average QP for B frames is one of the main indicators of quality.

At crf mode for x264 default value 23 minus 5 = 18 - very good quality (average QP for B will less then 23).
So at crf mode for x265 default value 28 minus 5 = 23 (average QP for B will less then 28).
It is just analogy ;)
Of course the options - me, subme, merange, rc-lookahead, qcomp... are very important too.

tebasuna51
10th July 2016, 10:27
All opinions about x265 encoder (HEVC) configuration are welcome, but there are a specific thread High Efficiency Video Coding (HEVC) (http://forum.doom9.org/forumdisplay.php?f=81) when you can read about that with experienced users.

Further discussion about that is a little off topic here. Even when r0lZ (and myself) don't use x265 to encode.
BD3D2MK3D can encode and configure x265 in a similar way than x264, please use this thread for specific 3D troubles and the related thread for general configuration.

Sxc
13th July 2016, 16:02
So I was having a lot of trouble with intermittent corruption (only on the right eye!) when encoding my Kung Fu Panda 3 BD. Disc plays fine and re-ripped it twice. As usual I was using x265, so tried x264 and exact same issue. I disabled hardware acceleration and voila the problem went away. I noticed it quite quickly at the 20th Century Fox searchlight at the beginning. I was doing the encoding on a i7-6700K CPU with latest drivers.

Just a heads up if anyone else has had weird intermittent corruption appear on their encodes (but no crashes when encoding) to try disabling under Settings / MVC Decoder / Hardware Acceleration.

r0lZ
13th July 2016, 16:10
Thanks for the information. It's not the first time that the drivers for the Intel hardware cause troubles, and indeed, disabling the hardware acceleration usually solves the problem.

thahandy
13th July 2016, 19:29
DVDfab (a year or 2 ago), for example, has the same issue. It gave me pixels when i enabled hardware acceleration. Seems its still not glitch free to use HWA.

@ r0lZ
Not really a issue, but checking for the ArcSoft DTS codec making BD3D2MK3D freezes for a min,
and noticed its eac3to waiting to be completed.


t:\DEMUX\BD3D2MK3D\toolset>eac3to -test
eac3to (v3.31) is up to date
Nero Audio Decoder (Nero 6 or older) doesn't seem to be installed
http://www.nero.com/eng/store-blu-ray.html
CAUTION: You need Nero 7. Nero 8 won't work with eac3to.
ArcSoft DTS Decoder (1.1.0.0) works fine
Sonic Audio Decoder (3.31.0.0) doesn't seem to be installed

freeze of 45sec

Haali Matroska Muxer (2013-04-14) is installed
Nero AAC Encoder (1.5.4.0) is installed
Surcode DTS Encoder doesn't seem to be installed
http://www.surcode.com
t:\DEMUX\BD3D2MK3D\toolset>

No idea why its doing that on my machine.

r0lZ
14th July 2016, 09:56
Hum, bizarre. Anyway, I can't control that.

Note that the Arcsoft decoder is not necessary any more. The recent dcadec is as good, if not better, and it is free. (I realize that the Help message about the DTS decoders is outdated, and I will modify it immediately.)

Note also that if you select the ArcSoft decoder in the menu, each time BD3D2MK3D starts, it will check again if it is properly installed, and therefore in your case the program will need a long time to start. I definitively suggest to use DcaDec instead.

Polar
14th July 2016, 14:54
rOlZ (and anybody else that has contributed to this feature), a BIG thank you for enabling FS :thanks:. It all started one year ago when I posted this question (http://forum.doom9.org/showthread.php?p=1731505#post1731505).

I never got around to do extensive testing (and to thank you :thanks:), but a few days ago I converted my Avatar 3D Blue Ray to 720p FS. Works like a charm :).

For those who are interested, I use a 3D ready projector with DLP link. so the only way to playback 3D is in 720p FS.

Just one more question: is there a way to convert HSBS files to FS? Looks like the software only can work with ISO or 3D-MKV (where the last one requires the 3D file created by MakeMKV). What if I do not have the required extra file? Did some playing around by downloading some 3D SBS test files, but no go :(. Any advice?

r0lZ
14th July 2016, 16:12
Thanks for the thanks!

Converting from full or half SBS or T&B to FS is not possible with BD3D2MK3D, and I will probably never implement that feature, because it's not the main purpose of BD3D2MK3D, made, as its name implies, to convert a 3D-BD to a lossy 3D format. I don't want to implement new features to convert from an already re-encoded video to another lossy format, because the final quality will be worse, and it's too difficult to implement.

However, it should not be very difficult to write an avisynth script to do the conversion. With the additional help of some free tools (like a GUI for x264 and Mkvtoolnix) it should be easy to encode the new video stream and replace it in the original MKV. I can write an example script one of these days, but currently I have no time. Please remind me in one week or so if I forget...

robl45
16th July 2016, 18:46
Is there a guide for this anywhere? I'm looking to take MKV MVC from make mkv and compress it with X265 and keep it in mvc format.

robl45
17th July 2016, 02:56
Tried converting John Carter to x265 today, first time trying this. I used makemkv to rip the MVC MKV and then chose frame sequential and picked the alien speaking subtitle. I got this error. Could someone please advise how to stop this error from happening?

Thanks



Job finished Sat Jul 16 20:27:34 EDT 2016
Whole job took 5 minutes and 54 seconds.

Done with warnings!

* Can't convert "MKV3D.track_4.Eng.sup" to 3D BD SUP!

Launch "__ENCODE_3D_LAUNCHER.cmd" to encode the 3D video (and optionally mux to MKV).

Use a delay of 19999 ms if you mux the files yourself.

*******************************************************************************
() 1 %

EDIT: I seem to have this error as well

*** Converting "MKV3D.track_4.Eng.sup" to 3D BD SUP. Please wait!
*** Converting subtitle file "MKV3D.track_4.Eng.sup" to 3D Full using 3D-plane "3D-Plane-05.ofs" + additional depth 0...
Subtitle language: eng (English)
*** Converting subtitle "MKV3D.track_4.Eng.sup" to "temp_2D.xml"...
> "C:\\ProgramData\\Oracle\\Java\\javapath\\java.exe" -Xmx256m -jar "C:\\Users\\Rob\\Downloads\\BD3D2MK3D\\BD3D2MK3D\\toolset\\BDSup2Sub.jar" "MKV3D.track_4.Eng.sup" -o "MKV3D.track_4.Eng.3D_2D/temp_2D.xml" --palette-mode keep --minimum-time 1 --language en --convert-fps 24p,24p
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object
child process exited abnormally
*** BDSup2Sub close error: child process exited abnormally
child process exited abnormally. No captions in subtitle stream?
*** Found 0 captions, including 0 forced captions.
ERROR: Can't convert "MKV3D.track_4.Eng.sup" to XML/PNG format!
Deleting temp directory "MKV3D.track_4.Eng.3D_2D".
* Can't convert "MKV3D.track_4.Eng.sup" to 3D BD SUP!


EDIT2: Tried again and got this error

Encoding movie in 3D
Movie: John Carter
Encoding started Sun 07/17/2016 1:16:29.50

C:\Users\Rob\Downloads\John Carter\MKV3D>"C:\Users\Rob\Downloads\BD3D2MK3D\BD3D2MK3D\toolset\avs2yuv.exe" "__ENCODE_3D_MOVIE.avs" -frames 380825 -o - | "C:\Users\Rob\Downloads\BD3D2MK3D\BD3D2MK3D\toolset\x265_8bit_x86.exe" --crf 28 --preset medium --sar 1:1 --range limited --colorprim bt709 --qpfile chapters_3D.qpfile --frames 380825 --fps 48000/1001 --output "MKV3D_3D.265" --y4m -

Avisynth error:
Script error: there is no function named "SupTitle"
(__ENCODE_3D_MOVIE.avs, line 35)
x265 [error]: unable to open input file <->
Encoding finished Sun 07/17/2016 1:16:30.16

C:\Users\Rob\Downloads\John Carter\MKV3D>"C:\Users\Rob\Downloads\BD3D2MK3D\BD3D2MK3D\toolset\mkvmerge.exe" @__MUX_3D_OPTIONS.txt | "C:\Users\Rob\Downloads\BD3D2MK3D\BD3D2MK3D\toolset\tee.exe" "MKV3D_3D.mkvmerge.log"
mkvmerge v9.2.0 ('Photograph') 32bit
Error: The file 'MKV3D_3D.265' could not be opened for reading: open file error.

Press any key to continue . . .

r0lZ
17th July 2016, 11:22
Is there a guide for this anywhere? I'm looking to take MKV MVC from make mkv and compress it with X265 and keep it in mvc format.
You cannot use x264 to compress to MVC. x264 is an AVC encoder. It is unable to create the MVC track.

Also, BD3D2MK3D is not designed to produce AVC+MVC, so it's not the right tool for you.

You need the FRIM Encoder (http://forum.doom9.org/showthread.php?t=169651&highlight=FRIMencode) to do what you want.

You can also use MakeMKV is you want to keep the original AVC and MVC tracks from the 3DBD without re-encoding.

r0lZ
17th July 2016, 11:34
*** BDSup2Sub close error: child process exited abnormally
child process exited abnormally. No captions in subtitle stream?
*** Found 0 captions, including 0 forced captions.
ERROR: Can't convert "MKV3D.track_4.Eng.sup" to XML/PNG format!

Obviously, there is something wrong with the subtitle track. It is empty, or it has discrepancies. Try another subtitle track.
You can also try to extract that track with another program, like eac3to, but I doubt you will succeed.


Avisynth error:
Script error: there is no function named "SupTitle"
(__ENCODE_3D_MOVIE.avs, line 35)

I suppose you have used the option to hardcode a subtitle stream over the video in the last tab. Right?

Can you post the content of the __ENCODE_3D_MOVIE.avs file? It should load the SupTitle plugin.

Also, please verify that you have the SupTitle.dll, SupCore.dll, loadhelper.dll, msvcp100.dll and msvcr100.dll files in the BD3D2MK3D\toolset folder.

robl45
17th July 2016, 15:47
You cannot use x264 to compress to MVC. x264 is an AVC encoder. It is unable to create the MVC track.

Also, BD3D2MK3D is not designed to produce AVC+MVC, so it's not the right tool for you.

You need the FRIM Encoder (http://forum.doom9.org/showthread.php?t=169651&highlight=FRIMencode) to do what you want.

You can also use MakeMKV is you want to keep the original AVC and MVC tracks from the 3DBD without re-encoding.

I'm sorry, I don't mean to be stupid, I thought the point of this program was to take the mkv mvc file from makemkv and be able to compress it to a more manageble size. So this won't compress it to a smaller size, only convert it to a different format?

r0lZ
17th July 2016, 19:53
No. BD3D2MK3D converts from the BD3D format (AVC+MVC) to side-by-side, top & bottom or frame sequential format, encoded with the AVC codec (x264) or if you prefer HEVC (x265). Since that conversion requires to re-encode the video, it compresses it as well (more or less, depending of your encoding parameters). SBS and T&B are the most useful formats, because they are recognised by all 3D players. Frame Sequential is recognised by some players (notably DLP projectors) and is recommended only if your player doesn't support SBS or T&B.

In the other hand, recompressing to the same BD3D format (AVC + MVC) doesn't make much sense, except if you want to re-create a 3DBD with smaller files (such as for burning the movie only on a DVD formatted in BD format). To compress to the BD3D format, you need a "twin encoder", to create the AVC stream for the main view, and the MVC stream for the dependent view. And encoding to MVC is not possible with x264 or x265. To do that, you need an encoder based on the Intel toolkit (the only available free MVC encoder), such as FRIM. That encoder gives less good results than x264.

The third solution is to put the original AVC and MVC streams without re-encoding them into a MKV container with MakeMKV, to create the so called MVC MKV. Currently, only stereoscopic player can easily play that kind of MKV, so the only advantage of that format is that it's a good backup of the original BD. But it takes much disc space and is almost unplayable. You can save much disc space if you re-encode the AVC and MVC streams with FRIM, but what's the point? You'll get a too poor quality for a backup, and the MKV will still be playable only by Stereoscopic Player. Anyway, it's something BD3D2MK3D doesn't do.

Use the right tool to do what you want. Good quality SBS, T&B or FS in AVC or HEVC with BD3D2MK3D, or AVC+MVC with FRIM Encoder and a 3DBD authoring program is you want to compress the 3DBD to another 3DBD or create an almost useless MVC MKV.

r0lZ
18th July 2016, 08:45
Just one more question: is there a way to convert HSBS files to FS? Looks like the software only can work with ISO or 3D-MKV (where the last one requires the 3D file created by MakeMKV). What if I do not have the required extra file? Did some playing around by downloading some 3D SBS test files, but no go :(. Any advice?
As promised, here is a little avisynth script to help you convert Half or Full SBS or T&B to Frame Sequential:

# SBSorTAB2FS.avs v1.0 by r0lZ, July 18, 2016
# Avisynth script to convert a 3D clip from Full or Half SBS or T&B to 720p or 1080p frame sequential
# Requires the FFMpegSource2 avisynth plugin: http://avisynth.nl/index.php/FFmpegSource
# Usage: Copy this script in the directory containing the source clip, and edit the settings below to suit your needs.
# Encode the script using a good x264 or x265 frontend, and mux with MkvToolnix GUI.
# Don't forget the very important x264 option --frame-packing 5
# Select the stereography mode 13: both eyes laced in one block (left first) for the video stream in MkvToolnix GUI.

# Edit the settings below:

# Source clip file name. If the AVS script is not in the same directory, the full path must be provided.
SourceClip = "3D Movie HSBS.mkv"
# Source format is SBS?. Can be true for SBS or false for T&B
SourceSBS = true
# source is half-TAB ? Can be true for Half-T&B or false for full T&B. (This setting is ignored if the source is full-SBS or half-SBS)
SourceFull = false
# Source has left view first ? Can be true for left view first (usual), or false for right view first.
SourceLeftViewFirst = true
# Source vertical resolution. Can be 720 or 1080
SourceResolution = 1080
# Output vertical resolution. Can be 720 or 1080
OutputResolution = 720


# Load the source clip in Half or Full-SBS 1080p format
FFMpegSource2(SourceClip)

# Crop left and right images from Half or Full SBS source
view1 = SourceSBS ? Crop(0, 0, last.width / -2, 0) : Crop(0, 0, 0, last.height / -2)
view2 = SourceSBS ? Crop(last.width / 2, 0, 0, 0) : Crop(0, last.height / 2, 0, 0)

# Build Frame sequential clip
fs = SourceLeftViewFirst ? Interleave(view1, view2) : Interleave(view2, view1)

# If the horizontal black borders have been cropped, restore them
border = ( SourceSBS || SourceFull) ? (SourceResolution - fs.height) / 2 : (SourceResolution / 2 - fs.height) / 2
fs = ( border > 0 ) ? AddBorders(fs, 0, border, 0, border) : fs

# Resize FS clip to 720p or 1080p
LanczosResize(fs, OutputResolution * 16 / 9, OutputResolution)

You can download the script here (http://download.videohelp.com/r0lZ/BD3D2AVS/SBSorTAB2FS.avs).

Usage:

You need: Avisynth with the FFMpegSource2 avisynth plugin (http://avisynth.nl/index.php/FFmpegSource) properly installed, a good GUI for x264 (I suggest the Simple x264/x265 Launcher (http://forum.doom9.org/showthread.php?t=144140)), and MkvToolnix (https://mkvtoolnix.download/index.html). I suggest also to install the avisynth editor AVSp Mod ([URL="http://forum.doom9.org/showthread.php?t=153248), to edit and verify the avisynth clip.

Copy the script in the directory containing the SBS or T&B script you want to convert.

Open it in AVSp Mod (or in any text editor like Notepad) and edit the settings at the top of the file. They should be self-explanatory. You must specify the file name of the clip, and the format, such as Half SBS Left view first 1080p (the most frequent situation). There is also an option to convert to FS full-HD (1080p) or "small-HD" (720p).

Note that the SourceResolution is the height of the source clip BEFORE any cropping of the black borders, that may have been done when the clip has been encoded to SBS or T&B. Usually, the source resolution is 1080. Note also that the SourceFull argument is used only when converting from T&B format, and is ignored for SBS.

If you have AVSp Mod, click the Play arrow in the bottom left corner of the window, and then use the Right cursor key on your keyboard or use the timeline with the mouse to start the rendering and verify that everything works as expected. (You may have to wait a long time when you play the script for the first time, because FFMpeg must generate an index file once, and that requires to scan the whole input clip.)

Now, launch your GUI for x264. Open the AVS script in the GUI. Select the x264 options you want to use, like the CRF value. DO NOT FORGET the very important --frame-packing 5 option. (Without that option, x264 will "think" that the differences between the even and odd images of the frame sequential clip are constant moves, and it may blur them !) If you use the Simple x264 Launcher, you must type that option in the "Custom encoder parameters" field.

You may want to specify other x264 options as well, such as the frame rate, the total number of frames, the level, and so on, but none are really necessary. (If you want to know the options that BD3D2MK3D uses, encode a small clip to frame-sequential, and have a look at the __ENCODE_3D.cmd file.)

Finally, launch the encoding.

When the encoding is finished, open the original SBS or T&B clip in MkvToolnix GUI, and untick the video stream. Add the new video stream you have just encoded, and specify the stereoscopy mode 13 "both eyes laced in one block (left first)". For the "Default Duration/FPS", you should use the same frame rate than in the input clip (usually 24000/1001p).

Remux. The output should be OK. Verify if there are no sync problems with the audio tracks, and if necessary, specify the correct delays in the MkvToolnix GUI and mux again.

Have fun. :-)

robl45
18th July 2016, 12:41
Obviously, there is something wrong with the subtitle track. It is empty, or it has discrepancies. Try another subtitle track.
You can also try to extract that track with another program, like eac3to, but I doubt you will succeed.


I suppose you have used the option to hardcode a subtitle stream over the video in the last tab. Right?

Can you post the content of the __ENCODE_3D_MOVIE.avs file? It should load the SupTitle plugin.

Also, please verify that you have the SupTitle.dll, SupCore.dll, loadhelper.dll, msvcp100.dll and msvcr100.dll files in the BD3D2MK3D\toolset folder.

Files above are there, file info below. I don't believe this is going to do what I need it to, but there appears to be a bug here so I'm happy to help. The subtitle is definately good, its the forced subtitles and plays fine in MPC-HC. I also tried to extract it like you suggested and it worked as well.

# Avisynth script generated Mon Jul 18 07:24:00 EDT 2016 by BD3D2MK3D v0.92
# to convert "C:/Users/Rob/Downloads/ironman/John_Carter_t01.mkv"
# to 3D Frame Sequential.
# Hardcoded subtitles file "MKV3D.track_4.Eng.3D_left.sup" not generated,
# probably because there is no forced subs in the original file.
# No subtitles will be hardcoded.
# Movie title: john carter
#
# Source information: Interleaved 3D MKV generated by MakeMKV v1.10.0 win(x64-release).
# MKV file: John_Carter_t01.mkv
# Video : Eng AVC, 1080p, 23.976 fps, left-eye
# Audio : Eng DTS-HD-MA, Bitrate: 1536Kbps core + MLP data.Sample Rate: 48KHz Channels: 7.1 (DTS Master Audio 24bit)
# Subtitle: Eng PGS, 3D-plane: 5
# Subtitle: Eng PGS, 3D-plane: 0
# Video : Eng MVC, 1080p, 23.976 fps, right-eye (32 3D-Planes)

LoadPlugin("C:\Users\Rob\Downloads\BD3D2MK3D\BD3D2MK3D\toolset\LoadHelper.dll")
LoadPlugin("DGMVCDecode.dll")
#LoadPlugin("FRIMSource.dll")
#LoadPlugin("C:\Program Files (x86)\BDtoAVCHD\MVCSource.dll")

##LoadPlugin("VSFilter.dll")
#LoadPlugin("SupTitle.dll")

# Load the two video streams (189933 frames per stream)
interleaved = DGMVCSource("MKV3D.track_1.264", "MKV3D.track_1.mvc", view = 0, frames = 189933, hw = 0)
#interleaved = FRIMSource("mvc", "MKV3D.track_1.264", "MKV3D.track_1.mvc", num_frames = 189933, cache = 2, platform = "")
#interleaved = MVCsource("MKV3D.track_1.264", "MKV3D.track_1.mvc", 189933, 2)
# Current base view: left eye.
# The views are in the common order: AVC stream = left view, MVC stream = right view.
left = SelectEven(interleaved)
right = SelectOdd(interleaved)

# Hardcode subtitles
#left = VobSub(left, "MKV3D.track_4.Eng.3D_left.sub")
#right = VobSub(right, "MKV3D.track_4.Eng.3D_right.sub")
left = SupTitle(left, "MKV3D.track_4.Eng.3D_left.sup")
right = SupTitle(right, "MKV3D.track_4.Eng.3D_right.sup")

# Build Frame Sequential stream
Interleave(left, right)
AssumeFPS(48000/1001.0)

# Return the 3D clip.
Return(last)#.Info()

r0lZ
18th July 2016, 13:26
OK, for the second error (there is no function named "SupTitle"), it's because the line #LoadPlugin("SupTitle.dll") is commented out. Remove the "#" at the beginning and that should work.
Have you edited the script manually yourself, or is it exactly what BD3D2MK3D has generated? In the second case, there is a bug in my code.

For the problem of the "empty" subtitle stream, it seems that it's a Java error. Try to re-install the Java Runtime (32 and/or 64 bit, depending of the version installed on your system) and/or update it to the latest version. To check if Java works as expected, you can launch a conversion to 3D from the Subtitle Tools menu. It's faster than having to re-create a project from scratch. If you can't get BDSup2Sub to work, try to select the ++ version (with the Settings -> BDSup2Sub menu), and again try to launch a conversion manually to verify.

robl45
18th July 2016, 14:04
I have not touched any of the files, just run the program. I did as you suggested below with the subtitles tool menu, when using the ++ version it worked. I don't really understand it. I just built this computer and I installed Java and verified it. not sure what exactly is going on with that.

OK, for the second error (there is no function named "SupTitle"), it's because the line #LoadPlugin("SupTitle.dll") is commented out. Remove the "#" at the beginning and that should work.
Have you edited the script manually yourself, or is it exactly what BD3D2MK3D has generated? In the second case, there is a bug in my code.

For the problem of the "empty" subtitle stream, it seems that it's a Java error. Try to re-install the Java Runtime (32 and/or 64 bit, depending of the version installed on your system) and/or update it to the latest version. To check if Java works as expected, you can launch a conversion to 3D from the Subtitle Tools menu. It's faster than having to re-create a project from scratch. If you can't get BDSup2Sub to work, try to select the ++ version (with the Settings -> BDSup2Sub menu), and again try to launch a conversion manually to verify.

r0lZ
18th July 2016, 14:21
OK, thanks. Unfortunately, BDSup2Sup++ has some bugs that the java version doesn't have, so it is better if you can fix the problem and use the java version.
BTW, BD3D2MK3D tries to determine itself the "best" java exe to run, but it's not easy due to the incredibly bizarre way it is installed. If you wish, you can edit the BD3D2MK3D.cfg file (in the BD3D2MK3D folder) and change the path in the following line:

set ::config(javapath) {C:\ProgramData\Oracle\Java\javapath\java.exe}

Note that you should replace the backslashes in the path with normal slashes or double backslashes.
Personally, I use often the real exe, located in "C:\Program Files\Java\jre1.8.0_92\bin", because the exe in ProgramData are just shortcuts, not well supported by some programs). But due to the version string in the installation path (why?!?), you will have to modify the config file after each new release of java. You may also try to use "java.exe" without the path. That may work, or not, depending of the Java installer.

I think that the commented out LoadPlugin is a bug that happens only when the subtitles cannot be converted to 3D. In that case, hardcoding them over the video is not possible, and therefore the SupTitle plugin is not necessary. The problem is that the SupTitle command is used because it has not be commented out, and the script cannot start. I will fix that bug for the next version. In the meantime, you can re-generate the project with BDSup2Sup++, or simply convert the subtitles manually, comment out the LoadPlugin line, and launch the encoding normally.

robl45
18th July 2016, 14:26
I did play around with the java just now and it seems that BDsup2Sup java version is now working as it did convert the subs manually.

OK, thanks. Unfortunately, BDSup2Sup++ has some bugs that the java version doesn't have, so it is better if you can fix the problem and use the java version.
BTW, BD3D2MK3D tries to determine itself the "best" java exe to run, but it's not easy due to the incredibly bizarre way it is installed. If you wish, you can edit the BD3D2MK3D.cfg file (in the BD3D2MK3D folder) and change the path in the following line:

set ::config(javapath) {C:\ProgramData\Oracle\Java\javapath\java.exe}

Note that you should replace the backslashes in the path with normal slashes or double backslashes.
Personally, I use often the real exe, located in "C:\Program Files\Java\jre1.8.0_92\bin", because the exe in ProgramData are just shortcuts, not well supported by some programs). But due to the version string in the installation path (why?!?), you will have to modify the config file after each new release of java. You may also try to use "java.exe" without the path. That may work, or not, depending of the Java installer.

I think that the commented out LoadPlugin is a bug that happens only when the subtitles cannot be converted to 3D. In that case, hardcoding them over the video is not possible, and therefore the SupTitle plugin is not necessary. The problem is that the SupTitle command is used because it has not be commented out, and the script cannot start. I will fix that bug for the next version. In the meantime, you can re-generate the project with BDSup2Sup++, or simply convert the subtitles manually, comment out the LoadPlugin line, and launch the encoding normally.

r0lZ
18th July 2016, 16:25
OK, so if you have a chance to generate again a project with similar settings (including a hardcoded subtitle stream), please let me know if everything is working as expected. Thanks in advance.

r0lZ
19th July 2016, 10:54
This version fixes the "Script error: there is no function named SupTitle" bug occurring rarely and discussed here (http://forum.doom9.org/showthread.php?p=1774347#post1774347). I have also added in the error message that the error can be caused by Java.
There are also some improvements, notably in the functions available to format correctly the actor and character names in the Title & Tags tab.
Finally, the x264, x265 and MkvToolnix tools have been updated to their latest versions.

v0.93 (July 19, 2016)
- Improved the functions available with the context menu in the Actors (and characters) field of tab 3.
- Modified the Help message about the DTS decoder, because ArcSoft is not the best choice any more.
- Fix: The encoding should not crash any more when the subtitles to hardcode on the video cannot be generated.
- Updated the MkvToolnix exes to the latest version (v9.3.1 "Mask Machine")
- Updated the x264 exes to the latest version (v0.148.2705)
- Updated the x265 exes to the latest version (v2.0+2)

Download: BD3D2MK3D.7z (http://download.videohelp.com/r0lZ/BD3D2AVS/BD3D2MK3D.7z)

frank
4th August 2016, 11:51
After Upgrading my Dell from W7Pro to W10Pro 1511 (not
anniversary) BD3D2MK3D cannot read covers from BD.
ISO mounted with W10. Latest Java 8 Update 101.

If I select cover From BD then I get an error in the bottom line:
convert.exe: Not recognizing known sRGB profile that has been edited
`C:/Users/tester/AppData/Local/Temp/thumb_cover_land_9208.png'
@ warning/png.c /MagickPNGWarningHandler/1832.
But there are .jpg pictures in BDMV/META/DL with other names.
Same issue with the button and selecting the jpg on BD.
Tested v0.93 and v0.85.

What happend?

EDIT: BD was Batman v Superman. US. Something is strange with the pictures. Other BD works. I couldn't find a difference to other BD. :(

r0lZ
4th August 2016, 12:25
I have already encountered this error. It's a limitation in the ImageMagick library (convert.exe). It seems that some kind of RGB data (sRGB) cannot be recognised. Unfortunately, I can't fix it, because it's not a problem in my code.

I will try to do something, but I need more info. Please check your PMs.

In the meantime, you can open the image in any image editor, and save it in another format (such as PNG). Then, use that image in BD3D2MK3D. That should work.

frank
4th August 2016, 12:33
I found a workaround.
png didn't work.

Conversion with Windows Paint ->24 bit bmp
and back to jpg works. :)

I cannot test in W7 anymore. I think the issue is not in W10.

r0lZ
4th August 2016, 12:39
Great! Note that you don't need to convert to JPG again. If the input image is in PNG format, it is resized if necessary to PNG too, or it is kept unchanged. In all other formats, it is converted to JPG anyway. (It's necessary because the MKV standard supports the thumbnail images in JPEG and PNG formats only.) So, you can convert to BMP, and let BD3D2MK3D convert the BMP to JPG.

Anyway, I would like your original JPG image. Perhaps I'll find a workaround, but I need an example. (I can't remember what image or BD has caused that problem here.)

robl45
27th August 2016, 19:06
is this supposed to convert to SBS using hardware encoding?

r0lZ
27th August 2016, 19:19
No. The encoding is done with x264 or x265, and they are software-only encoders. BTW, GPU based encoders are well known for their relative low quality. x264 is certainly the best free AVC encoder currently available. IMO, it is much better to spend a relatively long time in the encoding process and have a good compression without losing much quality than using a fast but bad encoder.

robl45
27th August 2016, 20:18
No. The encoding is done with x264 or x265, and they are software-only encoders. BTW, GPU based encoders are well known for their relative low quality. x264 is certainly the best free AVC encoder currently available. IMO, it is much better to spend a relatively long time in the encoding process and have a good compression without losing much quality than using a fast but bad encoder.

no problem, I thought I had read it did, my mistake, it crashed part way through doing the encoding, not sure what happened.

r0lZ
28th August 2016, 17:17
The Intel MVC decoder can use hardware acceleration if you have the right CPU (supporting QuickSync) and the latest Intel drivers, but the gain is not very important.

For the crash, be sure to launch __ENCODE_3D_LAUNCHER.cmd and not directly __ENCODE_3D.cmd, as otherwise the PC can go to sleep or hibernate mode during the encoding, and x264 doesn't like that at all! Also, if the problem persists, try to turn off the hardware acceleration of the decoding with Settings -> MVC Decoder -> Hardware Acceleration -> Disabled.

konikpolny
3rd September 2016, 00:00
Hi r0lZ,
After a long break I can finally get back to BD3D2MK3D to make my MK3Ds, and I just thought that it would be very useful to be able to make a quick and short sample by selecting specific chapter(s) to do. What I mean is to have something similar to handbrake where one can select the duration from-to chapter.
In case of BD3D2MK3D this could produce a fully functional quick test with all the config files as well and would definitely be helpful in making decisions as to what settings to use.
What do you think?

r0lZ
3rd September 2016, 08:57
Unfortunately, currently it's not possible. All MVC decoders must decode all frames, starting at the first frame, and therefore they are currently unable to seek to a certain point in the movie to begin the decoding at that point. (In fact, there is a way to drop the beginning of the movie and start to encode only after a certain frame number, but it will be necessary to decode the beginning of the movie anyway, and that's long and useless.) That means that there is no practical way to encode only a specific chapter, or to provide the starting and ending frame numbers.

However, if you really want to do a short test, you can manually change the number of frames to encode in the __ENCODE_3D.cmd file. (You have to change that number two times, or 4 times if you encode in 2-pass mode.) That way, you can restrict the encoding to the beginning of the movie, and that should be sufficient to do a quick test. But it is impossible to encode the middle or end of the movie only, and therefore I will not implement that feature in the GUI. Sorry.

Note also that if you want to build a short MK3D after having computed the full movie, you can use the Mkvtoolnix GUI to cut a short sample anywhere in the movie. That may be handy if you need to provide a sample, but you'll have to encode the full movie anyway.

konikpolny
3rd September 2016, 12:28
Thanks for the workaround.
I guess you would have done it by now if it were possible. :)

slavanap
6th September 2016, 14:38
r0lZ,
All MVC decoders must decode all frames, starting at the first frame, and therefore they are currently unable to seek to a certain point in the movie

If you remember, ssifSource (http://forum.doom9.org/showthread.php?p=1631733#post1631733) decoder is able to seek (because FFMpegSplitter is able to do so in .ssif files), although seek is not frame accurate.

konikpolny,
Looks like link in the post (http://forum.doom9.org/showthread.php?p=1631733#post1631733) got expired, although sources (https://github.com/slavanap/ssifSource) are available now. And you can get binaries here (https://github.com/slavanap/ssifSource/releases).

r0lZ
7th September 2016, 09:55
That's right, but I don't want to rewrite BD3D2MK3D again (almost) from scratch just to implement a way to seek in the video. And IIRC SsifSource is much slower than the current solutions. I didn't know that its seek is not frame accurate, but it's another reason to not recommend it. But you're right. I should have written that the MVC decoders currently supported by BD3D2MK3D or based on the Intel MVC decoder are not able to seek.

slavanap
10th September 2016, 14:39
No offense.

That's right, but I don't want to rewrite BD3D2MK3D again (almost) from scratch just to implement a way to seek in the video.
I didn't mean it that way! A person asked for a possibility of cutting source video during encoding. I just wanted to fix your "impossible" answer. This is all. My answer doesn't have meaning "add this solution". I wanted to say that this is impossible with BD3D2MK3D, but you can use other difficult way if you really want to achieve what you want. This is it.

And IIRC SsifSource is much slower than the current solutions.
Well, this is that slow because it's using original sample_decode.exe from Intel SDK. If any all those people who developed their fast solutions wanted to make it faster, they could develop their own optimized sample_decode.exe version that would still work with ssifSource. Unfortunately, I didn't have time to optimize sample_decode.exe myself. Still, the fact is that all these fast solutions are close-source while mine became open.
I didn't know that its seek is not frame accurate, but it's another reason to not recommend it.
It is I-frame accurate. I-frames usually appear every second of the video. 1-second accurate solution is something. And with SequentialToSeekable you can make it to start from the frame you want.
But you're right. I should have written that the MVC decoders currently supported by BD3D2MK3D or based on the Intel MVC decoder are not able to seek.
The latter is incorrect though. ssifSource is based on Intel SDK. The truth is that all decoders that work with .h264 files are unable to seek, because .h264 files does not contain an index, meanwhile, for example, .ssif file does. tsMuxeR.exe just ignores the index while extracting .h264 streams from .ssif/.m2ts file.

r0lZ
11th September 2016, 16:08
I agree. Sorry if my answer was not accurate. BTW, when I wrote "(In fact, there is a way to drop the beginning of the movie and start to encode only after a certain frame number, but it will be necessary to decode the beginning of the movie anyway, and that's long and useless.)", I was referring to your SequentialToSeekable plugin. It is very useful, but since the whole beginning of the movie must be decoded anyway, it's slow and it's not really a good solution to encode only from a certain point. But that works, and it is relatively easy to modify a BD3D2MK3D project to use it if it's really necessary.

However, honestly, I don't think that there is an obvious advantage in the possibility to encode only a part of a movie, at least with BD3D2MK3D. Usually, the whole movie must be encoded, or if the BD is made of several episodes, there are almost always titles containing one episode only on the same BD. And the samples that may be useful in some circumstances can be easily extracted from the whole MKV, as I have explained above.

In fact, Donald Graft has proposed to improve his DGMVCDecode plugin by adding the possibility to seek. That requires to process the input file first to build an index and save it to HDD (as FFMpegSource2 does when necessary), and that takes some time, but when the index exists, the seeks are immediate and frame accurate. Of course, I have accepted his proposition, but he has never released the new version, probably because he has not enough time to do it. Perhaps with that solution I would have added the starting and ending points in the BD3D2MK3D GUI, although there are other problems to solve, such as how to cut the audio and subtitles properly (but that should be easy).

Anyway, thanks for the precisions and for your work.

r0lZ
17th September 2016, 08:44
Here is v0.93, that fixes several minor issues:

v0.94 (September 17, 2016)
- Fix: BDSup2Sub crash when the language code of the stream to convert is "und" or "un" (undefined).
- Fix: Subtitles not converted to 3D when the language code is not known by BDSup2Sub.
- Fix: The wrong error messages about renaming subtitle files in the BD3D2MK3D log have been removed.
- Fix: Workaround for a bug in ImageMagick when converting an image from sRGB JPEG to PNG.
- Updated the MkvToolnix exes to the latest version (v9.4.2)
- Updated the x265 exes to the latest versions (2.0+55 or 2.0+54)

Download: BD3D2MK3D.7z (http://download.videohelp.com/r0lZ/BD3D2AVS/BD3D2MK3D.7z)

konikpolny
27th September 2016, 23:44
r0lZ,
I noticed that if I select h265 HEVC encoder and I click "Do it!" to create the project files, a number of subtitles files are missing when compared to doing the similar with the h264 AVC encoder. These include xml 2D picture subs, and all the 3D planes, but most importantly all the chosen 3D streams (idx/sub, sup) are missing. Strangely the 2D idx/subs and sups are not affected.

konikpolny
28th September 2016, 08:41
I should have added that it happens when doing encoding for full-SBS. And that actually seems to matter.

r0lZ
28th September 2016, 09:13
The answer is in your second post. The problem is not at all related to h265, and it's not a bug.

Unfortunately, there is a big limitation in the BD SUP and DVD SUB formats. The picture dimension must be standard (1920x1080 for HD), and the width (or height for T&B) cannot be multiplied by two. Therefore, it is possible to generate 3D subtitles for Half-SBS or Half-T&B, but not for Full-SBS and Full-T&B. (A similar limitation exists for Frame Sequential, but for other reasons.) However, it is possible to hardcode the 3D subtitles over the image (with the option in the last tab) without problem, regardless of the output format (because the subtitles are hardcoded on the full left and right frames before they are combined together). So if you really want to encode in Full-SBS and you want the correct 3D subtitles, hardcoding a single subtitle stream is your only option.

Note that this is briefly explained in the warning dialog that appears when you untick the "Half" option in the last tab.

If your player supports (correctly!) the ASS (Advanced SubStation Alpha) subtitle format, you may want to convert the subtitles to ASS 3D. As far as I know, ASS has not that picture format limitation and should be OK for Full-SBS or Full-T&B. But it's a text-based format, so you have to either convert the original SUP to SRT (with SubtitleEdit) or download a SRT for your movie first. Then you will have to convert the SRT to ASS 3D with the last option of the Subtitle Tools menu of BD3D2MK3D, and either modify the __MUX_3D_OPTIONS.txt file to include the new subtitle stream or mux it manually with MkvToolnix. And the result might not be perfect. If you want to try that method and you don't understand how to generate the correct 3D ASS, ask here for help. It's not really easy, but it's feasible.

konikpolny
28th September 2016, 13:22
R0Iz, thanks for reminding me about 3D sup/sub streams limitations for Full-SBS/TB :). Now I do remember reading about it before.

However, I still think that these files should be generated and made available for 'other' use even if not being muxed in the final MKV due to their incompatibilities.

The main reason why I do the full-SBS is to have one best quality copy for both 3D and 2D. For watching I only use software players (my computer) and a projector. When having 2 full frames I can enjoy watching 2D in its original full format and best quality rather than having it stretched from its squeezed half. In case of a 3D I have to adjust the aspect ratio to "squeeze" the full-SBS to half-SBS anyway in order for my projector to properly display the 3D. Therefore, when I make the picture appear as half-SBS I can perfectly use the 3D sub/sup subtitles meant for the half-SBS and they are loaded by the player automatically if they are made available as an external file. I have also created the .ass 3D subs but in fact I cannot even use full-SBS .ass because they don't get 'squeezed' by the player and so again I have to create half-SBS .ass 3D subtitles for my use.
So for incompatibility reasons I wouldn't even want to mux the 3D half-SBS sub/sups in the final mkv but I would need these files to be available externally.
This also regards the files for 3D planes, which are necessary to convert 2d SRT into 3d ASS, and the XML picture subtitles which are very helpful in verifying 3D-planes compatibility.

As regards the warning dialogue for Full-SBS/T&B it could inform that if 3D subtitles were selected by the user only half-SBS/TB subs/sups will be generated and they won't be muxed for incompatibility reasons. Then it would be in line with what the user selects on the "Select streams" tab.

Also, THANK YOU VERY MUCH :thanks: for making the .SRT to 3D .ASS converting tool. Some italic subs may look jagged but it is an excellent tool to have! Many thanks for that!

r0lZ
28th September 2016, 14:32
Hum, well, I understand your reasons, but your way to display the Full-SBS is very specific and not used by many users. I'm not sure that adding the 3D subtitles as Half-SBS outside the container makes much sense, except for you. Also, it is possible and easy to convert then to Half-SBS yourself. All you have to do is to note the 3D-Plane to use (It is displayed in tabs 1 and 2), then extract the 3D-Planes from the original MVC video stream (with Subtitle Tools -> Extract 3D-Plane from MVC), and convert the original 2D subtitles to 3D (with the first option in the same menu). Normally, that's straightforward and easy. At least, it's much easier than converting 2D SRT to 3D ASS.

I may add an option to generate the Half-3D subtitles anyway for Full-SBS and Full-T&B, and mux them in the final video (even if your player needs them outside) because, indeed, they can be useful if the player resizes the video itself AND if the subtitles are displayed AFTER that operation, but I will need some time. Currently, I'm busy on other things. In the meantime, you can convert the subtitles to whatever you want yourself.

The fact that you cannot use Full-SBS ASS is probably due to a bad configuration of your player. Personally, I use PotPlayer to verify the 3D movies on my PC, and it has an option to display the subtitles before or after the conversion to 3D. It's not exactly the same thing for you, but it's similar. The player must display the 3D subtitles before the conversion (because they are split later, with the video), and the 2D subtitles after the conversion (because otherwise the 2D subtitles are split in two halves). A similar option may (should?) exist for your player. If you can display the Full-3D ASS subtitles over the ORIGINAL video, and either resize the video with the player after that, or let the TV resize the video, the subtitles should be OK. Note also that it is perfectly possible to generate Half-SBS ASS subtitles with BD3D2MK3D.

Thanks for the thanks for the ASS-3D conversion tool! Note that I don't use the 3D-ASS subtitles myself, and I have not tested much that function. But I have noticed that the first subtitle was missing after converting a SRT encoded in UTF8 or UTF16 format. I have tried to fix that bug, but I'm still not sure it works fine in all cases. So, if you use that function, please verify if the first subtitle is correct and not missing, and let me know if the bug is still not fixed.

konikpolny
28th September 2016, 19:04
I may add an option to generate the Half-3D subtitles anyway for Full-SBS and Full-T&B, and mux them in the final video (even if your player needs them outside) because, indeed, they can be useful if the player resizes the video itself AND if the subtitles are displayed AFTER that operation
I would be grateful if you could, even if added as a muxing option, and I didn't mean to say that my player needs the subtitles outside. I use either MPC-HC or PotPlayer. What I meant was that software players automatically load external subtitles and so I don't even have to bother muxing possibly incompatibile or not fully compatible subtitles. It is my own preferrence. I would have muxed them if they were fully compatible. Still they are useful and I definitely want to have them. Also, my personal opinion is that a lot of users may want to keep these subs files for future in case they want to mux/use them later or share with somebody else. After all the program generates a lot of files all of which only one final video file is to stay in the end. Why not let users decide what files they want and which files to delete.

All you have to do is to note the 3D-Plane to use
Yes I know, but the full-SBS/T&B projects as for now don't generate the 3D planes files either. Nor the XML/PNG files, which as I said are the only acceptable input files in the "Verify the 3D-planes compatibility" Subtitle tool.

please verify if the first subtitle is correct and not missing, and let me know if the bug is still not fixed
My 3D .ASS subtitles which I converted from the OCR'ed UTF-8 SRT seems OK and contain the 1st subtitle. I will let you know if I notice anything unusual.

The fact that you cannot use Full-SBS ASS is probably due to a bad configuration of your player.
I have spent quite a long time with PotPlayer and couldn't really figure out what would be the best configuration in case of full-SBS MKVs, as well as my full-SBS ASS subtitles. If I change the subtitles output to be before the resizing to 3D I sometimes end up with 4 pairs of (8) 'squeezed' subtitles! :) As regards the video I need to change the Aspect Ratio to make it a half-SBS as my projector only supports half-SBS/T&B. The expected effect whatever it is is some kind of mysterious combination of settings for 3D video and the subtitles together. Maybe someone could suggest the best configuration especially with regards of full-SBS 3D-ASS?

r0lZ
29th September 2016, 09:28
BD3D2MK3D will treat the subtitle file like normal subtitles and mux it, exactly like for Half-SBS. Of course, you are free to rename and keep the subtitle file also outside the MKV container, but BD3D2MK3D will not do it automatically.

With 3D subtitles, you must disable the 3D option for the subtitles in PotPlayer (3D Subtitles (Stereoscopic) -> Do Not Use (Recommenced)), because otherwise it duplicates what it thinks are 2D subs, and you get 4 subtitles! Anyway, I agree that the config of PotPlayer regarding the 3D subtitles is hard to master. To display the subtitles before or after the resize, I think that you should play with the Display Subtitles on Video or on Overlay (Alt-i) and the 3D Subtitles -> Subtitle Output After or Before Resizing options. For 3D-ASS, the problem is probably more complex, because ASS is a text based format, and PotPlayer has a lot of other options to let you position the subtitles where you want them (for example over the image or over the black border). You should select the option that does not modify the position encoded in the ASS file.

Personally, I don't encode in Full-SBS, so I don't need to modify the aspect ratio, and I don't know how the subtitles are modified by that option, but it should be possible to display the subtitles correctly. When I'll have some time, I will try to encode a short clip with subtitles and maybe I'll find a solution. But be patient...

Palych
8th October 2016, 10:19
Hello, r0lZ! Hello, everyone!
I write here first time. I need your help! When I try to start this program (BD3D2MK3D v0.78) on my notebook, I get this error. What I do wrong? Look at my screenshots, please.
The problem was and on my PC, when I started the program first time, after installation other Windows 7 64-bit, the problem is over.

r0lZ
8th October 2016, 10:30
Welcome to the Doom9 forums, Palych.

Unfortunately, your screenshots are not approved yet, so I can't reply right now. To avoid the delay due to the attachments approval, it is better to post your screenshots on an image hosting site like PostImage (https://postimage.org/), and post the links here.

Anyway, I will come back when your images will be visible or approved...

Palych
8th October 2016, 11:06
These are links:
https://s16.postimg.org/d1jaki8dx/log.jpg
https://s21.postimg.org/9vpbab0br/screeh_avs_2.jpg
https://s13.postimg.org/nny4kmgmv/screen_enc.jpg

r0lZ
8th October 2016, 12:08
OK, according to the error, it's DGMVCSource that fails to open the input files or can't get the Intel decoder to work.

I note also that the number of frames in the "__ENCODE_3D_MOVIE.avs" and in the "__ENCODE_3D.cmd" scripts is very low: only 3480 frames. It's approximately 2 minutes and 25 seconds of video ! So, either you encode only a very short clip (and certainly not the "How to train your dragon 2" movie), or you have edited manually the script to do a short test, or something went wrong when the project has been created. In the later case, I suspect a disk full problem. Are you sure you have enough disc space? You can probably see the real cause of the error in the BD3D2MK3D.log file, in the "*** Demuxing the streams..." section, near the beginning of the file. If you are not sure, post the content of that file here (between CODE marks, not as an image).

If the number of frames is correct and the 00162.track_4113.264 and 00162.track_4114.mvc files are present in the project folder, then maybe there is a problem with the Intel decoder. If it's the case, try to edit the avisynth script "__ENCODE_3D_MOVIE.avs" and change this line:

interleaved = DGMVCSource("00162.track_4113.264", "00162.track_4114.mvc", view = 0, frames = 3480, hw = 0)

Change the "hw = 0" at the end of the line with "hw = 1". That will disable the hardware acceleration during the decoding of the video (if your CPU supports it). Then launch again "__ENCODE_3D_LAUNCHER.cmd" and see if it works fine. If it's OK, that means that the Intel decoder tries to use the hardware acceleration but fails. Usually, it's due to outdated Intel CPU drivers. Check if there is an update of your CPU drivers. Otherwise, you may have to select the option "Settings -> MVC Decoder -> Hardware Acceleration -> Disabled (Use if Auto crashes)". That will permanently disable the hardware acceleration. You may also want to try to use FRIMSource instead of DGMVCSource (in the same "MVC Decoder" menu), although I doubt that it will work better.

Please let me know if you can get it to work, and how. Thanks.

Palych
8th October 2016, 13:41
Thanks!!!!! Everything is working!!!! Changed the "hw = 1". Yes, I didn't update drivers too long. It's my mistake. Next time I'll be careful! Now, I know why on my PC was such error.

Yours sincerely Palych!


PS:The number of frames is correct, it's small "ssif" from BR.

r0lZ
8th October 2016, 13:51
OK, thanks for letting me know.

If you can't update your drivers or if the problem persists, don't forget to change the Hardware Acceleration setting in BD3D2MK3D. Disabling it is not very important, as the speed gain is minimal. And your next projects will work correctly without having to edit the avisynth script.

Have a nice 3D experience!

frank
15th October 2016, 18:30
My latest experiences:

Potplayer (1.6.63638) now analyses mkv video (frame-packing) and can automatically switch to 3D regardless of the extension hlr, htab, hou...

EDIT:
Sorry, I was wrong because of big GUI issues.
The german GUI (maybe others too) of Potplayer has a lot of translation issues, line mismatches. So use the english.ini for proper GUI text and setup.
Switching only works with MVC-3D mkv generated by MakeMKV.

Potplayer (1.6.63638) now playes mkv-3D (MVC) muxed by MakeMKV using the Intel MVC 3D software decoder.

PowerDVD 16 can play 3D video from mkv generated by MakeMKV or BD3D2MK3D.
But the morons until now mismatch left and right view on passive display.

The remaining problem are 3D subtitles.

r0lZ
15th October 2016, 19:23
Very good news indeed.

I'm not sure the 3D subtitles is still a problem. Potplayer can display them correctly. It cannot automatically switch to the right configuration (based on what?) and configuring them properly manually is a bit tedious and not very intuitive, but it's possible. And when Potplayer is properly configured, it displays the 3D subtitles correctly on 3D movies, and the 2D subtitles are still correct when playing a 2D movie. IMO, it's (almost) perfect.

The major remaining problem is that most TVs and hardware players are not really 3D friendly, and often they cannot display the subtitles in BD SUP and even DVD VobSub format at all. It is a pity to have to connect a PC to the TV to play a 3D movie with 3D subtitles properly.

r0lZ
17th October 2016, 09:42
Potplayer (1.6.63638) now analyses mkv video (frame-packing) and can automatically switch to 3D regardless of the extension hlr, htab, hou...
That doesn't work here. When I play a 3D SBS movie with the stereoscopy tag in the MKV header and the frame-packing setting in the h264 header correctly set, but without the "3D-lrq" or "3D-HSBS" extension, PotPlayer shows the two images side by side and doesn't switch to 3D automatically. Even with "3D" in the file name, it plays the movie in 2D. The "Auto determine whether to enable 3D video mode" and the "Auto detect 3D input format" settings of PotPlayer are enabled. (Note that there is still a link to this page (https://www.tridef.com/user-guide/3d-file-formats) next to the Auto detect option, but disabling that option doesn't change its behaviour.) It seems that PotPlayer continues to ignore the stereoscopy and frame-packing flags. Or have I missed another setting somewhere?

r0lZ
22nd October 2016, 18:03
I've also discovered that the PotPlayer option "Video -> 3D Video Mode -> Use built-in H264 MVC video codecs" doesn't work properly. The decoded images have serious glitches, similar to the problems of the early Sony MVC decoder, but more frequent and affecting a larger area. It is better to leave that option off (the default).

konikpolny
24th October 2016, 17:48
Hi r0lZ,
I have 4 observations about 3D-ASS subtitles:
1)
I noticed that BD3D2MK3D adds a yellowish SecondaryColor with values=&H0380F0F0 to the converted 3D-ASS subtitles. However, the SecondaryColor is not available to set in the conversion tool, and although not being used directly it does seem to affect how the subtitles are displayed. I noticed that with the yellowish SecondaryColor the subtitles have a thinner and less contrasting outline, and more jagged inclined lines (as in 'A') or with italics. For my use I make the SecondaryColor to be just black (&H00000000). I think it would be better if BD3D2MK3D made it black by default or it allowed for user to select their own preferred SecondaryColor.
2)
The second thing is merely an observation that the ASS version created with the {\pos(x,y)} option makes most of the subtitles (although not all of them) more sticking out by about 1 or 2 points when compared to the ones created with Margins. This still seems perfectly fine to me. I am inclined to use the Margins version anyway.
3)
I also noticed that you still have values for margins for individual subtitles even when \pos(x,y) version is created as in example below. Any specific reason for that? Why not have the 0000s?
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:02:31.78,0:02:34.31,3D,,3,1923,3,,{\pos(966,972)}This is just an example
Dialogue: 0,0:02:31.78,0:02:34.31,3D,,1923,3,3,,{\pos(2874,972)}This is just an example
4)
Lastly my humble suggestion - to call the 'Style' something like "3D" (as in example above) rather than "Default". That would be shorter (as this is repeated for every single sub) and more meaningful :)

r0lZ
25th October 2016, 07:52
1)
I noticed that BD3D2MK3D adds a yellowish SecondaryColor with values=&H0380F0F0 to the converted 3D-ASS subtitles. However, the SecondaryColor is not available to set in the conversion tool, and although not being used directly it does seem to affect how the subtitles are displayed. I noticed that with the yellowish SecondaryColor the subtitles have a thinner and less contrasting outline, and more jagged inclined lines (as in 'A') or with italics. For my use I make the SecondaryColor to be just black (&H00000000). I think it would be better if BD3D2MK3D made it black by default or it allowed for user to select their own preferred SecondaryColor.

Hum, it's strange. The secondary color should not influence the subtitles.
But I don't remember why I have chosen that color. Probably because I've found it in an example. Anyway, I have changed it to &H00000000.
BTW, the code of the SRT to ASS 3D conversion tool can easily be modified. Just edit the file toolset\SRTtoASS3D.tcl. (You can't change the primary and back colors easily, because they are set with the GUI, but the two other colors can be modified if you wish.)

2)
The second thing is merely an observation that the ASS version created with the {\pos(x,y)} option makes most of the subtitles (although not all of them) more sticking out by about 1 or 2 points when compared to the ones created with Margins. This still seems perfectly fine to me. I am inclined to use the Margins version anyway.

I will have a look. AFAIK the position should not be different. Perhaps it's due to the margins you have noticed in point 3.

3)
I also noticed that you still have values for margins for individual subtitles even when \pos(x,y) version is created as in example below. Any specific reason for that? Why not have the 0000s?

Well, yes, there is a reason. Suppose that the user selects a big font size in the GUI and that there is a long sentence to display at a very important depth. In that case, it may happen that the subtitle is pushed partially out of the screen by the 3D offset. The margins are useful in that case to avoid to stick the subtitles to the border of the screen, or, in SBS mode, to go beyond the middle of the screen and therefore appear partially on the view for the other eye! IMO, it is very important to keep the margins, but they can probably be slightly reduced. Currently, the formula to compute the margin is:

set minmargin [expr abs($depth) + $outline + $shadow + 6]

It should be possible to remove the + 6 if you wish, but IMO that should not change the display, except perhaps in extreme cases, as explained above.

4)
Lastly my humble suggestion - to call the 'Style' something like "3D" (as in example above) rather than "Default". That would be shorter (as this is repeated for every single sub) and more meaningful :)
Oh, well, Default is used by all ASS editors, so I kept that convention. I can change it to 3D, but IMO the gain is minimal.
[EDIT] I did it anyway.

r0lZ
25th October 2016, 11:44
I have verified point 2 and you're right. The \pos(x,y) version is always correct, but the right view of the margin version is off by one pixel in a specific case. The bug is due to a discrepancy in the way my code rounds the values when the X coordinates are divided by 2 (for Half-SBS). It happens therefore only in Half-SBS mode and when the 3D depth value is odd.

To test the problem, I have created a single SRT subtitle, and converted it without a 3D-Plane, but with the additional depth set to 30 (the maximum). For technical reasons, the additional depth is always divided by two, so the real additional depth is 15, an odd number. In Half-SBS, the subtitle of the left view must therefore be placed at the middle of the left view + half the 3D offset (rounded to the inferior integer): 1920/4+7 = 487. Similarly, the subtitle of the right view must be shifted to the left by half the 3D offset, but this time rounded to the upper integer: 1920/4*3-8 = 1432. That values are correct in the /pos version. For the margin version, the left view is correct. The margins are 28 and 974, and this simple calculation gives the correct result: (1920-28-974)/2+28 = 487. But for the right view, the same margins are used (but of course inverted): 974 and 28. The final position is therefore (1920-974-28)/2+960-28 = 1433, as you can see in the example below. It should be 1432.

Dialogue: 0,0:00:05.00,0:00:35.00,3D,,28,974,40,,!
Dialogue: 0,0:00:05.00,0:00:35.00,3D,,974,28,40,,!
Dialogue: 0,0:00:35.01,0:01:10.00,3D,,8,968,8,,{\pos(487,1040)}!
Dialogue: 0,0:00:35.01,0:01:10.00,3D,,968,8,8,,{\pos(1432,1040)}!

The right margin values should be 973,29 instead of 974,28 in red above.

I will fix that bug immediately, although it should not be noticeable in normal circumstances. [EDIT: Done.]
I am inclined to use the Margins version anyway.
To avoid the bug, you should use the \pos version instead!

konikpolny
25th October 2016, 12:58
Thanks for the changes and info.
As regards the issue with SecondaryColour I should add that I observed this in MPC-HC, and might only be noticeable there, due to some intrinsic way for rendering subtitles. I haven't tried PotPlayer but it's very likely that it doesn't influence the appearance there at all.

r0lZ
25th October 2016, 13:15
OK, anyway, I have already changed the Secondary Color. The only point that I haven't changed so far is the margin in \pos mode. I don't think it is necessary to modify that.

If you want to check the fixes immediately, you can download the modified SRTtoASS3D.tcl here (http://download.videohelp.com/r0lZ/BD3D2AVS/SRTtoASS3D.tcl) and overwrite the file in the toolset folder.

konikpolny
25th October 2016, 13:52
Thanks for the SRTtoASS3D.tcl update.
I think it's ok to keep the small margin in the \pos version as the reasons are legitimate.

siyangfei
3rd November 2016, 08:37
did any VapourSynth support? avs is slower than vs,when use E5 CPU to encode,i try to use FRIMsource from VapourSynth conditions by the way of call avs filters,and it worked,but still have some problems,because it cant seek and i cant encode a sample. did someone can offer DGMVC support?

r0lZ
3rd November 2016, 10:50
Welcome to the Doom9 forums, siyangfei !

Currently, I have no plan to implement support for VapourSynth, simply because I 'don't think it will be really faster. Most (if not all) the time necessary to decode the video streams is spent by the MVC decoder, and it will not be faster because it runs under VS instead of AviSynth. It would be much more useful to optimize the available MVC decoders, and that's not my job. (And, BTW, FRIMSource might be a bit faster than DGMVCSource. Try it with BD3D2MK3D.)

BTW, currently, no MVC decoder can seek. To implement that, the decoder should create an index file (or, more precisely, two index files, for the two video streams) before beginning to decode the video itself (like ffmpeg or other non-MVC decoders do), and again, since I'm not the author of the MVC decoders, it's not my job.

Note that it is possible to encode only the beginning of the movie easily with BD3D2MK3D, if you really want to encode a sample. It is sufficient to edit the number of frames in __ENCODE_3D.cmd. Or you can of course encode the whole movie and then extract a certain segment with the MkvToolnix GUI.

odyssey
10th November 2016, 16:50
Hi r0lZ

Finally got the chance to try and replace subs with different language. Did so primarily by adjusting a retail sub to match one of the present subs. It works great and looks fantastic (with the right font). Thanks for your amazing work on this! I see that you even added a lot of more features to this. Haven't tried all of them yet, though.

On another note (perhaps slightly off topic), I tried trimming and adding clips together, to replace a translated (non 3D) title, with the original one. I tried both DGMVCsource and FRIMsource, and both of them are crashing :( Using VirtualDub, FRIMsource looked more promising, as it actually did the trim, whereas DGMVCsource seems to insist on starting on frame 0 all the time.

Any ideas why they act up like this?

r0lZ
10th November 2016, 17:28
Thanks for your kind words. :)

Currently, the MVC decoders are unable to seek, because they do not build an index file. It's a known limitation, and BD3D2MK3D can't directly overcome it. But you wrote "(non 3D)", and therefore I guess that you don't need a MVC decoder. A good AVC decoder should be sufficient. Have you tried FFMpegSource2 (http://avisynth.nl/index.php/FFmpegSource#FFmpegSource2) or a similar Source plugin ? Also, if you really want or need to use DGMVCSource or FRIMSource, you can use the SequentialToSeekable function of the Sub3D avisynth plugin by slavanap (forum.doom9.org/showthread.php?t=173143). It decodes silently all necessary frames to jump to the requested frame and is therefore very slow (especially if you need to seek backward), but it works well. You may also be interested in the main feature of the Sub3D plugin: it detects the right depth for your subtitles without the help of any 3D plane, and can either hardcode your subs or generate a 3D plane! Try it! It is slow and not always accurate, but slavanap did a wonderful job anyway.

odyssey
10th November 2016, 17:36
But you wrote "(non 3D)", and therefore I guess that you don't need a MVC decoder.

The title is not in 3D, but it's in translated language, so I'm trying to "patch" it with the 2D title (stacked, separate fields, giving me a 3D-compatible T&B clip).

For the curious one, it's Transcendence, which is only released in 3D in France. Title is spelled "TRANSCENDANCE". Yeah I'm a bit OCD, but since I'm putting a bit of work into the subs anyway... ;)

r0lZ
20th November 2016, 13:47
This version includes some minor bug fixes related to the ASS 3D subtitles (reported by konikpolny here (http://forum.doom9.org/showthread.php?p=1783747#post1783747)).

It has also a new feature to display the 2D-only titles of the current BD in a window similar to tab 1. It's only a simple way to find and preview the 2D titles. That may be useful if you want to re-encode them with another tool.

v0.95 (November 20, 2016)
- Added File -> Explore 2D Content of 3DBD to display and preview the 2D MPLS files of the current BD
- SRT to ASS 3D: Fixed: The subtitle of the right view in Half-SBS was sometimes off by 1 pixel
- SRT to ASS 3D: Changed the SecondaryColor from yellow &H0380F0F0 to pure black &H00000000
- SRT to ASS 3D: Changed the font style name "Default" to "3D"
- Updated the Mkvtoolnix exes to the latest version (v9.5.0)
- Updated the x264 exes to the latest version (0.148.2721)
- Updated the x265 exes to the latest version (2.1+36)

Download: BD3D2MK3D.7z (http://download.videohelp.com/r0lZ/BD3D2AVS/BD3D2MK3D.7z)

konikpolny
22nd November 2016, 16:33
r0lZ,
thanks for the latest version. However, it still doesn't have any automated support for 3D subtitles in full-SBS/TB projects, which I was hoping to come into being.
Most importantly it doesn't generate the 3D-planes and XML/PNG files automatically, which are needed or useful in converting the 2D.SRT to 3D.ASS subtitles.
Also, for the reasons I explained earlier (http://forum.doom9.org/showthread.php?p=1781810#post1781810)it would also be good to have BD3D2MK3D generate the half-3D versions of sups/subs just as it does for half-SBS/TB projects (they can still be useful for full-SBS/TB movies).
Not having these features may add a lot of manual work if one wants to get the 3D subtitles in a full-3D project:
The 3D-planes I can generate manually from the Subtitle tools and this is the easier part, but for XML/PNG there is no tool to generate them directly (you can get xml/png indirectly by converting 2D to 3D). The XML/PNG subs are needed (preferrably before the convertion) if one wants to run the "Verify the 3D-planes compatibility..." tool to make a better guess for the right 3D plane choice (the tool only accepts XML/PNG format).

Currently, as I don't want to do all this manually I am creating the second project for the half- version, only to get these files. This does not make sense.
Please, add the 3D subs support already available to half-SBS/TB projects to full- versions projects as well.

r0lZ
23rd November 2016, 13:34
r0lZ,
thanks for the latest version. However, it still doesn't have any automated support for 3D subtitles in full-SBS/TB projects, which I was hoping to come into being.
[...]
Please, add the 3D subs support already available to half-SBS/TB projects to full- versions projects as well.
Indeed, I forgot that. Sorry. But see the next post...
[...] but for XML/PNG there is no tool to generate them directly (you can get xml/png indirectly by converting 2D to 3D).It's not correct. You can very easily generate the XML/PNG files with BDSup2Sub. And, BTW, you can even launch BDSup2Sub (the java or ++ version depending on your settings) directly from the Subtitle Tools menu of BD3D2MK3D. Just select the right output format in the BDSup2Sub GUI. But if you do it, take care. BDSup2Sub has a very big bug when loading XML/PNG subtitles. It assumes always (regardless of the content of the XML file) that the frame rate is 25 fps, and, of course, the timings are not correct any more. To avoid that bug, you have to specify that you want to change the frame rate when the stream is loaded, and select 23.976 for both the FPS Source and FPS Target settings. That way, the timings will be correct (for a 3D BD, of course).

Anyway, with the new version of BD3D2MK3D, you should not need to do it manually any more. :-)

r0lZ
23rd November 2016, 13:38
I've implemented the request of konikpolny. It is now possible to generate the 3D subtitles in Half-SBS or Half-T&B format, even if you encode in Full-SBS or Full-T&B format. (It's still not possible if you encode in Frame Sequential, of course.) See the new option in the Settings menu.

This version includes also a few improvements, and a little bug fix.

v0.96 (November 22, 2016)
- The playlists without audio are not displayed in the GUI any more (unless the "Show all 3D playlists" option is ticked)
- Added the option Generate 3D Subtitles Anyway to force BD3D2MK3D to generate Half-SBS/T&B subtitles even in Full-SBS/T&B format
- Added two context menus in the new Explore 2D Content window
- Fix: Bug when comparing playlists to remove duplicates if a 3D playlist has no 3D-Planes
Download: BD3D2MK3D.7z (http://download.videohelp.com/r0lZ/BD3D2AVS/BD3D2MK3D.7z)

konikpolny
25th November 2016, 12:26
r0lZ, Thank you very much for that.
Also, thank you for the info about BDSup2Sub and XML/PNG files.

On this occasion can you please explain what is _ENCODE_2D.cmd used for?

r0lZ
25th November 2016, 14:57
_ENCODE_2D.cmd is the command that launches x264 (or x265) with the required parameters to encode the movie in 2D, in case you are interested in the 2D version alone. If I have correctly understood your choice, you don't need it, since you encode in full-SBS so that you can select only an half of the video image to watch the SBS movie in 2D. But others (including me) need half-SBS and having the possibility to encode also in 2D is handy.

konikpolny
25th November 2016, 16:59
OK, so it is a way to encode the 2D of the 3D BD, and it is never used in the 3D encode process. But what i didn't understand was that it has hardcoded encode values totally independent of what you specify for your 3D project

r0lZ
25th November 2016, 17:48
No, it's not totally independent. Most settings are used for the 2D and 3D versions (like the selected streams, 720p, CRF value or bitrate). Of course, the 3D specific settings (like SBS, 3D subtitles...) are ignored. And some other settings are ignored as well for technical reasons, like the black at the beginning or end of the movie, because the original AVC stream is re-encoded directly and there is no avisynth script and therefore there are less possibilities. But anyway, the overall quality of the 2D version should be identical or very similar to the quality of the 3D version.

konikpolny
25th November 2016, 23:26
OK, let's compare, the most outstanding differences...
my 3D encode:
\toolset\x265_8bit_x64.exe
--crf 24 --preset veryslow --tune grain

my 2D encode:
\toolset\x264_8bit_x64.exe (in _MUX_2D_REENCODED_OPTIONS.txt the video track for this is named "x265 baseline CRF 20 preset ultrafast, tune film")
--crf 20 --preset ultrafast --tune film

It doesn't quite look as if the 2D version should be identical or similar to the quality of the 3D version

r0lZ
26th November 2016, 05:30
Oh, yes, it's because you encode with x265. I forgot to explain that the 2D encoding is always made with x264, because x265 doesn't accept an AVC stream as input. For that reason, if you encode the 3D movie with x265, the latest settings saved in x264 mode are used for the 2D version. So, to specify other settings for the 2D version, you should switch to x264, modify the settings in the last tab, save the configuration, then return to x265. Your original x265 settings should be automatically restored. The new projects will use the current x265 settings for the 3D version, and the "hidden" x264 settings for the 2D version. (It's somewhat complex, but remember that the 2D stuff is only a bonus, and unfortunately, the x264 and x265 settings are too different to be compatible, so I can't use the x265 settings, even slightly modified, to encode with x264.)

Of course, if you encode the 3D version with x264, both versions use the same encoding parameters, and everything is much more simple. And, in that case, the quality of both versions is equivalent. There are still some slight differences due to the absence of avisynth in the 2D procedure, but they should not introduce noticeable quality differences.

This is roughly explained in the dialogue that pops up when you select the x265 encoder, but I forgot to explain that the 2D version uses always x264 and its settings. I'll add that right now...

konikpolny
28th November 2016, 00:14
OK, that explains the differences.
However, please forgive my asking but, could you explain why x265 won't accept an AVC stream as input. And how in this respect 3D encoding is different to 2D one for BD3D2MK3D. I mean Handbrake can encode 3DBD as 2D output video with x265.

r0lZ
28th November 2016, 11:19
x265 is still much more basic than x264. It doesn't have the stuff necessary to accept many input formats, and it doesn't have the video filters (resize, crop...) that x264 has. x264 accepts an AVC stream, a MKV video, or an avisynth script among many other input formats. AFAIK, x265 accepts only YUV or Y4M input.

For the 3D, BD3D2MK3D requires to build an avisynth script anyway (to combine the two views, hardcode the subtitles, etc...). The script is read directly by x264 32-bit, or it is converted to YUV with avs2yuv.exe first for x264 64-bit and x264 23 and 64-bit.

For the 2D, BD3D2MK3D doesn't build an avisynth script, and therefore it passes the original AVC stream directly to the encoder. That works fine with x264, but that cannot work with x265. AFAIK, there is no simple way to convert the AVC stream to YUV or Y4M on the fly, and therefore BD3D2MK3D doesn't support x265 for the 2D conversion.

It is certainly possible to build an avisynth script that reads the original AVC stream with a good source plugin, and then use avs2yuv to pass it as YUV to x265. Perhaps it's what hadnbrake does. I don't know, because I don't use it. But since the conversion to 2D is not the main job of BD3D2MK3D and has been implemented only at the request of some users, I kept it very simple, and I don't want to do something more complex. However, if someone knows a simple way to make the AVC stream compatible with x265 (perhaps with something like "avc2yuv.exe" if that exists), then I will probably implement the conversion to 2D HEVC. (The resize to 720p will be impossible, but that's another problem.)

konikpolny
28th November 2016, 14:58
thanks for this explanation :thanks:

audiolord
12th December 2016, 01:04
Hello.. the issue that I'm having with the application is the encoding quality. I have tried to encode the BFG 3D into a mkv sbs, but the resulting file is less than 8 gig with audio tracks included. I was trying to make a sbs that was at least 12 gig from the original files which are 33+ gigs in size. On any standard 2D bluray, I can manage the quality how I like it, but I'm having issues with your application, as I have tried to manipulate/edi some of the cmd files and others which can have an affect on the encoding rate.. Can anyone give some guidance??

Nico8583
12th December 2016, 10:37
What kind of bitrate do you use ? CRF ? VBR ? ABR ? CBR ?

r0lZ
12th December 2016, 11:05
Welcome to the Doom9 forums, audiolord !

Why do you want a specific size? Is it not better to target a specific quality? Although somewhat related, size and quality are not identical, and in the case of a movie with very clean images mainly generated with computers (like The BFG), it is possible to compress it very well without much quality loss.

It is totally absurd to pretend that it is necessary to encode at a certain bitrate to obtain a good quality. If you want a good demo, encode a movie made with only black frames at a certain bitrate. Of course, the quality will be perfect. Now, encode a movie made of complex and rapidly changing frames with much noise at the same bitrate. The quality will be terrible! It is therefore impossible to predict the quality of the encoding with a specific bitrate. But if you encode with a reasonable value in CRF mode, the black movie will be perfectly encoded and consume only a few MB, and the complex movie will be equally good but will require much more disc space. Encoding both movies with the same bitrate simply doesn't make sense.

Anyway, it is possible to change the quality of the encoding in the last tab. By default, BD3D2MK3D encodes in CRF mode, and by default I have left the CRF value to the default of the x264 encoder (CRF 23), because IMO that value is an excellent compromise between quality and size. (After all, the programmers of x264 know what they are doing!) Of course, you may prefer to use a lower value if you really think that the quality is not good enough at CRF 23. But do you think that, or do you really see that the quality is bad? IMO, you are victim of a prejudice due to bad information on the internet. Serious tests have proven that the human eye is usually not able to see the difference between a good encoding at CRF 23 and the same encoding at CRF 20 or even lower. Personally, I use values between CRF 18 and CRF 23 depending of the quality of the source image, but IMO it is never useful to encode a movie with lower CRF values. CRF 18 should be reserved to very special cases where the image quality is extremely important. (So far, I have used that value only to encode Sin City 2.)

I've read somewhere that lowering the CRF value by 3 is approximately equivalent to doubling the file size (the bitrate) of the video track. So, if you use CRF 20 instead of 23, the final file size should be around 11 GB, with the audio, but the final file size is difficult to predict because in CRF mode it depends mainly of the difficulty to compress the images. If you really want a specific size, you should use the 2-pass mode, but please DO IT ONLY if you want to put the movie on a media limited in size (like on a DVD). Using 2-pass instead of CRF produces ALWAYS a slightly less good quality, requires much more encoding time and has NO ADVANTAGE at all, except the possibility to define a precise final file size. It is a common mistake to encode in 2-pass, and if it's so frequent, it's probably because peoples recommend absurd encoding settings on the internet.

So to summarise, here are my recommendations: Encode in 2-pass if and only if you really need to control precisely the final file size. Otherwise, encode in CRF and use a CRF value between 18 and 23 depending of your wishes and the quality of the original images. Do not be surprised if your final file size is less than expected, because that means ONLY that the movie was easy to encode, and certainly not that it has been badly encoded. And finally, trust your eyes, and do not trust the bad information on the internet.

[EDIT] Nico has replied before me, but he is right. Your question doesn't make much sense if we don't know what encoding mode you are using.

audiolord
14th December 2016, 09:12
Thanks for the replies. All I did was use the program as it was set up and then started encoding. I will try and lower the CRF to see if it will give me what I was asking...

frank
20th December 2016, 18:22
You can indeed add --psnr to the command line for quality measurement. Ignore the error warning of x264, it does NOT effect the encoding process. I always use it. Only speed is getting smaller (< -1 fps).

PSNR:
>= 45 dB = very good, your eyes don't see any difference
>= 44 dB = (very) good
>= 43 dB = satisfaying, good for grainy movies

My encoding of Big Friendly Giant:
BFG 3D (hTAB): CRF=20, PSNR=45.3 dB, 5023 kbit/s
EXCELLENT result!

----
There are big issues in the german GUI of Potplayer, especially the 3d-tabs.
So I have corrected my post #1088 (http://forum.doom9.net/showpost.php?p=1782896&postcount=1088).

frank
20th December 2016, 18:56
@r0lZ

I use --level 4.0 and additional options like:
--bluray-compat
--vbv-bufsize 15000 --vbv-maxrate 15000
BD compatible is NOT set because of other special options.

BD3D2MK3D adds to the generated commandline the old buffer params (35000...).
Can you change that?
When you set bluray-compat in MEGUI than other params are not inserted.

r0lZ
21st December 2016, 09:15
Well, unfortunately, the devs of x264 have taken very bad decisions regarding the --level parameter. When the --level parameter is provided, it should restrict the bufsize and maxrate parameters so that the final result is compatible with the specified level, but it's not what it does. For unbelievable reasons, the --level parameter does nothing except to add the specified level to the header of the h264 stream, WITHOUT actually restricting the real level of the stream. Therefore, the level in the header does NOT reflect the level of the stream! It's obviously a bug, although it has been introduced deliberately. (There are modified versions of the encoder with that bug fixed, but I prefer to use the untouched exes.) It's a pity and that makes selecting the right parameters very difficult, but it's a fact. That means that to obey the level specified by the user and be compatible with the hardware, BD3D2MK3D has to specify the --vbv-* parameters as well, according to the specified level. It's why I can't remove them when you specify the --level with the GUI, as otherwise there will be no guarantee that the specified level is indeed taken into account (and it is too difficult to explain to the casual user that he has to specify the vbv parameter in addition to the level).

If you really want to specify the level with other vbv parameters, you should use "do not force" for the level parameter of x264 in the BD3D2MK3D GUI, and specify it manually in the additional parameters, with the vbv parameters. That way, BD3D2MK3D will not restrict the bufsize and maxrate and you are free to do what you want.

Also, I remember that I did some tests with some parameters specified several times, and it seems that when the same parameter is specified twice with different values, x264 uses always the value of the last occurrence in the command line. BD3D2MK3D adds the additional options near the end of the command line, and therefore if the user specifies a parameter that has also been specified by BD3D2MK3D, the value of the user's option should be used by the encoder. However, I can't guarantee that x264 works always that way, so I prefer to recommend to use the "do not force" trick.

r0lZ
21st December 2016, 09:25
You can indeed add --psnr to the command line for quality measurement.
In fact, you can select the psnr for the Tune parameter in the BD3D2MK3D GUI. It does the same thing. Of course, you cannot select another tune at the same time.

BTW, afaik, to use the psnr option, you have to specify it twice. It must be added alone in the command line AND as the tune parameter (--psnr --tune psnr). I may be wrong, but it's what BD3D2MK3D does when the user selects psnr for the Tune parameter in its GUI. Same thing for ssim.

sneaker_ger
21st December 2016, 11:43
--psnr will measure psnr. --tune psnr will optimize encoding for best psnr result by disabling AQ and psy. So they do different things. --tune psnr is dangerous and harmful and should not be used for anything but testing. (similar applies to --ssim/--tune ssim)

Psy hurts psnr and ssim but looks better to humans. The x264 developers added the warning because in comparison tests against encoders that don't have any psy feature the results are skewed/unfair.

r0lZ
21st December 2016, 12:00
Interesting. But IMO, what BD3D2MK3D does makes sense, because if the user selects psnr as the Tune option in the GUI, then that means that the --psnr parameter must be specified too, because if I understand correctly, disabling psy without enabling psnr (or ssim) doesn't make sense.

In the other hand, it makes sense to specify --psnr without the psnr tune, just to have a feedback about the quality (although it will not be perfectly correct) and without disabling the psy optimisation to keep the encoding for the final MKV. It's what Frank does. To do that with BD3D2MK3D, it is sufficient to add the --psnr argument manually in the additional options field.

Correct?

sneaker_ger
21st December 2016, 12:06
Correct.

frank
21st December 2016, 17:25
Correct (--psnr argument manually in the additional options field.) :)

Thanks for your info, r0lZ. Yes, the last buffer param overwrites the first, but overwriting user defined params is annoying.
For reencoding I ever use level 4.0 because we REDUCE information to that level, otherwise I would use remux.
The 4.0 bandwidth is comparable with AVCHD, HDTV and very useful for streaming (WLAN!!) or beamers and old TV-players - no stuttering. And I can't see any quality disadvantage, seeking and handling is smooth.

Maybe you can set user defined params in an editable user line (hidden if you want). Like jdobbs in BD-Rebuilder does.
Once defined I want to use my own encoding params (user profile) for every transcode.
That would be a christmas gift for me...
EDIT: Solved by using "do not force" for the level parameter of x264 and using additional options.

r0lZ
21st December 2016, 17:51
Maybe you can set user defined params in an editable user line (hidden if you want).I'm not sure I understand. Currently, only the mode (CRF/CQ/2-pass/ABR), the CRF/Quantizer/Bitrate value and the preset must be specified in the GUI. And BD3D2MK3D sets also some parameters depending of the movie, like the number of frames and the colorspace. Everything else can already be specified by the user, in the additional options field. And the content of that field is saved, like almost everything else, when you save the settings (from the Settings menu). I don't think I can do more.

frank
21st December 2016, 18:05
Donald published it in March 2016.
Re: Binaries Update Notification Thread
Postby admin » Sat Mar 05, 2016 5:42 pm

I released DGMVCSource b25. It improves performance by 33%. Note that the 'hw' option has been changed to a new string option called 'mode'. Please read the documentation for details.


To find on http://rationalqm.us/mine.html
I can confirm his statement!
On my Dell notebook (CPU 3rd gen) I use HW decoding (sw 12fps -> hw 15fps). The b25 is more stable! Now blockiness (buffer problems?) in some movies is gone away. B3D2MK3D speed goes up to 18...19 fps in hw mode. Tested with Win 10 prof.

The new param is mode = "auto" instead of hw=0

frank
21st December 2016, 18:35
Thanks, now user params work for me :)
My problem was:

Originally Posted by r0lZ:
...you should use "do not force" for the level parameter of x264 in the BD3D2MK3D GUI

videoh
21st December 2016, 18:38
To find on http://rationalqm.us/mine.html
I can confirm his statement!
On my Dell notebook (CPU 3rd gen) I use HW decoding (sw 12fps -> hw 15fps). The b25 is more stable! Now blockiness (buffer problems?) in some movies is gone away. B3D2MK3D speed goes up to 18...19 fps. Tested with Win 10 prof. Good to hear. Thanks for your test results.

Nico8583
27th December 2016, 13:46
b25 improves performance by 33% for HW and/or SW decoding ?

r0lZ
27th December 2016, 13:56
I haven't tried b25 yet, but thanks for the reminder. It will be included in the next version of BD3D2MK3D anyway.

videoh
27th December 2016, 14:41
b25 improves performance by 33% for HW and/or SW decoding ? Should be substantial for both.

r0lZ
8th January 2017, 11:09
EDIT: DO NOT USE THIS VERSION. It has a big bug when using DGMVCSource as the MVC decoder. Use v0.98 or greater!

Just a little bug fix. The exe of the third party programs have also been updated to the latest version.

v0.97 (January 8, 2017)
- Minor cosmetic changes
- Fix: The bitrate in the labels of the stereo audio tracks was wrong
- Updated DGMVCSource to the latest version (1.0.0 b25)
- Updated the Mkvtoolnix exes to the latest version (v9.6.1)
- Updated the x264 exes to the latest version (v0.148.2744)
- Updated the x265 exes to the latest version (2.2+22)

Note that the version number in the Properties -> Details of the DGMVCDecode.dll is still 1.0.0.24, but it's really the b25. I suppose that Donald forgot to change the version number in his source files.

Humbo
9th January 2017, 18:06
Hello!
I'm having some problems, and this is the error message I get:

avs [error]: Script error: DGMVCSource does not have a named argument "hw"

Any ideas?
Thanks.

videoh
9th January 2017, 18:54
The new version has modified syntax:

DGMVCSource("combined.264","",view=0,frames=2000,mode="auto")
or
DGMVCSource("base.264","dependent.264",view=0,frames=2000,mode="auto")

* single source clip is the combined MVC elementary stream, made with eac3to and mvccombine,
or dual source clips are the base and dependent elementary streams.
* if a single source clip is specified that is a normal AVC file (not a combined MVC file),
then it will be correctly treated as a normal AVC file, and the view parameter is ignored.
* view: 0 = interleaved left and right, 1 = left only, 2 = right only.
* frames: number of frames, if too few the stream is truncated, if too many extra black frames are returned.
The specified frames parameter is internally doubled when delivering interleaved, i.e., when view=0.
* mode chooses mode of decoding: "auto" (default) - use HW acceleration if it is available, otherwise use SW,
"sw" - force SW decoding, "hw" - force HW acceleration, fail if it is not available. If mode is
not specified, then "auto" is assumed.
* multiple instantiation in a single script is supported to the limit of available resources.

I suppose BD3D2MK3D needs to be modified to invoke DGMVCSource correctly for the new parameters.

r0lZ
9th January 2017, 19:53
Oops, sorry. No time right now, but I will fix that bug tomorrow.

r0lZ
10th January 2017, 10:26
OK, here is the fix. Sorry again. I did a quick test with v0.97 and DGMVCSource b25, and it worked, but I have not noticed that the decoder was FRIMSource! :rolleyes:

v0.98 (January 10, 2017)
- Bug introduced in v0.97: DGMVCSource crashed due to its new syntax of the hw/mode parameter

If you have old projects build with v0.96 or previous versions of BD3D2MK3D, and if DGMVCSource was the selected MVC decoder (the default), you will NOT be able to encode them with v0.98. If you don't want to rebuild the whole project from the 3DBD, you can simply edit the __ENCODE_3D_MOVIE.avs file and change the last parameter of the DGMVCSource() line according to this table:

Old syntax -> New syntax
hw = 0 -> mode = "auto"
hw = 1 -> mode = "sw"
hw = 2 -> mode = "hw"

Similarly, if you want to use projects generated with v0.98 or greater with an old version of DGMVCSource, you should apply the same conversion in the opposite order. For your convenience, v0.98 adds a comment with the old syntax at the end of the DGMVCSource() line. But normally, you should not need to use an old version of DGMVCSource.

Download: BD3D2MK3D.7z (http://download.videohelp.com/r0lZ/BD3D2AVS/BD3D2MK3D.7z)

Humbo
10th January 2017, 11:57
Much appreciated!

macrea
11th January 2017, 21:43
Can this software be used to output losslessly to ISO?

The problem with makemkv is it doesn't properly support 3D planes for 3D subtitle depth. And I use the Mede8er external player, and it also doesn't seem to properly respect plane settings in mkv files - according to their forums it must be a 3D ISO for the Mede8er player to properly display the 3D subtitles according to the plane data. TSMuxer also seems to not properly read/handle the plane setting. So this software seems to be the only answer for handling the 3D subtitle depth settings properly. But by default it encodes to half-sbs. I'd like to be able to output to frame-packed ISO in order to keep the quality lossless as well as being compliant.

If this is not possible, is there a way to use this software to at least help with the 3D plane issues with TSMuxer? Can I use this software to get the correct plane info, and then use that plane info in TSMuxer? Will TSMuxer handle the plane properly as long as I put the proper plane setting in?

r0lZ
12th January 2017, 12:15
Welcome to the Doom9 forums, macrea !

I'm not sure I understand exactly what you want to do. It seems that you want "to output losslessly to ISO". That is easy to do and there are several free or commercial programs able to extract the video, audio and subtitle streams (including the MVC stream with the 3D-Planes) from an original 3DBD and write them unchanged to a new ISO, It's just a copy, and the 3D-Planes should not be lost. You have just to verify thet they are correctly assigned to your subtitle streams during the remux. I think that TsMuxeR can do that perfectly, and you can easily see the original 3D-Planes assignments and assign them to your subtitle streams with its GUI. Is it what you want? If it's the case, you don't need BD3D2MK3D at all, and the copy is really lossless.

You wrote also "I'd like to be able to output to frame-packed ISO in order to keep the quality lossless as well as being compliant." The question is, what frame-packed format do you want? AVC+MVC like in the original BD3D? That's exactly what I have explained in the first paragraph. Or do you want to re-encode to AVC+MVC with the possibility to hardcode the subtitles? In that case, I don't think that there is a complete solution. Or do you just want to output as a single interleaved AVC stream (aka "Frame Sequential") and hardcode the subtitles? In that case, you can use BD3D2NK3D to generate the right frame sequential video stream, and use TsMuxeR to build the ISO. The 3D-Planes cannot be used with that kind of output, but since the subtitles are hardcoded, you don't need them any more. Anyway, only the first case is really lossless.

BD3D2MK3D is not designed to re-encode in MVC, or to output to an ISO. It can only re-encode to SBS, T&B or Frame Sequential, and that 3 formats require only AVC encoding. That means that BD3D2MK3D doesn't have the MVC encoder to encode the right video streams for a 3DBD. So, if you want to re-create a real 3DBD with the AVC and MVC video streams, you need another encoder. And currently, the only free MVC encoder is the Intel encoder, used for example by FRIM (http://forum.doom9.org/showthread.php?t=169651).

I can't help much more without knowing exactly what you want to do.

macrea
14th January 2017, 09:51
Welcome to the Doom9 forums, macrea !

I'm not sure I understand exactly what you want to do. It seems that you want "to output losslessly to ISO". That is easy to do and there are several free or commercial programs able to extract the video, audio and subtitle streams (including the MVC stream with the 3D-Planes) from an original 3DBD and write them unchanged to a new ISO, It's just a copy, and the 3D-Planes should not be lost. You have just to verify thet they are correctly assigned to your subtitle streams during the remux. I think that TsMuxeR can do that perfectly, and you can easily see the original 3D-Planes assignments and assign them to your subtitle streams with its GUI. Is it what you want? If it's the case, you don't need BD3D2MK3D at all, and the copy is really lossless.

You wrote also "I'd like to be able to output to frame-packed ISO in order to keep the quality lossless as well as being compliant." The question is, what frame-packed format do you want? AVC+MVC like in the original BD3D? That's exactly what I have explained in the first paragraph. Or do you want to re-encode to AVC+MVC with the possibility to hardcode the subtitles? In that case, I don't think that there is a complete solution. Or do you just want to output as a single interleaved AVC stream (aka "Frame Sequential") and hardcode the subtitles? In that case, you can use BD3D2NK3D to generate the right frame sequential video stream, and use TsMuxeR to build the ISO. The 3D-Planes cannot be used with that kind of output, but since the subtitles are hardcoded, you don't need them any more. Anyway, only the first case is really lossless.

BD3D2MK3D is not designed to re-encode in MVC, or to output to an ISO. It can only re-encode to SBS, T&B or Frame Sequential, and that 3 formats require only AVC encoding. That means that BD3D2MK3D doesn't have the MVC encoder to encode the right video streams for a 3DBD. So, if you want to re-create a real 3DBD with the AVC and MVC video streams, you need another encoder. And currently, the only free MVC encoder is the Intel encoder, used for example by FRIM (http://forum.doom9.org/showthread.php?t=169651).

I can't help much more without knowing exactly what you want to do.

Thanks for the warm welcome!

As was described in your first paragraph, I want to remux to ISO without any re-encoding, keeping only the titles and subtitles I need, while keeping it compliant for burning if I want to.

I have read in a couple places that TSMuxer has bugs/issues with handling planes correctly. From my understanding, TSMuxer won't show you the original planes. It just lets you select the plane you want to use. Is that incorrect? If you use the wrong plane for the subtltle (a different plane than originally on the disc), then the results will not work correctly. This is why I was wondering if BD3D2MK3D would be useful for finding which plane to use in TSMuxer.

I did try using TSMuxer a while back, and it was a foreign animated 3D blu-ray with English subtitles. They must have messed up the planes on the disc because the subs are flat on the screen (plane zero?), cutting through lots of 3D objects and ruing the experience. After using TSMuxer, the subtitles still had the same problem.

I'm new to this 3D planes thing, but am I right that the higher the number in TSMuxer, the farther out of the screen the subtitles are? I'd like to place them far enough out that they won't cut through objects. Any advice would be appreciated.

I also read that some 3D films can have dynamic planes, which place the subs in different planes based on individual dialog, so one line might be on a different plane than another line, depending on the action on-screen. Can anybody suggest a better software solution than TSMuxer for this, or is TSMuxer recommended?

r0lZ
14th January 2017, 11:28
From my understanding, TSMuxer won't show you the original planes. It just lets you select the plane you want to use. Is that incorrect?
Well, it's partially incorrect. TSMuxeR shows you the 3D-Plane number, but it is right that it can have some bugs. The problem is related to the structure of the MPLS. A MPLS can reference some subtitle streams but not necessarily all physical streams really present in the M2TS/SSIF. I call the unreferenced streams "phantom streams". They are present, but normally you cannot select them during the playback. (The video, audio and subtitle streams for the PiP video are also additional streams, referenced in an extension of the MPLS but not related to the real movie. They are therefore similar to the phantom streams.) In a 3DBD, the 3D-Planes are assigned only to the streams referenced in the MPLS, in the order of the MPLS. Most of the time, all streams physically present in the M2TS/SSIF files are referenced in the MPLS, in the same order, and in that case the 3D-Planes shown by TSMuxeR should be correct. However, when a phantom stream is present before a referenced stream, or when the streams are not in the same order than in the M2TS, TSMuseR assigns the 3D-Planes sequentially to the wrong streams. That's a bug, and it's one of the major reasons that have motived me to write my own MPLS parser. BD3D2MK3D shows you only the streams really referenced in the MPLS (without the PiP), with the correct 3D-Planes assignments.

So, yes, it is a good idea to use BD3D2MK3D to verify the 3D-Planes assignments shown by TSMuseR, even if most of the times there are no differences.

If you use the wrong plane for the subtltle (a different plane than originally on the disc), then the results will not work correctly.
Correct, although most of the times, all 3D-Planes are similar. It's why BD3D2MK3D has some tools to convert an external 2D subtitle stream to 3D using the most appropriate 3D-Plane, even if no 3D-Plane exist in the BD for that specific stream or language. The results, although not perfect, are usually very good.

I did try using TSMuxer a while back, and it was a foreign animated 3D blu-ray with English subtitles. They must have messed up the planes on the disc because the subs are flat on the screen (plane zero?), cutting through lots of 3D objects and ruing the experience. After using TSMuxer, the subtitles still had the same problem.
Some cheap 3DBDs have no 3D-Planes or they have a constant depth. (It's usually the case of Asian movies, some documentaries, cheap BDs for kids, and so on...) It's also the case of many ISOs badly compressed to fit on a BD25 and found on the internet (because the 3D-Planes information is in the MVC video stream and is lost when you re-encode it.)

Of course TSMuxeR cannot create new 3D-Planes automatically for that bad BDs. If the original subtitles are flat, it cannot fix the problem. (It should be possible to give a constant depth to unstick all subtitles from the surface of the stream, but afaik it's not possible currently.)

Anyway, in your case, since you don't want to re-encode the video, the MVC stream will stay untouched, and if you use the correct 3D-Plane number, you should obtain exactly the same depths than in the original BD.

I'm new to this 3D planes thing, but am I right that the higher the number in TSMuxer, the farther out of the screen the subtitles are? I'd like to place them far enough out that they won't cut through objects. Any advice would be appreciated.
No! TSMuxeR shows you the assignments ONLY! In a single MVC stream, there can be up to 32 different 3D-Planes. In the MPLS, each referenced subtitle stream is defined. The language of the stream, for example, is defined in the MPLS. The number of the 3D-Plane to use is also defined for the subtitle stream (in the 3D extension of the MPLS). The 3D-Plane number is therefore not related at all to the depth of the subtitles (or only very indirectly).

However, the depth values stored in the 3D-Plane itself represent the position along the Z axis of the subtitles. 0 means "on the surface of the screen", < 0 means beneath the screen, and of course, positive values mean toward the spectator. 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. Usually, the depths values range is around -10 to 25. The full range is -127 to 127. (Note also that in BD3D2MK3D, all depth values are multiplied by 2, for technical reasons and because that permits a better precision.)

Unfortunately for you, you cannot create your own 3D-Planes easily, or modify an existing one. They must be attached to the MVC stream before the mux, and afaik there is no tool able to do that. You will therefore have to use a plane present in the original MVC stream, even if it is not perfect.

BD3D2MK3D has some tools to analyse the content of a 3D-Plane and display some statistics (like the min, max and average depths or the number of undefined depths), but unfortunately for you, it can only analyse the 3D-Planes files extracted from the MVC stream, itself demuxed from the SSIF, so using that tools directly on the BD is impossible.

I also read that some 3D films can have dynamic planes, which place the subs in different planes based on individual dialog, so one line might be on a different plane than another line, depending on the action on-screen. Can anybody suggest a better software solution than TSMuxer for this, or is TSMuxer recommended?
Correct. In fact, all "good" 3D-planes are dynamic, because it is very painful to have to adapt constantly the focus of your eyes to see the objects in the movie and to read the subtitles. The subtitles must therefore be as close as possible to the objects that the spectator is supposed to look at.

As you should have understood now, TSMuxeR is not responsible of the quality of the 3D-Planes. It has just to insert the correct 3D-Planes number(s) in the MPLS so that they correspond to the physical subtitle streams. Dot. Therefore, TSMuxeR can perfectly be used to assign the 3D planes (but as explained above, not to be sure of the 3D-Plane number to use). The rest depends of the 3D-Planes present in the MPLS stream. And authoring them yourself is another story, currently impossible or very difficult with free tools and without authoring the 3DBD yourself. (I hope that TSMuxeR doesn't have the same bug when it muxes than when it analyses a MPLS, but I can't be sure because I don't use it for that job. Anyway, since you remux just to regain some space, I suppose that you will not keep the useless phantom streams, and the 3D-Planes assignments should be straightforward.)

Final note: I have adopted the terminology of TSMuxeR when I began to write BD3D2MK3D, but "3D-Plane" is not the official name. It is probably better to use "Offset Sequence" (hence the ".ofs" extension of the 3D-Plane files.)

macrea
15th January 2017, 09:01
Thanks very much for all of this information. Very helpful indeed, though a bit confusing. I guess the bottom line is for my current situation, if the subtitles are flat on the screen already (cutting through objects), there's no current way of getting them off the screen and in front of the action, correct? That's unfortunate, but at least I know not to spend hours randomly trying different planes hoping it will work. I guess I'm stuck watching it without subtitles. At least I can enjoy the visuals. The subtitles wreck the enjoyment completely when they are flat on the screen.

r0lZ
15th January 2017, 10:00
Yep, it's a good conclusion. Me too, my brain can't support the flat subtitles, and I would like to find a way to replace the bad 3D-Planes in the MVC, but as far as I know, currently it's impossible without re-encoding completely the video streams, and using professional or semi-pro authoring software. But note that I wrote "as far as I know". Personally, I'm not interested in keeping the original streams, and I wrote BD3D2MK3D to do just the opposite: to re-encode the oringnal 3DBD in a totally different and lighter 3D format. For that reason, I don't know exactly the possibilities of the tools used to re-create a BD from M2TS files or elementary streams. Perhaps it is already possible to attach the new or modified 3D-Planes to the MVC stream before re-muxing it, or during the remux process. Perhaps with Scenarist? Honestly, I don't think so, but I'm not sure. If you find a way to do it, please let us know.

Good luck anyway!

geheim
16th January 2017, 13:23
If remuxing 3DBDs with Scenarist you could at least set a constant depth to the subtitles. Using a value of -7 worked for me so far, because the subtitles are then displayed way in front of the Screen and I've never seen a movie in which the subtitles cut through objects in this case.
Note that this does only work with original stream files. Reencoding with FRIM or MVCEnc corrupts the sei message inside the mvc stream and therefore makes it impossible to set any depth values...

r0lZ
16th January 2017, 13:56
Thanks for the precisions.
Using a value of -7 worked for me so far, because the subtitles are then displayed way in front of the Screen and I've never seen a movie in which the subtitles cut through objects in this case.I'm not familiar with Scenarist, but the -7 value seems strange. It seems that Scenarist has adopted the inverse of what is effectively stored in the offset sequence of the final BD, where a negative value means beneath the screen. And a depth of 7 seems pretty small for many BDs. As I wrote above, some 3D-Planes of commercial BDs have some depth values of 40 or even more. But indeed, 7 may be a good starting point.

I remember I've read somewhere that Scenarist can accept .ofs files (with dynamic depths) as well. It's why I've changed the old BD3D2MK3D 3D-Planes file format from .3dp to .ofs (with just an additional header). I've never tried, but the new .ofs files should be compatible with Scenarist and/or other authoring programs or muxers.
Note that this does only work with original stream files. Reencoding with FRIM or MVCEnc corrupts the sei message inside the mvc stream and therefore makes it impossible to set any depth values...
BTW, I wonder if it is possible to write a little exe that replaces the original values of one or all 3D-Plane(s) in an original MVC stream with modified values. Finding the right SEI messages and replacing the values is certainly possible, but I suppose that some checksums must be modified as well, and that's probably much more difficult. And that doesn't solve the problem of the missing SEI messages in re-encoded streams.

geheim
17th January 2017, 10:56
Thanks for the precisions.
I'm not familiar with Scenarist, but the -7 value seems strange. It seems that Scenarist has adopted the inverse of what is effectively stored in the offset sequence of the final BD, where a negative value means beneath the screen. And a depth of 7 seems pretty small for many BDs. As I wrote above, some 3D-Planes of commercial BDs have some depth values of 40 or even more. But indeed, 7 may be a good starting point.


Negative values in Scenarist result in objects appearing closer to you (in front of the Screen), positive values appear farer away (inside the Screen). I don't know if this is the inverse of what is stored inside the final output...

The value of -7 is just my personal experience. I did quite a few remuxes of 3D Blurays with their according subtitles and a value of -7 was never distracting when watching the movies. Also I noticed that higher values result in more Ghosting effects on some TVs, because of the higher discrepancy between left and right... Ghosting appears often if White objects are on black Background, and this is exactly how subtitles are often displayed.
So, I think you could start testing a bit using -7. I wouldn't take less, but of Course a bit more couldn't be that bad either ;)

I remember I've read somewhere that Scenarist can accept .ofs files (with dynamic depths) as well. It's why I've changed the old BD3D2MK3D 3D-Planes file format from .3dp to .ofs (with just an additional header). I've never tried, but the new .ofs files should be compatible with Scenarist and/or other authoring programs or muxers.


Yes Scenarist accepts .ofs files in theory, although I never got it working unfortunately... I don't know why, but if I used an .ofs file for the depth I just got flat Subs all the time, which means not a single depth Setting is applied correctly. I don't know if there is an error in the .ofs from BD3D2MK3D or in Scenarist itself...

BTW, I wonder if it is possible to write a little exe that replaces the original values of one or all 3D-Plane(s) in an original MVC stream with modified values. Finding the right SEI messages and replacing the values is certainly possible, but I suppose that some checksums must be modified as well, and that's probably much more difficult. And that doesn't solve the problem of the missing SEI messages in re-encoded streams.

This would be quite interesting! Do you think it is possible to replace the SEI Messages without reencoding?? I always thought this could only be done with reencoding, and using professional Encoders only.
Of Course, if some checksums are applied it wouldn't work that easily, but it certainly would be worth investigating I assume.
Perhaps if we knew how the SEI message Needs to be inserted inside the stream, we could also just add it to FRIM-encoded streams after encoding?!?

r0lZ
17th January 2017, 12:11
Negative values in Scenarist result in objects appearing closer to you (in front of the Screen), positive values appear farer away (inside the Screen). I don't know if this is the inverse of what is stored inside the final output...Yes, it's the inverse of the content of the "real" 3D-Planes and the content of the .OFS files. It's also the inverse of the convention widely used in the 3D infographic world, where the Z axis is always directed toward the spectator.

For the 7 (or -7) value, I fully agree that it's a good starting point. At least if the values in Scenarist are equal to the values in the .ofs files (except the sign). Usually, for a constant depth, I try with something between 6 and 10 depending of the movie, but there are usually at least 10 or 20 subtitles that need manual adjustments. A constant depth of 20, for example, will certainly require less adjustments, but the subtitles are so far from the screen that it's certainly not a value to recommend.

Note also that BD3D2MK3D offers also another way to be sure that the subtitles do not enter in the objects. When a movie is shot in Cinemascope format, it has large horizontal black borders. In the last tab, you can move the picture up in the screen, and if the bottom border is large enough, the subtitles will appear in that border, beneath the picture. That's not perfect, but it's less unpleasant than subtitles entering the objects. Anyway, it's not a solution when the video is not re-encoded.

Yes Scenarist accepts .ofs files in theory, although I never got it working unfortunately... I don't know why, but if I used an .ofs file for the depth I just got flat Subs all the time, which means not a single depth Setting is applied correctly. I don't know if there is an error in the .ofs from BD3D2MK3D or in Scenarist itself...
Hum, strange. Are you sure that the offset sequences are correctly referenced in the MPLS files? It is not sufficient to attach them to the MVC stream. It is also necessary to link the subtitle stream and the OFS together. You can verify if the links are correct with BD3D2MK3D, or with TSMuxeR (at least when it doesn't have the bug described in a previous post (http://forum.doom9.org/showthread.php?p=1793361#post1793361)).

This would be quite interesting! Do you think it is possible to replace the SEI Messages without reencoding?? I always thought this could only be done with reencoding, and using professional Encoders only.
Of Course, if some checksums are applied it wouldn't work that easily, but it certainly would be worth investigating I assume.
Perhaps if we knew how the SEI message Needs to be inserted inside the stream, we could also just add it to FRIM-encoded streams after encoding?!?
Well, currently, BD3D2MK3D can retrieve the 3D-Planes from the previously demuxed MVC stream (with MVCPlanes2OFS.exe, written by Nico8583). Since the 3D-Planes are simply collections of depth values (one byte per frame and per 3D-Plane), it is certainly possible to do the opposite, and overwrite the original depth values with edited or new values. Furthermore, many (but not all) 3DBD have the maximum number of 3D-Planes (32), even if only a couple of them are really used and contain meaningful depth values. That leaves much place for experimenting. Of course, the MVC stream must then be remuxed and the 3D-Planes correctly assigned to the subtitle streams, but that can be done with TSMuxeR.
As I wrote, it might be difficult to do it due to checksums or other difficulties. My knowledge of the structure of the MVC stream is not sufficient to be sure that it's possible, but I can do some little tests. But is it really interesting? What will be the benefit of replacing a 3D-Plane in an original MVC stream (supposed to contain already good 3D-Planes) with a constant depth? Without a full 3D-Subtitles editor, that doesn't make much sense.
Adding totally new SEI messages in the MVC stream is also a big challenge. I don't even know if it's the job of the MVC encoder, of the muxer or even of a dedicated application.

Finally, I'm not sure I'm the right person to develop a program to generate or replace 3D-Planes. BD3D2MK3D is not at all dedicated to do that. It does exactly the opposite and uses the original 3D-Planes only to create "3D Subtitle" streams for SBS or T&B format. I have no intention to write something to modify the existing 3DBD and recreate an ISO. However, I have some free time right now, and I will try to modify manually the 3D-Planes of an original MVC, and see if it is still accepted by the muxer and the players. If it's the case, it might be interesting to investigate further...

geheim
17th January 2017, 16:01
Note also that BD3D2MK3D offers also another way to be sure that the subtitles do not enter in the objects. When a movie is shot in Cinemascope format, it has large horizontal black borders. In the last tab, you can move the picture up in the screen, and if the bottom border is large enough, the subtitles will appear in that border, beneath the picture. That's not perfect, but it's less unpleasant than subtitles entering the objects. Anyway, it's not a solution when the video is not re-encoded.


I didn't know that, thanks for the info! Could be useful sometimes, many subtitles will be much nicer on the black bars!


Hum, strange. Are you sure that the offset sequences are correctly referenced in the MPLS files? It is not sufficient to attach them to the MVC stream. It is also necessary to link the subtitle stream and the OFS together. You can verify if the links are correct with BD3D2MK3D, or with TSMuxeR (at least when it doesn't have the bug described in a previous post (http://forum.doom9.org/showthread.php?p=1793361#post1793361)).


I can try that again in the next time. It was some time ago that I last tried .ofs with Scenarist and can't really remember if perhaps I did something wrong. I'll Report back once I could look into it again!


But is it really interesting? What will be the benefit of replacing a 3D-Plane in an original MVC stream (supposed to contain already good 3D-Planes) with a constant depth? Without a full 3D-Subtitles editor, that doesn't make much sense.
Adding totally new SEI messages in the MVC stream is also a big challenge. I don't even know if it's the job of the MVC encoder, of the muxer or even of a dedicated application.



Well if we succeed in replacing SEI Messages we would first of all know if there are in deed some checksums applied etc. If just replacing the values works there are None ;) This means we could insert constant depth values in movies which come without subtitle depth.
And then we could also look into inserting the SEI Messages to FRIM Encodes, which could be very useful, because every re-encode now has the Problem of missing depth for the subtitles...
So I think we could learn a bit from this.

r0lZ
21st January 2017, 10:42
So I think we could learn a bit from this.I agree, and I did the test.

I've just replaced all depth values in a short clip with constant values. The original BD has 32-planes, all of them being undefined (containing the value 0x80, meaning "not defined" for all frames of all 3D-Planes). I've replaced plane #0 with constant depth 1, plane #1 with depth 2, and so on up to depth 32. Then I've remuxed the BD with TsMuxeR and assigned planes #5 and #31 to the two subtitle streams. The final ISO can be read without problem with any software player, but that's not surprising, since they don't use the MVC stream. So, I burned the ISO, and my Samsung 3D BD player has played the movie in 3D without problem, and the two subtitle streams are at the right depth. :-)

So, it seems that it is at least possible to replace the existing depth values with other ones without problem. Adding new 3D-Planes to a remuxed MVC is another problem, and I can't and don't want to do that. Perhaps Videofan3D for FRIM? Or Roman if he decides to continue to develop TsMuxeR? Anyway, it's not something to integrate in BD3D2MK3D, that does just the opposite.

geheim
22nd January 2017, 15:03
I agree, and I did the test.

I've just replaced all depth values in a short clip with constant values. The original BD has 32-planes, all of them being undefined (containing the value 0x80, meaning "not defined" for all frames of all 3D-Planes). I've replaced plane #0 with constant depth 1, plane #1 with depth 2, and so on up to depth 32. Then I've remuxed the BD with TsMuxeR and assigned planes #5 and #31 to the two subtitle streams. The final ISO can be read without problem with any software player, but that's not surprising, since they don't use the MVC stream. So, I burned the ISO, and my Samsung 3D BD player has played the movie in 3D without problem, and the two subtitle streams are at the right depth. :-)


So, it seems that it is at least possible to replace the existing depth values with other ones without problem. Adding new 3D-Planes to a remuxed MVC is another problem, and I can't and don't want to do that. Perhaps Videofan3D for FRIM? Or Roman if he decides to continue to develop TsMuxeR? Anyway, it's not something to integrate in BD3D2MK3D, that does just the opposite.


Awesome that you got it working! So how did you do it?? Was it enough to just replace the depth values?? Or was there any checksums etc. which you needed to modify as well??

So, we can definitely add depth to original mvc encoded files, if they have plain subtitles but the correct sei Header, that's something!
Regarding frim encodes: Is the SEI message always stored at the same Offset inside the mvc stream?? Perhaps we could just copy the Header and SEI info from another original mvc file and inject it into a frim-encoded mvc file??

Anyways, I understand that you don't want to look into that issue. Perhaps @videofan3D could take a look into it as we now know that modifying sei message values is definitely possible?? It should be possible to let FRIM insert them correctly as well (or Keep the original depth values intact)! This would be awesome, because it's really the last Thing we cannot do with free Tools regarding 3D Encoding or backups.

Thanks r0lZ for your tests!!

r0lZ
22nd January 2017, 16:06
I've just replaced the depth values, without touching anything else. I have no idea of what should be changed to add new 3D-Planes instead of simply overwriting existing planes, but I know that there must be one SEI message with the 3D-Planes per GOP (hence the different number of frames in many message). IMO, the difficulty is not the SEI message itself or its header (and the content of the 3D-Plane header within the SEI message is more or less known). It is certainly possible to build new messages from scratch, but IMO it is more difficult to know where they have to be inserted in the original MVC stream, and how the MVC stream must be modified if necessary. And that's beyond my knowledge.

Unfortunately, it is impossible to keep the original depth values intact, as you suggest, because the MVC stream is re-encoded by the Intel encoder, and it doesn't have an option to add or copy the 3D-Planes, If it's possible, FRIM will have to analyse the bitstream it receives from the Intel encoder, and add the messages when appropriate. Or just do a second pass to add them afterwards. I really don't know.

Anyway, I did that test just out of curiosity, and in the hope that someone else will be interested in developing something really usable, but as I wrote above, it's not useful for BD3D2MK3D, so that will not be me.

BTW, normally, Scenarist should be able to build a BD with the 3D-Planes. I don't know if it does it correctly, and you wrote that the OFS files saved by BD3D2MK3D are not taken into account, but Scenarist may perhaps be used to add the 3D-Planes to the MVC stream only, and tsMuxeR may still be used for the mux and to build the ISO. That should work. Anyway, currently, it's probably the only solution available to add the 3D-Planes to a re-encoded MVC.

Triple-M
22nd February 2017, 07:49
Hi,

i have not used your program for a while and now i have used it again but the image is too narrow or squeezed. The movie has not the full height, no matter what player i use (Infuse, MrMC or Plex on my AppleTV 4). I don't know what it is or where the problem is. I tried the Fullsize-Option instead of Halfsize-Option but then the image/video is even narrower.

r0lZ
22nd February 2017, 11:38
Hum, I really don't know what could be the cause of the problem, but for Full-SBS or T&B, you should try to play with Settings -> Full-SBS/T&B aspect ratio. However, that options only affect the aspect ratio in "full" mode and should have no impact when using half-SBS or half-T&B. But try it anyway, as it is well known that the correct aspect ratio settings to use are not clearly defined for SBS or T&B and the selected aspect ratio may not be correctly supported by your player or hardware.

For Half-SBS/T&B, the aspect ratio cannot be changed via the GUI because, until now, the settings used by BD3D2MK3D have always worked perfectly with all players and hardware. But you can try to change them manually in the project files before launching the encoding. The following settings may have an impact on the final aspect ratio:

In __ENCODE_3D.cmd:
--sar 1:1
Try with 2:1 or 1:2 for Half-SBS or T&B. You can also try to simply remove this setting from the __ENCODE_3D.cmd file. Without the explicit sample aspect ratio, maybe your player will assume the correct value automatically.
(This setting affects the h264 elementary video stream. That means that you have to re-encode the whole movie if you want to test another value. I suggest to do your tests with a short clip.)

In __MUX_3D_OPTIONS.txt:
--aspect-ratio
0:16/9
IMO, this one should not be changed, but who knows? Try 0:32/9 and 0:16/18.
(This setting is only stored in the MKV header, and therefore you can simply launch __MUX_3D.cmd after having modified it to regenerate the final MKV without having to re-encode the movie. It is also possible to modify that value directly in the MKV with mkvtoolnix (https://mkvtoolnix.download/index.html).)

If you can find a setting that works fine for you, please let me know and I'll add an option to control the required settings in the GUI.

What is the option you have selected for the 3D format? Half-SBS or half-T&B? And can you confirm that the image is squashed by a factor of two (in other words, can you confirm that the image is twice as high or large than it should be? If it's the case, that may mean that indeed, one of the settings above must be changed, although IMO it is the responsibility of the player to handle correctly the aspect ratio of the 3D movies. (It's also why a 3D movie MUST ALWAYS be encoded in full 16:9, without cropping the black borders, as many TVs assume that a 3D movie must always be played full-screen, regardless of the aspect ratios stored in the file. It seems that it's not the case of your AppleTV.)

Triple-M
22nd February 2017, 19:51
I tried to watch the 3D Movie (the mkv, not the Bluray) on my Panasonic 4K UHD Player and there the Movie looks normal. Under the Player MrMC in my Apple TV i can change the Pixel Ratio in the options from 1.00 to 0.50 and then the Movie Looks normal. Sorry i'm no Profi and i don't know what to do.

r0lZ
23rd February 2017, 13:23
So, you have a solution for your Apple TV if you use the MrMC player, and you don't need a modification of BD3D2MK3D. Right?

The problem is that there is no established standard for the aspect ratios of the SBS and T&B frame packings. It is possible to consider that the specified aspect ratio gives the display aspect ratio (DAR) of the original image or the DAR of the target image, and it's very different. In Full-SBS, for example, the original DAR is 32:9, because there are 2 images side by side (3840x1080 pixels), but when the movie is played, the original image is split in two 16:9 views (1920x1080 pixels each). In Full-SBS, the sample aspect ratio (SAR) is 1:1 for the original and target images. In the other hand, for the Half-SBS mode, the DAR of the original and target images are 16:9, but it's different for the SAR, since the image must be stretched horizontally. Unfortunately, due to the lack of a well established standard, the player is free to consider that the DAR and/or SAR are specified for the original or target image, and there is no good solution for BD3D2MK3D. It's why there is an option in BD3D2MK3D, but currently only for the two Full modes because I have never needed to specify different aspect ratios in Half-SBS or Half-T&B. Since your MrMC player allows you to overwrite the SAR manually with a pixel aspect ratio (PAR), it is open to the two solutions, but you should encode the best SAR and DAR anyway. But take care! As you know now, it's not because a specific combination of SAR and DAR values works fine with a specific player that it will work correctly with all players.

BTW, I forgot to explain that you can also remove completely the "--sar 1:1" option in __ENCODE_3D.cmd. If I remember correctly, old versions of BD3D2MK3D did not specify that parameter at all, and that may be what you need to let the player deduce the SAR from the specified PAR in the MKV header. If the problem of the wrong aspect ratio has appeared recently and is not due to a change in your hardware or software, that may be the best solution. Try it! But I don't know if the SAR is forced by x264 or x265 to 1:1 anyway when it is not specified explicitly, and therefore I don't know if removing that argument will have a real effect.

Note also that most players will take only one of the two specified aspect ratios into account. If, say, the 1:1 SAR works fine with a specific player, you may have to check the different possibilities of the DAR with the other players. You have to experiment to find the best solution for your player(s). And remember that I can modify BD3D2MK3D if you need different parameters for the SAR and/or DAR in Half-SBS or Half-T&B modes.

Triple-M
23rd February 2017, 13:32
Between the first use of your software an today, i changed the TV from Sony to Panasonic. Perhaps thats the "Problem"?

r0lZ
23rd February 2017, 13:37
Perhaps, indeed. I don't know if the Panasonic TVs handle the aspect ratios of the 3D movies differently than the vast majority of the players, but that may be the case. Or is it a setting to change that behaviour in the Panasonic TV?

Triple-M
23rd February 2017, 13:43
I don't know what you mean, there is only 3D on/off and Side-by-Side or Top-Bottem as Option. The UHD Player from Panasonic plays the Movie also correct and normal.

r0lZ
23rd February 2017, 14:03
Well, you told me this:
Under the Player MrMC in my Apple TV i can change the Pixel Ratio in the options from 1.00 to 0.50 and then the Movie Looks normal.
Perhaps there is a similar option in the settings of your Panasonic TV. Or something to tell it to always display the 3D movies in full screen (16:9)? That's what my Samsung TV does anyway.

The 3D button on the remote is only used to switch the 3D mode on or off, or to select the correct SBS or T&B mode of movies that are encoded without the right information. (That button should be useless with 3D movies encoded with BD3D2MK3D, because the info is encoded in the MKV file, and should be recognised by a good 3D TV.) Anyway, recognising that a movie is in 3D is not sufficient to display it with the correct aspect ratio. It's why there is perhaps another option somewhere, although I have never seen that in hardware players or 3D TVs. Since your TV seems to be different than the vast majority of the players, it may have that option, but of course, I can't be sure.

Triple-M
23rd February 2017, 14:14
Ok i look but i thing there is nothing. My TV doesn't recognize that a 3D Movie is playing. The Sony does so but the Panasonic not. I have tried 3D or SBS in the filename but the TV doesn't recognize this and switch to 3D. Only when i play a 3D BluRay in the UHD-Player the TV switch to 3D Mode.

Triple-M
23rd February 2017, 20:44
There is no Option in the TV. I tried a little bit more and under the Plex Client the movie is normal hight if i deactivate the subtitle. If i activate the subtitle again, the movie squeezes. Is this a bug in Plex oder a problem with the file i encoded?

r0lZ
23rd February 2017, 21:26
It seems that it's a bug in Plex. Or do you combine full-SBS with half-SBS subtitles?

Triple-M
24th February 2017, 08:26
No i use only half-SBS.

r0lZ
24th February 2017, 09:25
Then it's certainly a Plex bug.

r0lZ
28th February 2017, 10:42
This version contains mainly a relatively important bug fix, and some improvements.
v0.99 (February 28, 2017)
- Bug fix: The filter of the MPLS files to show crashed when comparing the number of 3D-Planes of two MPLS if one of them has no 3D-Plane.
- Added Settings -> MVC Decoder -> Hardware acceleration -> Online list of Intel CPUs supporting QuickSync (hardware acceleration for MVC decoding)
- Improved the paste operations (Control-V) in tab 3: Title & tags, when there are several lines in the clipboard.
- The BD3D2MK3D.log file is now included as an attachment in the final MKV file.
- Tools -> Chapters File Converter can now also load basic files with one timecode per line (tsMuxeR format)
- Updated the Mkvtoolnix exes to the latest version (v9.9.0)
- Updated the x265 exes to the latest version (v2.3+7 or v2.3+9)

Enjoy!

Download: BD3D2MK3D.7z (http://download.videohelp.com/r0lZ/BD3D2AVS/BD3D2MK3D.7z)

r0lZ
4th March 2017, 11:19
Sorry, I've introduced a bug in the last version. This is the fix.
v0.100 (March 3, 2017)
- Bug introduced in v0.99: Error when pasting in some fields of the Title & Tags tab.

Download: BD3D2MK3D.7z (http://download.videohelp.com/r0lZ/BD3D2AVS/BD3D2MK3D.7z)

Araldwenn
10th April 2017, 11:46
Hi,

I'd like to simply convert an MVC bluray to FullSBS, without re-encoding it (well, in fact, I want it to be lossless).
Is BD3D2MK3D the right tool, ans if yes, how should I set it in order to do that ?

robl45
10th April 2017, 12:21
Hi,

I'd like to simply convert an MVC bluray to FullSBS, without re-encoding it (well, in fact, I want it to be lossless).
Is BD3D2MK3D the right tool, ans if yes, how should I tweak it in order to do that ?

I gotta ask why you would want to convert to the least compatible format Of all?

r0lZ
10th April 2017, 13:34
Good question, robl45!

And I add that you cannot make a full-SBS without re-encoding, because the native BD3D format is AVC+MVC (two video streams encoded differently), and the format of Full-SBS is a single stream (with the two views side by side) encoded in pure AVC (or another format such as HEVC). Therefore, no, BD3D2MK3D cannot do that, but what you want cannot be done, with BD3D2MK3D or any other tool.

You can however re-encode with any CRF value, including CRF 0, meaning lossless. But the output file will be MUCH larger than the original BD, and you will probably be unable to store the final MKV on a standard HDD! Is it really what you want?

Note also that with a reasonable CRF value (say around 20), you will probably be unable to see the difference with the original (unless you use comparison tools to highlight the differences). Why do you want to waste disc space for a supposed high quality that your eyes are unable to see?

If you really want to keep the original video streams without re-encoding them, try MakeMKV. It can store the AVC and MVC streams in a single MKV, but only one or two software players are currently able to play the generated video in 3D. And of course, it's not Full-SBS. IMO, that solution is roughly equivalent to doing a backup of the original movie, but without a real possibility to watch it.

Araldwenn
10th April 2017, 13:59
That's the problem. There's no free video player that allows me to read mvc videos (stereoscopic player does it very well, but it's not free). I actually use sView, which works perfectly with full SBS videos, but doesn't work with those made with MakeMKV.
Well, then, I haven't encoded any movie for a long time, and I used to make a 2 pass encoding.
I see there is many other options to choose (CRF, CQ, 2 pass, ABR). Which one should I use to have the best quality with a decent file size, I mean something about 15/20 Gb ?

robl45
10th April 2017, 14:48
Kodi has version that plays mvc as well as mad vr with lav filters through mpc. I been using the latter for months now

That's the problem. There's no free video player that allows me to read mvc videos (stereoscopic player does it very well, but it's not free). I actually use sView, which works perfectly with full SBS videos, but doesn't work with those made with MakeMKV.
Well, then, I haven't encoded any movie for a long time, and I used to make a 2 pass encoding.
I see there is many other options to choose (CRF, CQ, 2 pass, ABR). Which one should I use to have the best quality with a decent file size, I mean something about 15/20 Gb ?

r0lZ
10th April 2017, 15:49
I see there is many other options to choose (CRF, CQ, 2 pass, ABR). Which one should I use to have the best quality with a decent file size, I mean something about 15/20 Gb ?Personally, I prefer CRF, that gives ALWAYS a better result than 2-pass for the same global bitrate. But with CRF, it is not easy to predict (even approximately) the resulting file size, because it compresses much more the "easy" movies such as the Pixar films in computer graphics than the "difficult" ones like the live action films of the 80's, or the old 3D movies of the 50's with much noise. That's normal, because CRF adapts automatically its compression to the image, something that doesn't do 2-pass or, of course, ABR (= 1-pass). CRF is also better than CQ because it compresses more the blurred part of the images with fast action (motion blur), because it is impossible for the human eye to distinguish the loss of quality in moving images (unless you press the pause button, of course). It has therefore more bitrate to spend for the slow or static images, where small defects are more visible. CRF is therefore the more intelligent way to encode a video, and I don't understand why peoples continue to use 2-pass. (2-pass should be used ONLY when the final file size must be precisely controlled, like when you encode to put the movie on a DVD.)

The CRF value to use is another question. IMO, the default value of 23 is a good compromise between quality and disc space, but I prefer to use 20 for movies where the image quality matters much (like Sin City 2). However, even with CRF 20, you will never obtain a 20GB file. That's way too high IMO. Don't forget that the huge file sizes of the commercial BDs are so high simply for commercial reasons. A movie (with 1 AC3 audio stream) can be perfectly encoded with 4 to 8 GB, depending of the "difficulty" to encode it and its length. More than 10 GB is IMO total nonsense. You cannot see the difference with the same movie encoded at 8 or even 6 GB. Try it. Encode two movies with, say, CRF 20 and CRF 12, and ask a friend to show you both of them in random order. I'm sure you will not see what is what.

Anyway, you are free to use any CRF value. It is often explained that subtracting 3 to the CRF value has roughly the effect of doubling the size of the video stream. It's not really accurate, but take that in mind when you will try different values. (So, for example, CRF 10 may produce a video stream about 10 times larger than CRF 20, for an almost imperceptible visual improvement. But similarly, using CRF 26 may produce a really bad quality.)

Trust your eyes ONLY, and don't try to encode at a specific bitrate.

And, to reply to your initial question, if you re-encode in Full-SBS, then BD3D2MK3D is the tool to use! ;-)

Araldwenn
10th April 2017, 16:52
Thanks a lot for your clear answer :thanks:

And what about presets and tune ? Do they have a big impact on encoding ? I've got a decent CPU (i7 3930k @4.6 Ghz).

r0lZ
11th April 2017, 08:42
I don't use the tune (except sometimes PSNR or SSIM, when I want to measure the quality of the encoding). IMO, they are useless and often misleading. But I'm not an expert in encoding. Perhaps some of them are really useful in specific circumstances.

The presets have a big incidence on the quality and file size (and on the time necessary for the encoding). It is not easy to understand exactly what they do, because they change a lot of internal settings, and without knowing what settings are modified and how, and without knowing the specific advantages of each of these settings, selecting a different preset is mainly a blind operation. But it is clear that globally, choosing a slower preset compresses more for a quality approximately equivalent. But with the slower, very slow or placebo presets, I have noticed that my TV has some trouble when it decodes some sequences, and the playback may become somewhat jerky. For that reason, I prefer to use the slow preset. Placebo is also extremely slow, even with a powerful CPU! (If you encode in h265, all presets are also much slower!)

Note also that changing the preset may (and will) modify the level (if you don't force it). My TV doesn't support a level greater than 4.2, and if I use a slow preset, I need also to force the level to 4.1 or 4.2. Of course, if the level is restricted, the settings of the preset are modified and you cannot take advantage of its full power. It's another reason to not use a too slow preset. (Level 4.1 is the level used on the blu-ray discs, and is therefore well supported by the vast majority of the hardware players. Levels 5.0 and greater are for the ultra-HD resolutions and full-SBS or full-T&B. Of course, if you encode in Full-SBS, you will need at least level 5.0, and therefore you can use a very slow preset. But be sure that your hardware supports it!)

You can also specify specific settings in the "additional options" field, to modify the default settings of the selected preset and build your own preset. But that requires much knowledge, and if you are really interested in experimenting with the x264 options, I suggest to join the x264 encoding forum. Personally, I trust the authors of the x264 encoder, and I use the presets without trying to modify them much.

Sharc
11th April 2017, 09:51
.... But with the slower, very slow or placebo presets, I have noticed that my TV has some trouble when it decodes some sequences, and the playback may become somewhat jerky. For that reason, I prefer to use the slow preset....
Just a sidenote: In my experience it is good practice to add --bluray-compat to the x264 commandline. It may overwrite some of the more stringent settings of the --preset selection with more relaxed settings, but it definitely reduces the risk of playback issues.

r0lZ
11th April 2017, 10:43
Yes, I agree, although I don't use that option. And, of course, it is not compatible with Full-SBS, that cannot be encoded in level 4.1 and therefore cannot be BD compatible.

BTW, BD3D2MK3D has the option "BD compatible" that just enforces that --bluray-compat option (and disables some other incompatible options). Of course, that option is not available if you encode with x265, because HEVC is not BD compatible anyway.

tebasuna51
11th April 2017, 12:30
About x264 Presets, etc.

I don't use the tune... Perhaps some of them are really useful in specific circumstances.

--tune film
Equivalent to --deblock -1:-1 --psy-rd 1.0:0.15
Can improve the quality with a little more bitrate needed.
Recommended for dark movies or with flat colours.

The presets... globally, choosing a slower preset compresses more for a quality approximately equivalent.

That is true. Here is a table with the more important parameters changed by presets:
defect
Param./Preset medium slow slower veryslow placebo
-------------- -------- -------- -------- -------- -------
bframes 3 - - 8 16
ref 3 5 8 16 16
b-adapt 1 (fast) - 2 (optim) 2 2
direct spatial auto auto auto auto
me hex - umh umh tesa
merange 16 - - 24 24
subme 7 8 9 10 10
trellis 1 (on MB) 2 (on all) 2 2 2
rc-lookahead 40 50 60 60 60
partitions def.(113) - all (133) all all
no-fast-pskip - - - - yes
slow-firstpass no - - - yes

The two first (B-frames and Ref-frames) are important in order to player compatibility. See the Level after.

The rest improve the source analysis and reduce bitrate (not much) for the same quality CRF selected. The cost is increasing the encoder time.

But with the slower, very slow or placebo presets, I have noticed that my TV has some trouble when it decodes some sequences, ... My TV doesn't support a level greater than 4.2

Even some TV's or cheap standalone players are only certified for DivX Plus with Level 4.0 and max B-frames 3 like big limitations.

In order to understand the problem read the Levels and Decoded picture buffering parts in https://en.wikipedia.org/wiki/H.264/MPEG-4_AVC

You can see than in 4.0, 4.1 or 4.2 the max Ref-frames for a full 1920x1080 image is 4. For a cropped image 1920x800 you can use maybe 5 Ref-frames but not more.

Then the Slow Preset is in the limit about this, and is recommended the parameter --level 4.1 (or 4.0 or 4.2 at your choice) to limit x264 about vbv_bufsize (also limit vbv_maxrate but is not a problem normally with CRF 20).

If you want use a *slow* preset don't forget limit B and Ref frames or use the --level parameter.

tebasuna51
11th April 2017, 12:52
Yes, I agree, although I don't use that option. And, of course, it is not compatible with Full-SBS, that cannot be encoded in level 4.1 and therefore cannot be BD compatible.

What is the problem for --level 4.1?

AFAIK the parameters needed to use the h264 to burn a BD are:
--weightp 0 --bframes 3 --nal-hrd vbr --vbv-maxrate 40000 --vbv-bufsize 30000 --level 4.1 --keyint 24 --b-pyramid strict --slices 4 --aud

Where:
--weightp 0 --nal-hrd vbr --keyint 24 --b-pyramid strict --slices 4 --aud

are not needed for standard mkv players.

Sharc
11th April 2017, 13:25
What is the problem for --level 4.1?

AFAIK the width of full-SBS (2x1920) exceeds level 4.1 specification.

tebasuna51
11th April 2017, 13:32
Ok. I don't see the 'full' (2x1920)

r0lZ
11th April 2017, 13:46
If you want use a *slow* preset don't forget limit B and Ref frames or use the --level parameter.
The problem with the --level parameter (in clear builds of x264) is that it does ABSOLUTELY NOTHING, except flagging the stream with the specified level. It doesn't reduce the bitrate or the buffer size. IMO, it's a huge bug in the design of x264, but some users or programmers wanted to be able to flag the video stream with an inexact level! Really bizarre (or can I say stupid?) decision! Especially because the documentation and the output of the --full-help argument doesn't specify that, and is therefore totally misleading.

So, if you want to really change the level, you have to specify the --level AND the corresponding --vbv-bufsize and --vbv-maxrate parameters, and of course you must know the values for these parameters. It is NOT sufficient to specify the level alone. There are builds made by smart peoples with that bug fixed, but they are not always easy to find, and sometimes outdated. But if you use BD3D2MK3D, you don't have to worry, because it specifies the required parameters automatically if you force a specific level.

r0lZ
11th April 2017, 13:48
What is the problem for --level 4.1?In Full-SBS or Full-T&B, the image is twice as large as the standard HD image, and requires larger buffers. Therefore, level 4.1 is not sufficient, due to the limitation of the buffer size.

[EDIT] Sorry, I've replied before I've read the reply by Sharc. He is right.

frank
18th April 2017, 16:35
If you convert a chapter.xml (mkvtoolnix) into ogm then you get after decimal point a mismatch of 0 in some cases.

Example for chapter 02:
<ChapterTimeStart>00:00:10.040000000</ChapterTimeStart>

result is
CHAPTER02=00:00:10.004

and not
CHAPTER02=00:00:10.040

BTW: Please correct the version number in your first post to v0.100.

r0lZ
19th April 2017, 09:38
Right, as always! Thanks, Frank!
Here is the fix, as well as a few other little fixes.

With this version, I have decided to abandon the 0.XXX series, and go officially to v1.0. IMO, BD3D2MK3D is now stable enough (although there will probably be still some hidden bugs to fix), and I don't think I'll add important new features.

v1.0 (April 19, 2017)
- The 2D Playlists window is now closed when the main job starts
- Fixed the bug when pasting in Actors field of the Title & Tags tab: An additional \n was added
- Small improvements in the Title & Tags tab.
- Bug in Chapters file converter: The decimal part of the time code was sometimes wrong when converting from a Matroska XML chapter file. Thanks Frank!
- Updated ImageMagick's convert.exe to the latest version (v7.0.5-4)
- Updated the Mkvtoolnix exes to the latest version (v10.0.0)
- Updated libdcadec.dll (part of eac3to) to the latest version (v0.2.0)
- Updated the x265 exes to the latest version (v2.3+32)

As always, you can download BD3D2MK3D here: BD3D2MK3D.7z (http://download.videohelp.com/r0lZ/BD3D2AVS/BD3D2MK3D.7z)

frank
20th April 2017, 04:17
Well done. Many thanks! :)

Don't forget updating version number...

r0lZ
20th April 2017, 08:29
Don't forget updating version number...Done. :rolleyes:

o0okaro0o
8th June 2017, 19:46
Hi, I was wondering if you could port BD3D2MK3D to x64 or at least the dlls loadhelper.dll, DGMVCDecode.dll and libmfxsw32.dll so we could use it in an x64 environment.
Thanks for your time.

r0lZ
9th June 2017, 09:23
Welcome to the Doom9 forums, o0okaro0o!

Well, it is already possible to use x264 or x265 64-bit during the encoding process, thanks to avs2yuv.exe. See the "Use 64-bit x264/x265..." option in the last tab to enable that feature. (It should be enabled by default if BD3D2MK3D has correctly detected your 64-bit CPU.)

The fact that BD3D2MK3D itself is a 32-bit app is not a brake. BD3D2MK3D is used only to demux the original streams and prepare a few files, and that doesn't require much CPU power. The speed of the disc is the only real brake during the preparation of the project. (I agree however that it should be possible to speed up the encoding of the subtitles to 3D and the conversion of the audio streams to AC3 or AAC with 64-bit version of the tools used during that conversions, but honestly, I don't think that the time spent during that conversions is really important.)

It is true that it is not possible to use avisynth 64-bit to convert the original MVC video stream to SBS, T&B or FS. It's mainly because the two MVC decoders that BD3D2MK3D can use are 32-bit avisynth filters and I haven't programmed them myself. But it's also because after having made some tests, I don't think that it will be possible to really speed up the decoding process with avisynth 64-bit. Note also that all 64-bit versions of avisynth are still somewhat unstable (and unofficial), and honestly I don't want to have to add workarounds for the problems that will certainly occur. The 32-bit avisynth works perfectly and is fast enough, given the fact that it's mainly the x264 or x265 encoder that requires much CPU power.

If you really want to decode faster, be sure to use a computer with an Intel CPU supporting QuickSync (https://ark.intel.com/Search/FeatureFilter?productType=processors&QuickSyncVideo=true) and install the latest Intel drivers. And of course, tick the "Use 64-bit x264" option in the last tab. But you will be probably disappointed. The speed gain is marginal.

Note also that the libmfxsw32.dll included with BD3D2MK3D is used only if you don't have an Intel CPU with QuickSync or if the Intel drivers are not properly installed. When QuickSync is available, it's the libmfxsw32.dll included with the Intel drivers that is used, and that version uses the full power of the CPU and QuickSync. It is not the responsibility of BD3D2MK3D to install or distribute the hardware dependent version of libmfxsw32.dll.

Sorry, but I will not modify BD3D2MK3D to use avisynth 64-bit or other 64-bit external tools for a very minimal speed increase but with a great risk of instability. And anyway, currently, it's not possible, since the avisynth filters needed and a lot of external tools are 32-bit only.

o0okaro0o
9th June 2017, 10:34
thanks r0lZ fo asnwering.
I just wanted to import the __ENCODE_3D_MOVIE.avs into megui to do the encoding from there but since I use the x64 and avisynth x64, I cannot import it because the dlls are x86 only.
I was just wondering if it was possible but don´t worry, I´ll carry on doing like I used to.
Thanks for your time and your great work.

tebasuna51
9th June 2017, 10:50
In my test recoding video I obtain a speed gain of 14% when I use a full chain 64 bits over a chain 32 bits.
Of course when I have all plugins needed in the 2 versions.

Most of this gain (9%) is due to the encoder, than is already a selection in BD3D2MK3D.

Then only a 5% of speed gain may be possible if we have all the components at 64 bits, but here is not possible like r0lZ say.

r0lZ
9th June 2017, 11:10
I just wanted to import the __ENCODE_3D_MOVIE.avs into megui to do the encoding from there but since I use the x64 and avisynth x64, I cannot import it because the dlls are x86 only.
I'm not familiar with megui, but perhaps there is an option to use the 32-bit avisynth?

And anyway, I wonder what is the advantage of using megui to encode the avs script. You may have more x264/x265 options available than in BD3D2MK3D, but remember that you can add your own options in the Additional options field of the last tab of BD3D2MK3D.

Thanks for your thanks! ;-)

@tebasuna51: Thanks for your benchmark results. That confirms my approximative measurements.

frank
21st June 2017, 14:04
For users with NVIDIA graphics here some news:
You really can speed-up the encoding process with ffmpeg.exe and hardware encoding! Quality is now very good.

- Copy latest ffmpeg.exe (v3.3.1 32bit Zeranoe) into B3D2MK3D's toolset folder.
- Edit the generated __ENCODE_3D:
...
ffmpeg.exe -loglevel info -i "__ENCODE_3D_MOVIE.avs" ^
-c:v h264_nvenc -profile:v high -level 4.0 ^
-maxrate 15M -bufsize 15M -b:v 15M -cq 25 ^
-g 48 -bf 3 -rc vbr -rc-lookahead 20 -spatial-aq 1 -bluray-compat 1 ^
-color_primaries bt709 -colorspace bt709 -color_trc bt709 ^
-c:a copy -frames:v nnnnn ^
-metadata Title="movietitle 3D" ^
"00xxx_3D.264" -y
The NVIDIA hw encoder cannot place the frame-packing info into the stream. But the mkv muxer makes the stereo-mode entry and it works in 3D.
You will get about 100 fps!!! (Previously only 24 fps)
Have fun!
_____________
Dell XPS 15 9560, i7-7700HQ, GFX630, GTX1050, Toshiba NVMe SSD 256GB, Win10 Pro

r0lZ
21st June 2017, 14:12
Thanks for the info. Maybe I'll implement that in a future version, but honestly, I'm not sure.

tomilein
27th June 2017, 08:39
Hello, i use BD3D2MK3D -V1.0 for a 3d BluRay and the Programm works great.

I have one Question.

I will cutting and joining the 3D Movie, how i do that?

What I have to change or add in the__ENCODE_3D_MOVIE.avs?

Cutframes are (339, 161707) + (165006, 166805).

Opening credits, final credits i will cut this.

But after the final Credits come another 3 minutes of the 3D Movie.

I will merge the 3 Minutes to the main film without final credits.

Thanks and sorry for my bad Englisch.

r0lZ
27th June 2017, 10:21
It is difficult, if not impossible, to cut the movie before encoding it, because the MVC decoders do not support seeking. You MUST therefore encode everything. (The only thing that you can easily do is limit the total number of frames, and therefore cut the end of the movie, but you cannot easily cut something in the middle during the encoding to 3D-SBS or T&B.) Furthermore, you have to cut the audio, subtitles and chapters too, so cutting the video is not sufficient.

IMO, the easiest way to cut the movie at more or less precise points is the split feature of MkvMerge. Here is the explanation of the method. Since you know already the frame numbers where the movie must be cut, I will not explain how to find them.


Begin by creating a BD3D2MK3D project for your movie. Do not encode it immediately.

Here, you should determine exactly the frame numbers and time codes of the parts you want to cut. You know them already.

Edit the file "chapters_3D.qpfile" (in the project directory) with notepad. That file contains the frame numbers of the beginnings of all chapters. Verify if the frame numbers of your cut points are in that file, and if it's not the case, add them at the right places, followed by a space and the letter i in upper case. (The frame numbers must be in increasing order, one per line!) This will force x264 to create an I-frame at the specified frames. Since you can cut the video only at i-frames, it's important for precise cut points. But as I wrote above, you can omit this part, and hope that the final cut points will be approximately where you want them, if you don't know the exact frame numbers.

You can now encode the 3D movie normally by launching __ENCODE_3D_LAUNCHER.cmd as usual. The whole movie will be encoded, and the complete MKV will be created.

When the final 3D MKV has been created, open it in the MkvToolnix GUI (https://mkvtoolnix.download/downloads.html#windows). Go to the Multiplexer -> Output tab, and enable Splitting by selecting the split mode "After specific timecodes". In the Timecodes field, adds the timecodes of your cut points, separated by comas. You need the time codes here, not the frame numbers! But you can compute them easily by dividing the frame numbers by 24/1.001. There are several syntax for the time codes, but usually I prefer to specify them as a number of ms. In your case, you can use: 14139ms,6744529ms,6882125ms,6957158ms . Leave the Maximum number of files to "Unlimited".

Then, remux the MKV by clicking the "Start multiplexing" button. Several MKV files will be created.

When it's finished, play each file to verify if the cut points are at the right positions, and delete the parts you don't need (the credits). If some cut points are not perfect, you can try to change slightly the time codes and go back to step 5, but if you have not specified the I frames of the cut points in the qpfile, you may not be able to cut exactly where you want.

Finally, relaunch MkvToolnixGUI, and drag and drop the first part of the movie on its window. Then, drag and drop the second part, and when prompted, select the option "append to an existing source frame". Do this for all parts that must be present in the final MKV.

When all parts you want to keep have been added that way, change the output file name, and launch the multiplexing. The final file will be created, with only the parts you want.

That seems complex, but in fact, it's really simple, and IMO it's the best way to do what you want. There may be other methods (such as using commercial programs like VideoReDo (http://www.videoredo.com/en/index.htm)) but they are not free or not as precise as the method I've explained here.

Good luck!

tebasuna51
27th June 2017, 11:55
5. When the final 3D MKV has been created, open it in the MkvToolnix GUI. Go to the Multiplexer -> Output tab, and enable Splitting by selecting the split mode "After specific timecodes". In the Timecodes field, adds the timecodes of your cut points, separated by comas. You need the time codes here, not the frame numbers! But you can compute them easily by dividing the frame numbers by 24/1.001. There are several syntax for the time codes, but usually I prefer to specify them as a number of ms. In your case, you can use: 14139ms,6744529ms,6882125ms,6957158ms . Leave the Maximum number of files to "Unlimited".

There are also the split mode "By parts based in timecodes" and, with the following sintax, you obtain a single output file already joined:

14139ms-6744571ms,+6882125ms-6957200ms

If your desired cut is in avs Trim() format the last frame is also included, and the ms cut must include it.

r0lZ
27th June 2017, 13:07
I didn't know that possibility. It's great! Thanks!

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.

Tenker
29th September 2017, 13:10
Thank you rOIZ ,

__ENCODE_3D_LAUNCHER.cmd started unsuccessfully

https://www2.pic-upload.de/thumb/34000849/Image4.jpg (https://www.pic-upload.de/view-34000849/Image4.jpg.html)

I start to test CRF encoding mode with automatic "__ENCODE_3D_LAUNCHER.cmd" start and reports.


EDIT 15:48

unfortunately the same result
The file 00098_3D.264 is only 13.368 KB large and black content.

https://www2.pic-upload.de/thumb/34001268/Image5.jpg (https://www.pic-upload.de/view-34001268/Image5.jpg.html)

r0lZ
29th September 2017, 16:42
Damn! That's strange. Are you sure the BD has been correctly decrypted?

frank
30th September 2017, 16:55
The same error with Wonder Woman here on my Dell XPS 9560. dgMVCSource (deleted: and FRIMSource) decode black frames in HW-mode (Intel CPU).
Use software mode, that works. (You have to edit __ENCODE_3D_MOVIE.avs to force SW mode. Standard is auto -> selects HW mode on Intel machines -> error)
AFAIK I also had this issue with The Martian 3D.

Tenker
1st October 2017, 11:17
@frank

I changed the "__ENCODE_3D_MOVIE.avs" accordingly, unfortunately also without success.


...
LoadPlugin("D:\!_Video\BD3D2MK3D\toolset\LoadHelper.dll")
LoadPlugin("DGMVCDecode.dll")
#LoadPlugin("FRIMSource.dll")

#LoadPlugin("VSFilter.dll")
##LoadPlugin("SupTitle.dll")

# Load the two video streams (203220 frames per stream)
interleaved = DGMVCSource("00098.track_4113.264", "00098.track_4114.mvc", view = 0, frames = 203220, mode = "hw") # Old syntax for mode: hw = 0
#interleaved = FRIMSource("mvc", "00098.track_4113.264", "00098.track_4114.mvc", num_frames = 203220, cache = 2, platform = "")
# Current base view: left eye.
# The views are in the common order: AVC stream = left view, MVC stream = right view.
left = SelectEven(interleaved)
right = SelectOdd(interleaved)

# Build Side-by-Side stream
StackHorizontal(HorizontalReduceBy2(Left), HorizontalReduceBy2(Right))
AssumeFPS("ntsc_film")

# Hardcode subtitles
#VobSub(".sub")
##SupTitle(".sup")

# Return the 3D clip.
Return(last)#.Info()


https://www2.pic-upload.de/thumb/34011010/Image6.jpg (https://www.pic-upload.de/view-34011010/Image6.jpg.html)


@rOIZ
I have sent the one PN ...

frank
1st October 2017, 12:34
Oh, man

mode="sw"

is the SW mode!!

frank
1st October 2017, 13:50
After new tests with Wonder Woman I have managed to start the encoding with FRIMSource decoder in HW mode. (platform = "hw")

But I needed several attempts to start. Something goes wrong with Intel drivers...
After successfully start of encoding the speed increased by 6 fps to 36 fps and the results are ok.

___________________
Win 10 Pro 64 bit v1703

von Suppé
2nd October 2017, 10:34
...you can try to replace BDSup2Sub.jar with the fork developed by...
I haven't replaced the .jar file but just used the enhanced fork manually. Damn. Thinking I'd be sure enough.
When exporting SUP to XML_PNG, BDSup2Sub Enhanced 0.0.9 changes timecodes. My subs got out of sync. I found out that clicking the "Reset" button (FPS Target going to 23.976) was not enough to do it right (in BDSup2Sub 5.1.2 it always worked).

I reminded a way (like ages ago) to solve easySUP's 24fps bug with BDSup2Sub. After a quick test I realized that you have to tick "Change frame rate" and then set both FPS Source and FPS Target to 23.976. It somehow forces the right timecodes then and output will be in sync with input.

Strange to experience that I have to do the same now in the enhanced fork. It's absolutely tricky and something to keep a sharp eye on.

Tenker
2nd October 2017, 12:38
@frank

Thanks, with FRIMSource decoder runs also without platform = "hw"

https://www2.pic-upload.de/thumb/34017868/Image7.jpg (https://www.pic-upload.de/view-34017868/Image7.jpg.html)

r0lZ
2nd October 2017, 14:09
So, it seems that FRIMSource is definitively better than DGMVCDecode. Should I set FRIM as the default MVC decoder in BD3D2MK3D?

r0lZ
2nd October 2017, 14:13
I haven't replaced the .jar file but just used the enhanced fork manually. Damn. Thinking I'd be sure enough.
When exporting SUP to XML_PNG, BDSup2Sub Enhanced 0.0.9 changes timecodes. My subs got out of sync. I found out that clicking the "Reset" button (FPS Target going to 23.976) was not enough to do it right (in BDSup2Sub 5.1.2 it always worked).

I reminded a way (like ages ago) to solve easySUP's 24fps bug with BDSup2Sub. After a quick test I realized that you have to tick "Change frame rate" and then set both FPS Source and FPS Target to 23.976. It somehow forces the right timecodes then and output will be in sync with input.

Strange to experience that I have to do the same now in the enhanced fork. It's absolutely tricky and something to keep a sharp eye on.
It's a well known bug of BDSup2Sub (old, new and ++ versions). I have reported it to the author of the recent fork, but he don't understand that it's really a bug, and he has rejected my request to fix it. Perhaps you will have more chance to convince him that there is indeed something totally abnormal? See this post (https://forum.doom9.org/showthread.php?p=1812419#post1812419) and the following in the BDSup2Sub thread for more info.

Tenker
2nd October 2017, 14:51
So, it seems that FRIMSource is definitively better than DGMVCDecode. Should I set FRIM as the default MVC decoder in BD3D2MK3D?

From my present experience, I say YES
:thanks:

frank
3rd October 2017, 12:16
So, it seems that FRIMSource is definitively better than DGMVCDecode. Should I set FRIM as the default MVC decoder in BD3D2MK3D?Better? Only very few BD's have this issue (I only know 2). FRIMSource is compiled with latest Intel Media SDK 2017 but doesn't start reliably on that BD's in HW mode. The culprit is Intel. User can set SW mode.
In the past I preferred DGMVCSource because it was a little bit faster (on my old machine). Now they are probably equally fast.

von Suppé
4th October 2017, 05:36
See this post (https://forum.doom9.org/showthread.php?p=1812419#post1812419) and the following in the BDSup2Sub thread for more info.
Will do. I'm gonna read that whole thread btw.

r0lZ
7th October 2017, 14:13
This version is mainly an update of the third-party tools. It has also some little improvements and bug fixes.

Unfortunately, I am not able to understand what's wrong with some versions of the Wonder Woman 3DBD, so there is no fix for that problem. Anyway, I don't think there is something wrong in BD3D2MK3D itself. The problem comes probably from the BD itself, or from x264.

v1.2 (October 7, 2017)
- Updated FRIMSource to the latest version (v1.27). It should work correctly. Let me know if you experience crashes.
- FRIMSource is now the default MVC decoder.
- Removed the LoadHelper() trick and added the full paths in the LoadPlugin() commands for compatibility with some Avisynth forks.
- Added tab 3 -> Web -> Search TCM for title.
- Adapted to the new distribution of x265 as a single exe file instead of the previous 3 exes (one for each color depth).
- Fix: Workaround for the wrong character encoding of the AVS and CMD scripts.
- Fix: The path to java.exe was not correctly detected in some circumstances.
- Fix: Some typos.
- Updated x265 to the latest version (v2.5+8)
- Updated the Mkvtoolnix exes to the latest version (v16.0.0)


Please note that the way x265 is distributed has changed. Previously, a different exe was available for each color depth (8, 10 or 12-bit). And, of course, it was necessary to have a different version for the two CPU architectures (32 and 64-bit). That gave a total of 6 different exe files just for x265. Now, all color depths are available with the same unified exe, and therefore only two different exes are still necessary. I have adapted BD3D2MK3D to reflect that change. So, if you update BD3D2MK3D simply by overwriting the files in the BD3B2MK3D installation folder with the content of the new 7Z archive, you can safely delete the previous versions of the x265 exes. They are not needed any more.

The distribution of x264 has not changed, and there are still 4 different exes for the 2 color depths and 2 CPU architectures. The x26*.exe files to keep in the toolset folder are therefore:

x264_8bit_x64.exe
x264_8bit_x86.exe
x264_10bit_x64.exe
x264_10bit_x86.exe
x265_x64.exe
x265_x86.exe

frank
8th October 2017, 19:26
You should link to x265 builds for Windows (http://msystem.waw.pl/x265/).
Latest x265 build is 2.5+25 and latest stable build is 2.5 +5.
Compiled with VS 2017 or GCC 7.2.

r0lZ
9th October 2017, 11:23
Thanks for the info, but I'm not sure that builds are "better" than others. Unfortunately, there is no coherent information about what release or build to use, and a site that offers good and recent builds can be outdated one or two months later (like this one (http://x265.ru/en/builds/), that was linked by BD3D2MK3D previously, and that is now completely outdated).
But I agree that your link seems good (although somewhat confusing for the newbie). I will try it, and if it is confirmed that it is updated regularly, it will be the "official" download site for BD3D2MK3D, and I will include the latest stable/GCC/none/multi-color-depth builds in the toolset.

Luckily, things are more straightforward for x264. Do you think I should link to the same site for x264 too, or should I keep komisar (http://komisar.gin.by) (clear builds)?

frank
10th October 2017, 10:34
I have the link from videohelp https://www.videohelp.com/software/x265-Encoder
and it is very up-to-date. You can read the version history.
In my case (Kaby Lake) I prefer the AVX2 VS2017 binary (C++ with ASM parts), because I have a feeling it is faster. I use x265 10 bit with my UHD encodings. On UHD BD they dropped the 3D support. :(

I havn't tested the x264 binaries yet from that site. In the past komisar's binaries were a good choice.

frank
10th October 2017, 11:00
I have repeated the BD3D2MK3D test with The Martian 3D.
Sorry, neither FRIM nor DGMVC work in hw mode with this movie. :scared:
Only endless loop that can be interrupted.

r0lZ
10th October 2017, 12:43
Damn! That's really strange. I have never has any problem, including with Wonder Woman and The Martian.
Of course, it is extremely difficult for me to fix a bug that I cannot reproduce and that occurs in a decoder that I have not written myself.
The only thing that I can do is to configure the MVC decoder in software mode by default. But it's a pity for the users lucky enough to have an Intel CPU supporting the hardware mode.
And I can add a red warning here. (DONE)

Thanks for the x265 link at Videohelp. Since the home of PgcEdit is already at VideoHelp, I think I will definitively adopt it. But it's only a redirection to http://msystem.waw.pl/x265/ and https://builds.x265.eu, so I don't think that it's more useful that linking directly to that sites. At least, I don't have to take care myself of the out of date sites. And, for coherence, I have decided to adopt the VideoHelp link for h264 (https://www.videohelp.com/software/x264-Encoder) too.

r0lZ
10th October 2017, 13:08
If you experience problems when decoding a 3DBD with BD3D2MK3D, such as black frames at the end of during the whole movie or infinite loops, please configure the MVC decoder to use SOFTWARE mode instead of hardware or automatic.
Select Settings -> MVC Decoder -> Hardware Acceleration -> Software (use if Auto crashes)

And please report here if you have had that kind of problems, with what movie and if using the software mode has solved the problem.

(If you are interested, that problem has been reported for the first time here (https://forum.doom9.org/showthread.php?p=1820011#post1820011).)

fszecsei
11th October 2017, 11:08
Hello r0IZ,

I am using this tool since 2016; fully satisfied and impressed. It is GREAT!!

Now, Norton Security reported a risk with _ENCODE_3D_LAUNCHER: “blocksleep.exe contained Heur.AdvML.B”. It seems, the heuristic algorithm has been updated in Norton recently…

I instructed my Norton Security to release blocksleep.exe from quarantine. No weird symptoms detected up to now.
However, might be this exe really dangerous?

r0lZ
11th October 2017, 12:05
Thanks for your kind words and welcome to the Doom9 forums, fszecsei.

__ENCODE_3D_LAUNCHER.cmd and blocksleep.exe have been added when I have received complains of some users about encoding problems. Blockssleep has been written by Slavanap and officially released here (https://forum.doom9.org/showthread.php?p=1752513#post1752513). As you can see, it is open source.

As its name suggests, blocksleep.exe is used to prevent Windows from going to sleep mode during an encoding. It is used by __ENCODE_3D_LAUNCHER.cmd to launch __ENCODE_3D.cmd. It doesn't do anything by itself. It just sets a flag telling the system to not go to sleep mode while __ENCODE_3D.cmd is running. Without that, most laptops and some desktop PCs go normally to sleep mode after some time, and of course the encoding stops. It has also been reported several times that x264 has often some trouble to continue the encoding when the laptop wakes up, and that can result in a damaged or incomplete video stream.

I don't know why Norton considers blocksleep as dangerous. Perhaps it's because it is designed to launch other exes or batch files? Anyway, it's a false positive. You can even delete it if you wish, and launch __ENCODE_3D.cmd directly, if your PC uses a power plan with sleep mode disabled, or if you accept to take the risk of a bad encoding. (Note that __ENCODE_3D_LAUNCHER changes also the priority of the _ENCODE_3D process to low, so that you can still use your PC to do other things with a reasonable speed when the encoding is in progress, but it's not absolutely necessary.)

Finally, as an evidence that blocksleep is harmless, have a look at its VirusTotal report (https://www.virustotal.com/en/file/644b19d2e0b77bc6fc3f19a8f7d7eb2b7fce5c2b1713c0cc809ea088682c61eb/analysis/). It has a score of 1/63, and only Cylance (an obscure antivirus) flags it as unsafe (and unsafe doesn't mean infected).

fszecsei
11th October 2017, 13:26
r0IZ,

Many thanks for the detailed explanation; fully understood. :)

konikpolny
8th November 2017, 16:42
Hi r0lZ,
I found some bugs/shortcomings in the "convert SRT to ASS 3D" tool:

1)
color restore after a color change should be simply {\c} rather than quoting the default color literally. \c is shorter, cleaner and more obvious. According to ASS specs override code (like \c) without any parameter is defaulting to 0 meaning it's already given the default value.
2)
substitution for "<font color=" may not always work as SRT also supports changing Font face, so 'font' doesn't always refer to a color change only. MOreover, to complicate it a bit more it can have the 2 attributes - color and fontname at the same time like:
<font face="Times New Roman" color="#a38c22">
The font name change tag for ASS is \fn followed immediately by the Font Name like {\fnTimes New Roman} and should be closed with {\fn}.
In case for having both color and font name change, the ASS override can be within one set of braces eg.: {\fnTimes New Roman\c&H228ca3&} and closed with {\fn\c} (the order of the tags is not important and may not be in the same order as for the opening override)

Do you think you can add support for the font name change?

By the way what language is SRTtoASS3D.tcl written in?


Oh, and there's another thing I wanted to bring up for some time now. BD3D2MK3D opens to the last saved state and if it was using for instance 10bit color encoding or Full SBS/T&B stereoscopy it always displays the warnings. It would be great if we could have a checkbox at the bottom of the dialogues to tick to acknowledge reading the warning and so not to display the warnings any more. Having that we could also have an option somewhere to reset the warnings settings to make them appear again.

r0lZ
8th November 2017, 18:06
Well, I don't use the ASS format myself. I have written the SRTtoASS3D function for a specific user, and also because it was a nice challenge to convert simple SRT files to ASS with the correct 3D depths.

OK for point 1. It is easy to implement the modification yourself (in case you are in a hurry). Just edit line 1147 of SRTtoASS3D.tcl and change it from set restorecolor "{\\c&H[SrtColorToAssCode $color]&}" to set restorecolor "{\\c}"

Indeed, it's a simpler syntax. I did not know it, as I have simply analysed a couple of ASS files to understand the syntax, but I have never studied that format.

I will try to fix the problem described in point 2, although I have never seen a SRT file with a font change (other than its color, and even that is extremely rare). I agree that the color change in a SRT may be missed if it follows a font name change, but it's so rarely the case that I don't think it's really a problem. After all, almost all SRT files have no formatting at all, and when they have some kind of formatting, it's usually limited to italics. But I will do it anyway.

I'm not sure I can easily change the font name. Not because writing the code is difficult, but because usually the font type or name is not specified at all in the original SRT, and above all because if it is specified, I cannot be sure that the same font exists in the computer, TV or player that will be used to play the final MKV. Can I simply copy the font name from the SRT and insert it in the ASS, with the risk of specifying a font that the player can't use? Perhaps the player may even crash.

Also, I don't understand why I should implement the font name change, but not the font size. Is it because the SRT format doesn't permit to change the font size? And anyway, the font size is dependent of the font, and the user should select the right size according to the "XML guide file" and the font he has selected in the GUI (as you can see when you use the Analyse the subtitle guide option). If the font (name or size) changes in the middle of the stream and if the resulting subtitle is too large, the 3D depth may not be suitable any more, because the subtitle may enter into the objects in the foreground. Don't forget that this tool converts the SRT to 3D, not simply to ASS, and that introduces some difficulties. So, to reply to your question, I'm not sure I will implement the font changes, but I will certainly fix the possible bug with the font color.

SRTtoASS3D.tcl is written in Tcl/Tk (https://www.tcl.tk). TCL (https://en.wikipedia.org/wiki/Tcl) is the main programming language, and TK the ToolKit that has motivated me to use that language to code most parts of BD3D2MK3D. It's an interpreted language, somewhat slow, but TK is very powerful to build complex GUIs, and since BD3D2MK3D is essentially a GUI, IMO Tcl/Tk was a good choice.

I agree that the warnings about the color depth or the Full stereoscopy should not be displayed each time BD3D2MK3D starts, but I can't change the dialog to add the option to not show it any more, because it's a standard system dialog that cannot be modified. I will try to disable the warnings when BD3D2MK3D starts, but that will not be an option. You will still see it if you manually change these options again.

BTW, you wrote "BD3D2MK3D opens to the last saved state". That's only partially true. You can change that by disabling the "Save tabs settings on exit" option, and BD3D2MK3D will be opened each time with the settings you have saved explicitly with "Save tabs settings now". (The options available in the menus are saved immediately anyway.)

konikpolny
8th November 2017, 23:25
OK for point 1. It is easy to implement the modification yourself (in case you are in a hurry).
Yes, I studied the SRTtoASS3D.tcl and already changed it before I wrote that post but the font name was more complicated so I decided to ask you.

I'm not sure I can easily change the font name. Not because writing the code is difficult, but because usually the font type or name is not specified at all in the original SRT, and above all because if it is specified, I cannot be sure that the same font exists in the computer, TV or player that will be used to play the final MKV. Can I simply copy the font name from the SRT and insert it in the ASS, with the risk of specifying a font that the player can't use? Perhaps the player may even crash.Well in my opinion if font change is allowed by SRT, and if the SRT file being converted have a font change tag, the conversion to ASS 3D should respect that. Otherwise the tool is limited and doesn't support SRT in full. The SRT to 3D ASS conversion itself should always be tested for specific use. We cannot or shouldn't try to have a foolproof tool at the expense of its functionality because it will never be foolproof. You already have a number of warnings to advise about the 'safe' settings.
So everything here is at the user's own risk.
Also, as you said the font name change is extremely rare, and the chances are if present it is probably put there in purpose, most probably, as in my case, by the very user who is doing the conversion. You cannot ignore it.
To ensure the user has more control over the formatting you could replace the existing "keep formatting" checkbox by or even better add the new checkboxes permitting for individual formatting from SRT: italics, bolds, underline, color, fontName.

You cannot be sure and to be honest it is not you who should worry if the font exists. It is the user's responsibility to make sure the conversion setting is what he/she wants. Most of the time, it is for personal use and should be tested, otherwise the 'keep formatting' box should be deselected or specific formatting removed from the originating SRT file. The fact is that if the font face change is present in the SRT file, the conversion needs to do something about it (one or the other). Currently it's doing nothing with it. If you are afraid it could crash the player you should normally remove it from the resulting ASS file (I vote for having a chance to choose). The funny thing about it is that the conversion leaves the tag untouched and my player Media Player Classic respects the original code written for SRT even if it's embedded in the ASS file and displays the font change correctly :) !

Also, I don't understand why I should implement the font name change, but not the font size. Is it because the SRT format doesn't permit to change the font size? And anyway, the font size is dependent of the font, and the user should select the right size according to the "XML guide file" and the font he has selected in the GUI (as you can see when you use the Analyse the subtitle guide option). If the font (name or size) changes in the middle of the stream and if the resulting subtitle is too large, the 3D depth may not be suitable any more, because the subtitle may enter into the objects in the foreground.I don't understand why you mention the font size. If it is not supported by SRT, the conversion cannot consider it as it cannot respect illegal tags. I never used the individual position from the guide file setting as it offers me the settings I don't personally like, and I know what I like and how I want it. If you have doubts about font name or size working unreliably you could disable font name change tag formatting support for guides (only) or better warn the user, or best, as I said earlier, have a checkbox for individual formatting types.

By the way I often come across subs in which dialogs in one sub picture are placed in different X position and without the usual hyphens to denote different persons talking. The XML/PNG guides from the project don't seem to honor that X position difference. I originally thought that was what having the guides were for.

I agree that the warnings about the color depth or the Full stereoscopy should not be displayed each time BD3D2MK3D starts, but I can't change the dialog to add the option to not show it any more, because it's a standard system dialog that cannot be modified. I will try to disable the warnings when BD3D2MK3D starts, but that will not be an option. You will still see it if you manually change these options again.That's OK, the most noticeable (and irritating) warning is the one upon the start. The others when I change a setting I don't mind so much :).

r0lZ
10th November 2017, 12:14
Well in my opinion if font change is allowed by SRT, and if the SRT file being converted have a font change tag, the conversion to ASS 3D should respect that.The primary goal of SRTtoASS3D is to convert text based subtitles to 3D, not to convert SRT to ASS. However, I agree that if it's possible, the conversion should preserve the formatting (in the extremely rare cases where formatting is present in the source SRT).

Otherwise the tool is limited and doesn't support SRT in full. The SRT to 3D ASS conversion itself should always be tested for specific use. We cannot or shouldn't try to have a foolproof tool at the expense of its functionality because it will never be foolproof. You already have a number of warnings to advise about the 'safe' settings.
Yes again, but IMO the conversion should produce the best 3D. The liability to the original SRT formatting is not as important, especially because it is almost never specified (except italics, well supported). Anyway the font type and size are usually not specified, and the only way to produce good 3D subtitles is to select an easily readable font and a font size more or less compatible with the guide.

In the font selector of the GUI, there are only 3 fonts offered by default, because they are the 3 font faces present in all incarnations of Windows, Mac and Linux, and I can probably safely assume that all players can deal with these fonts. But with that 3 fonts, I have already faced a big problem. As you can see when you use the selector, they have not at all a similar width for the same height. When the user analyse the subtitle guide, the program suggests the best font size for the current font. But if the user changes the font after the analyse, he should change the font size as well, as otherwise some subtitles may not fit any more in the empty space between the objects in the foreground. To remain compatible in most cases, it is therefore necessary to keep the same font during the whole movie, even if that means that the original formatting is abandoned.

Of course, it is possible to keep the font changes in the final ASS file, but I will have to add a big warning explaining that it's dangerous and strongly not advisable. Is it really necessary to do that, especially when we take into account that 99.99% of the SRT files do not specify any font ?

To ensure the user has more control over the formatting you could replace the existing "keep formatting" checkbox by or even better add the new checkboxes permitting for individual formatting from SRT: italics, bolds, underline, color, fontName.
If I implement the font change, I will be forced to do it, because of course the font name change must be disabled by default.

You cannot be sure and to be honest it is not you who should worry if the font exists.
Well, I'm not sure. I know that it is possible to embed a font in the final MKV if it must be used by an ASS stream. But that option is currently not implemented, and will probably never be. So, in the best case, when the specified font is not available, the player will use the default font specified in the header of the ASS file, or it will use its own default font, with unpredictable results. Again, I don't think it's a good idea.

I don't understand why you mention the font size. If it is not supported by SRT, the conversion cannot consider it as it cannot respect illegal tags.
I don't know if SRT supports the font size change. IMO, it is terribly stupid to support the change in the font type, color and other formatting but not the size, probably the most important thing to control. But the SRT format is totally stupid anyway, so I guess it might be the case. I wonder simply if I have to support the font size change, and if it's the case, what is the SRT syntax for the font size.

I never used the individual position from the guide file setting as it offers me the settings I don't personally like, and I know what I like and how I want it.
The guide file is used ONLY to position the subtitles on screen, and I strongly suggest to use it, except when the analysis tells you that all subtitles are approximately at the same Y position and centered horizontally. In that case, as long as they are at approximately the right Y position, the resulting subtitles should never enter in the foreground objects (if the font size is not to big of course).

I have added the analysis to offer to the user the possibility to produce the ASS subtitles as close as possible to the original subtitles from the BD (similar color, size and position), and at least select a font size more or less compatible with the content of the 3D movie. You are of course for forced to do the analysis, or accept its recommended values. (Personally, I use often a much darker color than the original one.) But if you don't remove the subtitle guide from the GUI, it will be used to position the subtitles at their right positions on screen, and that's extremely important when the original subtitles are carefully placed on screen to avoid entering in the foreground objects (like in Avatar, for example).

By the way I often come across subs in which dialogs in one sub picture are placed in different X position and without the usual hyphens to denote different persons talking. The XML/PNG guides from the project don't seem to honor that X position difference. I originally thought that was what having the guides were for.
I'm not sure I understand you. Indeed, in a 3D movie, the translation of a specific phrase can be placed in a specific position so that it will not enter in a foreground object, or to show clearly that it's the translation of a sentence spoken by a specific person. SRTtoASS3D should respect that. Technically, SRTtoASS3D analyses the coordinates of the bounding box containing the original subtitle (specified in the XML file) to know where it should place the text of the ASS stream.

Of course, when there are TWO sentences displayed at different X positions AT THE SAME TIME on screen, they form a SINGLE subtitle, the box contains the two sentences, and it is impossible for SRTtoASS3D to know that the first subtitle is, say, on the top left and the second on the bottom right side of the box. In that case, the program assumes that the two output subtitles must be centered in the box, and they will appear on top of each other. You may lose the indication of who is telling what, but at least, the subtitles should be in a place where there is only a little risk to enter in a foreground object, and it's what is really important when converting a subtitle in 3D.

In other words, SRTtoASS3D is unable to analyse the actual text of the original subtitles to ensure that his translation is placed exactly at the same X position. That would require a sophisticated OCR and automatic translation of the original text, and of course, it's beyond the scope of this little conversion tool. Therefore, it can only grab the position of a specific subtitle from its bounding box and apply it at the subtitle displayed at (more or less) the same time.

That's OK, the most noticeable (and irritating) warning is the one upon the start. The others when I change a setting I don't mind so much :).
OK, I'll do that. I just hope I will not forget some warnings...

r0lZ
10th November 2017, 13:29
I've searched the web for the text formatting options of the SRT format. According to Wikipedia (https://en.wikipedia.org/wiki/SubRip#Formatting) (as well as other sites like this one (https://www.visualsubsync.org/help/srt)), ONLY the basic formatting options bold, italic, underline and color are supported. The other file format descriptions I've found on the internet either do not specify the formatting options, or specify only bold, italics and underline. Even the color change seems to be an option that is not widely supported. It is therefore NOT possible to legally change the font face or size in a SRT file. If some players may support non-standard options to do it, it's certainly not a good reason to implement them in BD3D2MK3D. Therefore, I think I will not modify deeply the current implementation. However, I will try to handle better the color change so that if a non-standard SRT contains color AND font face change in the same command, the conversion will detect the new color, and remove the other formatting option. I can't do much more. It is not the responsibility of BD3D2MK3D to support badly created subtitle streams with illegal formatting options, especially given the fact that almost nobody uses them.

Of course, I may change my mind, if someone can certify that the font face option is legal and supported by the vast majority of players. As I've read somewhere, only MPC-HD supports some illegal formatting options, and IMO it's certainly not enough to implement them.

r0lZ
10th November 2017, 15:01
OK, I have finished to modify SRTtoASS3D.tcl v0.5. It will be distributed with the next release of BD3D2MK3D. In the meantime, can you (or anybody) test it carefully ? It should now convert the color tags correctly, even when they are specified together with a font change. The font change itself is disregarded, for the reasons explained above.

The reset to the default color has been simplified too, and is now {/c}.

Please note that this is a beta, so please copy the original SRT2ASS3D.tcl file from the toolset folder elsewhere before overwriting it with this version, just in case...

Download: SRTtoASS3D.tcl (http://download.videohelp.com/r0lZ/tmp/SRTtoASS3D.tcl)

konikpolny
10th November 2017, 16:19
The the color restore replacing the literal color with {/c} works only for one liners. It doesn't work when the color is over 2 lines (or more I guess)

konikpolny
10th November 2017, 16:36
I've searched the web for the text formatting options of the SRT format. According to Wikipedia (as well as other sites like this one), ONLY the basic formatting options bold, italic, underline and color are supported.:) Sorry, I always thought that the font change tag is standard in SRT. If it is not, and as it seems only MPC-HC will read it, there is not much reason for the SRTtoASS3D tool to support.

r0lZ
10th November 2017, 17:16
The the color restore replacing the literal color with {/c} works only for one liners. It doesn't work when the color is over 2 lines (or more I guess)
Oops, yes, it might disappear if the color change is on the first line and the restore it is on the second line. It's because I try to remove the {/c} when it is useless, but I suppose that it is better to keep it anyway. After all, {/c} will just do nothing if it doesn't follow a color change, and it should not hurt.

I'll fix that in the final version...
:) Sorry, I always thought that the font change tag is standard in SRT. If it is not, and as it seems only MPC-HC will read it, there is not much reason for the SRTtoASS3D tool to support.
No worries. For me, it's much more simple to not implement it, as otherwise big 3D problems can arrise with large font faces.

konikpolny
10th November 2017, 17:29
SRT is obviously a basic subs format. I think that originally it was meant to have only basic formatting and in time developers considered it could also support font change as well. It's just there is nobody to care about writing an updated spec :). So it's up to the player whether to implement the font change tag or not. I just tried PotPlayer and just as MPC-HC it respects font change in SRT and displays the change correctly. It seems that both players consider font change tag an important addition and a tag worth having for SRT format. :).
I don't know about any other 'unusual' tags like font size (I've never seen it) but it seems that positioning, even though mentioned in the SRT specs there (https://www.visualsubsync.org/help/srt), is not supported by MPC-HC or PotPlayer.

konikpolny
10th November 2017, 17:40
Of course, when there are TWO sentences displayed at different X positions AT THE SAME TIME on screen, they form a SINGLE subtitle, the box contains the two sentences, and it is impossible for SRTtoASS3D to know that the first subtitle is, say, on the top left and the second on the bottom right side of the boxThis is exactly what I meant.
Anyways, I will have more tests for positioning with the 2Dxml guides in my future projects, now that I understand it.
Thanks

konikpolny
10th November 2017, 17:51
Talking about subtitles, as regards pic based subtitles they are kind of too big for my use and I've always wondered if the players can reduce their size. Do you know if any players provide control over the size of the sup or idx/sub format subtitles? I haven't been able to find ... :confused:

r0lZ
10th November 2017, 23:21
No. Normally, the size of the graphics subtitles is determined by the author, and cannot be changed. It's a important advantage for the 3D subtitles, as otherwise, if the player shrinks (or expands) them, the offset between the two views will change, and therefore the subtitles will appear at the wrong depth. That can and certainly will ruin the 3D experience.

Of course, the problem is different for 2D subtitles, and it may be more pleasant to reduce them somewhat, especially if the movie is played on a computer. You can of course demux them, use the scale feature of BDSup2Sub, and remux the modified subtitle in the MKV, but AFAIK you cannot do that on the fly. And of course, I don't recommend to do it with the 3D subtitles.

konikpolny
11th November 2017, 00:27
Thanks for the info. True about 3D pic subtitles ;)

r0lZ
11th November 2017, 11:19
I just tried PotPlayer and just as MPC-HC it respects font change in SRT and displays the change correctly.I use PotPlayer often, especially to watch the 3D movies on my PC. It is very good, but it doesn't support the ASS subtitles well, and especially the 3D subtitles produced by SRTtoASS3D. The problem is that for a 3D movie, two subtitles must be displayed at the same time. And PotPlayer is unable to do that. It shows only one of the two subtitles. Of course, the effect is very bad, even worse than 2D subtitles. It's a pity, as otherwise, PotPlayer is very good. MPC-HD does a better job for the 3D ASS subtitles, but doesn't support the 3D movies well. [EDIT: This bug has been fixed.]

I have replaced the SRTtoASS2D.tcl script with a new version that fixes the problem of the </FONT>. Now, </FONT> is replaced anyway with {\\c}, even if it follows a font change that has been removed. That means that a subtitle can contain an useless {\\c} if it follows a font face change that has been removed. It should not hurt, and given the fact that the font face changes are not officially supported by the SubRip specs, and extremely rarely used, you should normally never see an useless {\\c}.

I haven't changed the version number (still 0.5) since the previous beta has never been released officially, but this version is dated November 11, 2017. It should be the version that will be distributed with the next version of BD3D2MK3D.
Download: SRTtoASS3D.tcl (http://download.videohelp.com/r0lZ/tmp/SRTtoASS3D.tcl)

As a conclusion for the whole discussion about the formatting options of the SubRip/SRT format, I suggest to use ONLY ASS (or SSA) subtitles if the formatting and font changes matter. After all, all video players sophisticated enough to respect complex formatting options are certainly able to support the ASS format, and therefore I see no advantage in using the old, deprecated SRT format. And if, per chance, you want to use a SRT containing complex formatting like font changes, I suggest to use AegiSub to convert it to the more powerful ASS format. SRTtoASS3D is only a basic tool to convert true SRT files to ASS 3D, and it does it well as long as the SRT respects the limitations of the format.

sheppaul
12th November 2017, 07:20
The problem is that for a 3D movie, two subtitles must be displayed at the same time.
I just don't understand it. Why does it require to display two subtitles if the player can display it properly with 3d depth? What's the exact case of yours for 3d playback? mkv3d + srt? or Half-SBS 3D?

r0lZ
12th November 2017, 11:02
In a 3D BD, the video format is AVC+MVC. The subtitle stream for a specific language contains only one subtitle, and the MVC video stream contains the information necessary to control the depth of the subtitles in real time. That information is stored in Offset Sequences (the so called 3D-Planes), and BD3D2MK3D extracts it and store it in .OFS files during the creation of the project.

Unfortunately, when the movie is re-encoded in another 3D format (Full or Half SBS or T&B or frame sequential) the MVC stream is lost, and of course the offset sequences are lost too. Furthermore, as far as I know, no player is able to directly use the OFS files to mimic the behaviour of a real BD3D player.

To be able to display the subtitles in 3D with the correct depth, it is therefore necessary to build a single stream of subtitles with the two "views" of the subtitle. It's what BD3D2MK3D does when it converts the subtitles to 3D. For example, for a subtitle shown at a specific timing in Half-SBS, it takes in the corresponding OFS file the offset to apply at that timing, and then it duplicates the image of the subtitle, and combine them side by side with the right offset. The combined image is then resized. (Its width is divided by 2 for Half-SBS.) That operation is repeated for all subtitles in the stream with different offsets for all subtitles. Finally, the whole subtitle stream is re-created with the new images, to obtain the final Half-SBS subtitle stream.

Indeed, when working with graphic subtitles like the BD sups, the two streams are combined to form a single stream with double images, exactly like the two video streams are combined to form a single SBS stream. But things are somewhat different when the subtitle stream is text based. When a SRT stream is converted to 3D, there is no way to combine the two views of the same sentence in the same image, since the stream is not image based. Therefore, it is necessary to place the text for the left eye at a specific position on the screen, and the text for the right eye at another position. Since with the ASS format, it is not possible to specify that a part of the text must be shown at a specific position and the rest of the same text at another, it is necessary to split the stereoscopic subtitle in two parts: one for each eye. Each part has different X positions (for SBS), as you can see in this extract of an ASS stream produced by BD3D2MK3D:

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:04:27.10,0:04:28.51,Default,,8,968,8,,{\pos(481,867)}Regardez, des étoiles filantes.
Dialogue: 0,0:04:27.10,0:04:28.51,Default,,968,8,8,,{\pos(1439,867)}Regardez, des étoiles filantes.
Dialogue: 0,0:04:29.14,0:04:30.76,Default,,8,968,8,,{\pos(479,868)}Vite, vite, faites un vœu.
Dialogue: 0,0:04:29.14,0:04:30.76,Default,,968,8,8,,{\pos(1437,868)}Vite, vite, faites un vœu.

The ASS format specifies that several subtitles can be displayed at the same time, so it's normally not a problem, but obviously, some players do not implement that possibility, and of course, if only one subtitle is displayed, it is not possible to see the subtitle at the right depth, and the effect is terrible, since the subtitle is seen by one eye only ! (The SRT format cannot show two subtitles at the same time, and anyway, there is no possibility really implemented to force a subtitle to be printed at a specific position. It's why it is necessary to convert SRT to ASS to obtain 3D subtitles.)

Of course, the problem affects only the 3D subtitles in ASS (text) format. As explained above, the graphics subtitles converted directly to 3D from the BD are not affected. Luckily, the 3D movies in 3DBD must have their subtitles in BD SUP (graphics) format, and the problem concerns therefore only the peoples who want to convert SRT files downloaded from the internet to 3D ASS.

I don't use the MKV3D format produced by MakeMKV, but in that case, the video is not re-encoded, and therefore is still in AVC+MVC format. That means that the offset sequence are still present in the AVC, and of course, if is theoretically possible for a good 3D player to use them to display ANY KIND of subtitle at the right depth, including SRT files. I don't know if Stereoscopic Player can already do that, but anyway, that MKV3D format is very specific, not supported by any standalone player, and IMO, due to its large file size, not suitable for other things than archiving of your original BDs.

konikpolny
12th November 2017, 11:46
for a 3D movie, two subtitles must be displayed at the same time. And PotPlayer is unable to do that
my PotPlayer displays both 3D lines correctly for the ASS subtitles.

the problem concerns therefore only the peoples who want to convert SRT files downloaded from the internet to 3D ASS.This may be an off the subject note now, but, I use the SRT2ASS3D conversion for the SRTs OCRed by myself from the BD3D2MK3D project subtitles streams, not the internet.

And as far as the Font Face change is concerned I obviously have to add this information by hand and it is much easier to change the font face in a single subs line (SRT) rather than in 2 as in ASS subs and then do the conversion. However rarely I have done it. I did it when I wanted to get the same effect as in the orginal BD3D where for some subtitles the color change went along with a Font change.
However old and simple the SRT format is, it is the most widely used. Here it is a great format for achieving good quality text 3D ASS subtitles.
If I have time I may look in the code of SRTtoASS3D.tcl and modify it according to my needs. :)

r0lZ
12th November 2017, 12:00
I've just verified, and indeed, PotPlayer is now able to show the two subtitles of a 3D ASS stream correctly. An old bug has been fixed. Yet another good point for that excellent player (IMO the best).

If you use PotPlayer and the original subtitles from the BD, why do you convert them to ASS 3D ? PotPlayer can show the 3D SUP streams without problem. Is it because you encode in Full-SBS (or Full-T&B or Frame Sequential) ?

Also, if you keep only a single audio and a single subtitle stream and you need the subtitles anyway, I suggest to use the option to hardcode (burn) the 3D subtitles in the movie itself. That works with all players, and with all 3D formats ! :-)

konikpolny
13th November 2017, 01:11
There are 4 reasons why I prefer the ASS 3D subtitles to the graphic ones:
1) I do indeed encode full-SBS, :)
2) As I said earlier the graphic subs are a bit too big for my use. (But I will try resizing with the BDSup2Sub+remux and see how that works for me. I know this will work even for full-SBS 3D in at least MPC-HC :sly:).
3) In general I prefer having text than graphic even if it takes a bit more work to get (I have good regexes to fix OCR errors :sly:)
4) I am a bit crazy but I like having control on how subtitles look, like colour and font :).

I suggest to use the option to hardcode (burn) the 3D subtitles in the movie itself.
:) I think this is the worst thing that one can do ever. It damages and injures the movie irretrievably and forever leaving the user with no choice but to accept a decision once made. I am strongly against it! Also, I am outraged when an original BD burns in the forced english subtitles on all available playlists / video streams as if everybody just wanted to use the english subtitles! This is horrible. :mad:

r0lZ
13th November 2017, 09:14
:) I think this is the worst thing that one can do ever. It damages and injures the movie irretrievably and forever leaving the user with no choice but to accept a decision once made. I am strongly against it! Also, I am outraged when an original BD burns in the forced english subtitles on all available playlists / video streams as if everybody just wanted to use the english subtitles! This is horrible. :mad:
I agree that forced subtitles burned by the author of the movie or by the author of the BD are terrible, because you don't have the choice of your preferred language any more. But if it is YOU who burns the subtitles YOU have decided to watch anyway, things are totally different.

Like you, I prefer to leave the movie "fresh", without subtitles, and I just want to turn them on when I need them. But if that works perfectly for 2D movies, things are different for 3D movies, especially if you want to play them with a specific standalone player, such as a 3D TV. Usually, there is no way to display correctly the 3D subtitles with hardware players. (My Samsung TV, for example, can only display 2D SRT files NOT inside the MKV container! It is totally prehistoric!) Therefore you have to support the 2D subtitles (and that's the most horrible thing you can imagine) or just watch the movie without any subtitle at all (and that's not a solution if you don't know at all the original language).

The big benefit of burning the 3D subtitles is that the movie will be watchable with all kind of 3D equipment, including any 3D TV with bad subtitle support. Therefore, I burn the subtitles when the movie doesn't have a sound track I can understand and it has a good 3D subtitle track in French or English. In that case, I have to turn the subtitles on anyway, so why not burn them, and avoid all possible player related problems? IMO, it's certainly the best solution.

sheppaul
13th November 2017, 16:01
therefore is still in AVC+MVC format. That means that the offset sequence are still present in the AVC, and of course, if is theoretically possible for a good 3D player to use them to display ANY KIND of subtitle at the right depth, including SRT files.

It works well with Potplayer. I tried with ISO backup of blueray + srt.

r0lZ
13th November 2017, 17:37
An ISO of a BD is not a 3D MKV produced by MakeMKV. The player expects the 3D offsets in a 3D BD, not necessarily in a MKV (where it doesn't normally expect the MVC stream at all).

But anyway, the info is interesting. I did not know that. Being able to show external SRT with the 3D offsets that have not been created specifically for that subtitle track is a very good point for PotPlayer (although I suspects that the 3D is not always perfect, because the SRT subtitles are not always at the right place on screen). Thanks for the info!

sheppaul
14th November 2017, 00:45
I tried again with 3D MKV by MakeMKV + SRT and it seems to work too. Probably with blu-ray folder (didn't test) if the 3d depth is coming from MVC streams.

One tip for opening blu-ray folder + srt subtitles.

D:\movies\example
D:\movies\example\BDMV
D:\movies\example\CERTIFICATE

Assuming that there is blu-ray folder named example, Potplayer will open the following srt files automatically with Open Folder menu (F2) or drag-and-dropping the blu-ray folder (example) to the player.

1. D:\movies\example\BDMV\bdmv.srt
2. D:\movies\example\example.srt

r0lZ
14th November 2017, 10:27
Great info again. But I wonder how PotPlayer selects the offset sequence to use, since an external SRT is not associated with a specific 3D-plane. I know that the first plane is often pure garbage (containing only null bytes, or a constant depth) and it is somewhat difficult for an human to choose within the available planes the best one for a specific SRT or language. I don't think that PotPlayer can do an analysis of the available planes to reject the ones that are obviously not suitable for the given SRT file, as that would require much time. Also, the first non-null 3D-Plane is usually made for the subtitle in the original language of the movie, and has therefore usually no 3D values for the forced subtitles of the other languages, and is therefore not really suitable either. So, does it take the next available plane, blindly? Or can it use several planes, and automatically switch to another plane if a specific subtitle has only a null 3D value in the default plane?

I don't have a 3D graphic card, so I can't test, but if you can figure out how PotPlayer selects and handle the 3D-plane for the external SRT files, please let us know.

sheppaul
14th November 2017, 11:10
I don't know the technical details but it seems to get the info from mvc streams on the fly. There is one more thing from the latest beta version. I contacted the developer of the player to adjust the relative pixels to 3d depth for text subtitles and it seems to be implemented.


ps. Actually, I made a feature request to use OFS file with text subtitles for re-encoded 3d videos as it looks possible and rather easy compared to get the info from mvc streams. However, failed to make him understand. :p If the OFS info were merged in mkv container, it would be more practical and accessible information.

r0lZ
14th November 2017, 15:17
... to adjust the relative pixels to 3d depth ...What do you mean? It it to add the possibility to globally move all subtitles a bit more toward the spectator or behind the screen?

If the OFS info were merged in mkv container, it would be more practical and accessible information.
I agree. It's why BD3D2MK3D includes the OFS files in a ZIP archive in the final MKV, just in case...

Perhaps you should try again to explain the idea to the developer, or direct him to this thread. It would be indeed a nice addition to PotPlayer if he could support the 3D depth from external or muxed OFS files. At least, it will be possible to play SBS or T&B files with SRT subtitles and the (more or less) correct depth.

sheppaul
16th November 2017, 01:59
to add the possibility to globally move all subtitles a bit more toward the spectator or behind the screen?
Yeah, there was already such a feature for normal 2d text subtitles. But, it did not work for subtitles having 3d depths. Now, it's possible.

It would be indeed a nice addition to PotPlayer if he could support the 3D depth from external or muxed OFS files. At least, it will be possible to play SBS or T&B files with SRT subtitles and the (more or less) correct depth.

That's exactly what I thought. However, there is one more thing which should be implemented before telling him about the OFS implementation. Potplayer can convert and display normal text subtitles to 3d subtitles having fixed depth but adjustable on the fly.

It works well with 3d mvc media (blu-ray iso/folder, mkv having 3d mvc streams) but re-encoded 3d videos having half resolutions do not work with a default subtitle renderer (overlay type). It should be changed to image type (mixing subtitles to video streams). It is also supported in the player but it is very inconvenient as it requires manual switching and the quality of subtitle rendering is not very good if you have large screens. I think providing the same subtitle rendering with half 3d videos should be done in advance.

Potplayer's developer said it's very complicated and he'd not like messing up the existing codes as it is actually working pretty well. So I'm stuck with the precedent feature which I think is absolutely necessary. As for OFS files, is it possible to mux it in mkv container?

sheppaul
16th November 2017, 05:31
Talking about subtitles, as regards pic based subtitles they are kind of too big for my use and I've always wondered if the players can reduce their size. Do you know if any players provide control over the size of the sup or idx/sub format subtitles? I haven't been able to find ... :confused:

Potplayer can do it. It's one of the features I made a feature request ago and fortunately it was implemented. It's somewhere in preferences. :p By the way, I'm not sure how it'll work for displaying 3d subtitles as my purpose for feature request was to reduce the size of 2d subtitles.

r0lZ
16th November 2017, 11:08
As for OFS files, is it possible to mux it in mkv container?As far as I know, no. It is certainly possible to add the 3D offsets in SEI messages within the AVC video stream (exactly like they are added to the MVC stream in a 3D BD), but that would require a specific muxer or a tool that can add the SEI messages after the original creation of the h264 or h265 stream, or to modify x264 and x265 to include the possibility to add them directly, when the video is encoded. That seems difficult. But it is already possible to include any file as attachment in the final MKV. Since an OFS file is made of approximately as many bytes as there are frames in the movie, it's a small file that can be loaded entirely in memory when the MKV is opened. But if the offset sequences are not muxed with the video stream, the difficulty will be to stay synchronized when the user seeks somewhere in the movie. The player must know the exact frame number it is playing to pick the right 3D depth, and many DirectShow codecs are not frame accurate. Also, an independent OFS file (included or not in the MKV container) is not suitable for video streaming.

Also, for movies with several different subtitle streams, it will be necessary to imagine a method to link each subtitle stream to its corresponding OFS file. It is easy to imagine a way to do it, for example with a little file describing that, or simply with the order of the subtitle streams matching the order of the OFS files, but there is currently no standard for that. I'm not sure the programmer of a specific player will accept to implement his own method, if it is not widely accepted.

So, I don't know if there are fatal difficulties in implementing the 3D offset sequences for SBS or T&B movies, but IMO it's possible, as long as they are associated with a video format and that can be decoded accurately and a good container. IMO, that should be the case of h264/h265 within a MKV container, but I'm not sure. (It is for sure not possible to do that with an AVI and old codecs like DivX. But who still uses AVI with that obsolete codec for a modern 3D movie?)

sheppaul
16th November 2017, 13:38
there is currently no standard for that. I'm not sure the programmer of a specific player will accept to implement his own method, if it is not widely accepted.

So, I don't know if there are fatal difficulties in implementing the 3D offset sequences for SBS or T&B movies, but IMO it's possible, as long as they are associated with a video format and that can be decoded accurately and a good container.
Yeah, you got the point. He does not really like non-standard methods. That's probably the main reason he'd not likely to support it.

konikpolny
19th November 2017, 17:59
Thanks sheppaul for the info about PotPlayer being able to change size of the graphic subtitles. Indeed, it can reduce picture subs and it works fine for 2D. The feature is called "Scale image caption" and can be set under the main Subtitles tab in the Preferences.

albesp77
20th November 2017, 10:49
dear all, i've converted 2 movie with this toos, using default parameters, one of this halfsbs movie is perfect, the other one seems to have some disturb on some scenes on background, front detail are perfect, there are some possible parameters to try to change to delete this problem ? seems like that in background i see video without using glasses, like a double image, but the front in same frame is perfect!

r0lZ
20th November 2017, 14:03
seems like that in background i see video without using glasses, like a double image, but the front in same frame is perfect!
I'm not sure I understand the problem.

Of course, if you watch the movie with the TV playing it in 3D but without the 3D glasses, you MUST see two slightly different images. You see the image for the left eye + the image for the right eye with your two eyes, and of course that's not how you are supposed to watch a 3D movie.

The objects that appear (with the glasses) approximately at the surface of the screen may give the impression that there is only one image, but when the distance from the screen to the background (or foreground) objects increases, the two images are more distant, and the effect of a double image becomes visible. (The effect is somewhat similar to what you can see when you are severely drunk.) It's caused by the parallax, and it's not only normal, but necessary. You can see exactly the same "double image" effect if you watch the 3D movie in a theater without the glasses.

If what you see when you use the 3D glasses is correct and appears in 3D, that means that everything is normal, and works as expected. You should NEVER watch a 3D movie without the glasses, as that doesn't make sense. (Some TVs have an option to watch the 3D movie in 2D, but in that case, they show you only a single view, and of course the "double image" effect disappears.)

albesp77
20th November 2017, 15:04
I'm not sure I understand the problem.

Of course, if you watch the movie with the TV playing it in 3D but without the 3D glasses, you MUST see two slightly different images. You see the image for the left eye + the image for the right eye with your two eyes, and of course that's not how you are supposed to watch a 3D movie.

The objects that appear (with the glasses) approximately at the surface of the screen may give the impression that there is only one image, but when the distance from the screen to the background (or foreground) objects increases, the two images are more distant, and the effect of a double image becomes visible. (The effect is somewhat similar to what you can see when you are severely drunk.) It's caused by the parallax, and it's not only normal, but necessary. You can see exactly the same "double image" effect if you watch the 3D movie in a theater without the glasses.

If what you see when you use the 3D glasses is correct and appears in 3D, that means that everything is normal, and works as expected. You should NEVER watch a 3D movie without the glasses, as that doesn't make sense. (Some TVs have an option to watch the 3D movie in 2D, but in that case, they show you only a single view, and of course the "double image" effect disappears.)

ok ok, i'll try to explain better my problem, i have 2 movie coded in half-sbs, i watch both movie on my tv with my glasses, one of the two movies views good, in all beautiful 3d scene, i see right the 3d depth in all scenes. Now i want to explain better the problem on other movie, i see on tv with glasses, i see the 3d depth also on this movie, but different from the another one i see on this on background like a 3d double image effect, like i see on tv without glasses, but the strange is that i see only on background this problem, the 3d depth of image is right!

r0lZ
20th November 2017, 15:30
i see on this on background like a 3d double image effect, like i see on tv without glasses, but the strange is that i see only on background this problem, the 3d depth of image is right!
Well, in very contrasted images (like when you see a man with black suit in a snowy landscape), the image of the left eye may be seen partially with the right eye, and vice-versa. That unpleasant effect is due to the somewhat bad quality of the 3D equipment, and can be more or less visible. It is called "ghosting". It's not really a problem of the movie, and the 3D encoding made by BD3D2MK3D is not bad. The ghosting effect is only visible because the 3D glasses are unable to filter the two views at 100%. I guess it's what you have experienced.

Of course, a bad 3D source (like most 3D BDs produced in Germany) can also be the culprit. Anyway, in both cases, the problem is also visible when you play the original 3D BD, and is not due to BD3D2MK3D.

What is the movie that causes that problem ? And can you post a SBS image extracted from that movie (preferably one where the problem is really noticeable) on an image sharing site so that I can analyse it ?

albesp77
20th November 2017, 15:32
Well, in very contrasted images (like when you see a man with black suits in a snowy landscape), the image of the left eye may be seen partially with the right eye, and vice-versa. That unpleasant effect is due to the somewhat bad quality of the 3D equipment, and can be more or less visible. It is called "ghosting". It's not really a problem of the movie, and the 3D encoding made by BD3D2MK3D is not bad. The ghosting effect is only visible because the 3D glasses are unable to filter the two views at 100%. I guess it's what you have experienced.

Of course, a bad 3D source (like most 3D BDs produced in Germany) can also be the culprit. Anyway, in both cases, the problem is also visible when you play the original 3D BD, and is not due to BD3D2MK3D.

What is the movie that causes that problem ?

good to know! saw 7 3d italian edition

r0lZ
20th November 2017, 15:40
I have not Saw 7, so I can't tell if it's a movie with highly contrasted scenes.

You have replied when I was editing my previous reply, so you have probably net seen my last request:

Can you post a SBS image extracted from that movie (preferably one where the problem is really noticeable) on an image sharing site so that I can analyse it ?

albesp77
20th November 2017, 15:45
I have not Saw 7, so I can't tell if it's a movie with highly contrasted scenes.

You have replied when I was editing my previous reply, so you have probably net seen my last request:

Can you post a SBS image extracted from that movie (preferably one where the problem is really noticeable) on an image sharing site so that I can analyse it ?

sure, but i really don't know how to take the right frame to analyze in scene with problem, can you help me ?

r0lZ
20th November 2017, 15:50
No, just select an image from a scene where the problem is really visible.

(P.S.: Please do NOT quote the entire post when you reply to the last post. It's useless and against the Doom9 rules.)

albesp77
20th November 2017, 15:55
ok i'll try to double check scene in those days and take the frame! thanks in advance!

madipav
21st November 2017, 11:43
After a convertion of a 3D movie to a 3D MKV SBS file, with BD3D2MK3D, this software don’t recognize the 3D MKV SBS file created.
It's seems there isn’t a SSIF folder or any Information inside the 3D MKV file to be reconized.

Howhever it's a 3D MKV file.

So it becomes impossible, with this software, reasize a 3D MKV file created by the software itself.

The software say's “Its seems that the file is not a MKV file created by MakeMKV or it is not in 3D format”

Please I need help how to make BD3D2MK3D recognized a 3D MKV file

https://postimg.org/image/nndv989x7/ ?

https://s17.postimg.org/5kksi0e2n/Error_reading_a_3_D_MKV_file.png

r0lZ
21st November 2017, 12:06
After a convertion of a 3D movie to a 3D MKV SBS file, ...
If you have already a 3D SBS file, why would you need to use BD3D2MK3D to create another 3D SBS MKV file ? That doesn't make sense.

BD3D2MK3D can convert a 3D DB or a 3D MKV with AVC + MVC video streams to 3D SBS MKV. That means that the source material (BD or MKV) must contain the two video streams. The main video stream must be encoded in AVC (aka h264) and the second video stream must be encoded in MVC, exactly like in a 3D BD. You can create a 3D MKV from a 3D BD with MakeMKV. It extracts simply the two video streams (and of course one or more audio and/or subtitle streams) from the BD and includes them in a MKV container. No streams are re-encoded during that operation, and therefore the MKV contains exactly the same video streams than the original 3D BD. That MKV can be converted to SBS, T&B or Frame Sequential by BD3D2MK3D. But if the source MKV contains only a single video stream (encoded in AVC or any other codec), BD3D2MK3D can't convert it, because it is either a monoscopic video or it is a 3D movie that has already been converted to SBS, T&B or FS format, and of course you cannot convert it a second time. (You can however re-encode it if for example you want to reduce its file size or resize the image, but you can do that with any good MVC or HEVC encoder, and it's not the job of BD3D2MK3D.)

The BD3D2MK3D dialog posted above explains how you can convert the original BD3D to the AVC+MVC MKV with MakeMKV. If you do that correctly, the MKV will be accepted by BD3D2MK3D.

[EDIT] I have modified the dialog above to remove the warnings about the old versions of MakeMKV (because the old versions cannot be used any more and I assume that the Left/Right view bug has been fixed) and I have added a short explanation about the necessity to use an AVC+MVC MKV as input, and not a 3D SBS, T&B or FS MKV.

kevbo
22nd November 2017, 05:13
Hello...I love this program. I use it to convert my 3D Blu Rays to files that can be watched on an Android device using a 3D viewer.

As such, I'm trying to make the files small. I'm using 720p SBS, which is great. The problem is the AAC quality.

I found the option to set the AAC quality parameter. However, you use -down6. I'd rather use -downDpl (or even -downStereo), because, in this case, there will never been any need for more than two channels.

I jumped into the work directory and re-encoded the audio before calling __ENCODE_3D_LAUNCHER.cmd, but it would be nice if I could choose an option inside of BD3D2MK3D instead.

Thanks!

Kevin

r0lZ
22nd November 2017, 10:13
That seems to be a good addition. I'll do it. It's easy. That option exists already when you use Tools -> Convert audio, but it is not available when building a project.

BTW, is it straightforward to play a SBS movie on an android phone ? Is it sufficient to use a VR adapter ? Or do you need a specific app ?

kevbo
22nd November 2017, 15:17
Well thank you!

I actually am using an older Android device (a Nexus 5). My son likes to watch movies on it. The older 3D adapter is called "Google Cardboard" (although you can get "Cardboard" adapters that are made of plastic and padding). You do have to use a movie player app. We use AAA VR Cinema, and we've also used VR Player, both of which are available free (with ads in the UI) or you can pay for them to remove the ads.

I think that, even if you were using a newer "Daydream" 3D device, you'd have to use a movie player. Something needs to feed the movie through the VR engine and do the image separation, warping, and general UI.

Thanks again!

r0lZ
22nd November 2017, 20:08
I did think that a Full-SBS video can be viewed with a simple carton box with 2 lenses, using a technique similar to this (http://www.vanishederas.com/ekmps/shops/vanishederas/images/zz-antique-wooden-treen-stereoscope-stereoscopic-viewer-with-large-collection-of-stereoviews-c.1900-sold-[3]-7723-p.jpg) but of course with a phone instead of the stereographic photo, and a somewhat more modern look. ;-)

Of course, a video player is necessary, but since the image is already in SBS, there should be no need for an additional 3D processing, and any good player should do the job. Right?

Anyway, I'll check AAA VR Cinema and VR Player, and perhaps I'll buy a VR adapter, if there is one compatible with my Huawei P8 2017. If that works well, I guess that the immersive effect will be much better than with a 3D TV.

Thanks for the thanks. I have already added the 5.1/stereo/ProLogic option in tab 2. I still need to do some other little tweaks, and I'll release a new version of BD3D2MK3D, probably very soon...

kevbo
23rd November 2017, 12:26
There are actually lenses in the Google Cardboard things. I don't entirely understand why: I think they spread the image out to fill out more of your field of vision.

The video player "pre-distorts" the image. It doesn't just display the video as encoded, it splits it into two images and kind of "rounds" each one out, so it ends up in the middle of the lens on the Cardboard, which spreads it back out again.

It actually looks nice. It was more complicated than I thought it would be. :) Things "just work" though after being encoded by BD3DMK3D: the video players detect everything automatically.

Thanks!

r0lZ
23rd November 2017, 13:13
There are actually lenses in the Google Cardboard things. I don't entirely understand why: I think they spread the image out to fill out more of your field of vision.The lenses are necessary because the screen (your phone) is very close to your eyes, and they cannot focus on the image at such a short distance without a correction.
The video player "pre-distorts" the image. It doesn't just display the video as encoded, it splits it into two images and kind of "rounds" each one out, so it ends up in the middle of the lens on the Cardboard, which spreads it back out again.
I see. But does that means that you see a relatively small image in the center of the view, like with a TV in a room? If it's the case, that reduces greatly the interest of the technique.
It actually looks nice. It was more complicated than I thought it would be. :) Things "just work" though after being encoded by BD3DMK3D: the video players detect everything automatically.
Indeed, BD3D2MK3D adds the 3D information in all possible locations (the frame-packing in the AVC stream, the stereoscopy in the MKV container, and a 3D string in the file name). A good player should therefore switch to the right 3D mode automatically.

I have had a look at the VR players on the Play Store. There is a lot of apps. Not sure what is the best. Can you conform that AAA VR Cinema and VR Player can decode the 3D videos encoded in HEVC with x265 ? IMO, to reduce the disc space without loosing much quality, it is preferable to encode with that very efficient codec than with x264, but many players are still unable to decode h265 correctly.

r0lZ
23rd November 2017, 13:21
And here is the version that adds the possibility to convert the audio to stereo or ProLogic, to regain more disc space. It includes also the new version of SRTtoASS3D with some minor fixes).

v1.3 (November 23, 2017)
- Added the possibility to convert the audio streams to Dolby ProLogic II or to Stereo (in addition to AC3 and AAC).
- Subtitle Tools -> Convert SRT to ASS 3D (SRTtoASS3D.tcl) updated to v0.5, with some improvements and a possible bug fixed (see here (https://forum.doom9.org/showthread.php?p=1823942#post1823942))
- The warnings about Full SBS/T&B, x265, 10 or 12-bit color depth etc... are not displayed any more when the program starts.
- Changed the download link for x264 and x265 to VideoHelp.
- Updated the mkvtoolnix exes to the latest version (v18.0.0)
- Restored x265 to the latest stable version (v2.5+5)

Download: BD3D2MK3D.7z (http://download.videohelp.com/r0lZ/BD3D2AVS/BD3D2MK3D.7z)

Woody3D
24th November 2017, 09:58
BD3D2MK3D is a GUI to convert movies from 3D BDs to 3D MKV video files in Full or Half Side by Side, Top & Bottom or Frame sequential format, encoded in h264 with x264 (or in h265 with x265). Since v0.87, BD3D2MK3D can also accept lossless 3D AVC+MVC files created with MakeMKV as input.

I have written it mainly because it was difficult to do all operations necessary to do the conversion manually, and because the documentation about the method to use was poor and spread over a lot of posts in this long and technical thread: Guide to convert BD 3D to 3D Left+Right Stereoscopic and Anaglyph (http://forum.doom9.org/showthread.php?p=1663794).

My first attempt resulted in BD3D2AVS (http://forum.doom9.org/showthread.php?p=1575870#post1575870), and was based on eac3to (http://forum.doom9.org/showthread.php?t=125966), ldecod and ssifsource. Ldecod was used to decode the dependent view of the stereoscopic input streams. It works well, but it is terribly slow, and is was therefore not a good solution. Luckily, the external tools have evolved, and I wrote a second version of the GUI, called BD3D2MK3D (http://forum.doom9.org/showthread.php?p=1663794#post1663794). The original BD3D2MK3D was mainly based on ssifSource and DirectShowMVCSource, but is now also obsolete.

Starting with v0.30, BD3D2MK3D is based on new tools, much more efficient, like the tsMuxeR update for 3D blu-ray (http://forum.doom9.org/showthread.php?t=168539) and the Intel MVC decoder (https://software.intel.com/en-us/articles/intel-media-software-development-kit-intel-media-sdk) to decode the dependent view, with the help of the avisynth plugin DGMVCSource (http://forum.doom9.org/showthread.php?t=170107&highlight=DGMVCSource) by Donald Graft or FRIMSource (forum.doom9.org/showthread.php?t=169651) by videofan3d. The GUI uses also a lot of other tools. See the Help menu for a list of the most important tools.

As you can see in the original thread, the development of the method and the tools necessary to do the conversion was a collective effort. I wish to thank all contributors.

Currently, BD3D2MK3D is mature enough to have its own thread, and it's why I have created this thread. Please post all questions and bug reports related to BD3D2MK3D here, and all questions about the external tools that my GUI uses in their respective threads or in the original guide thread (http://forum.doom9.org/showthread.php?p=1663794). Thanks!

Features of BD3D2MK3D:

Convert any 3D playlist from a properly decoded blu-ray 3D to a standalone Half-side by side or Half-top & bottom (aka Over/Under) 3D MKV file.
Can also accept as input a 3D-MKV file created with MakeMKV (with the option to include the 3D MVC stream).
Can optionally convert to Full-SBS, Full-T&B or Full-Frame Sequential 3D.
Can resize the output to 720p
Can output a 3D stream compatible with 3D-Ready DLP projectors (720p Frame Sequential at 59.94fps).
Can convert the subtitle streams to 3D, using the depth stored in the original BD for each individual subtitles. (The subtitles can also be kept in 2D if you wish.)
Can hardcode (or "burn") a subtitle stream (all or forced captions only) over the video with the right depth for each individual subtitles.
The subtitles can be muxed in the original BD SUP format for an excellent quality or in VobSub (IDX/SUB) format for a better compatibility.
It is even possible, with some manual work and the help of the Tools menu of BD3D2MK3D, to use a subtitle stream coming from another source (such as a SRT downloaded from the internet or a SUP stream from the 2D BD of the same movie) and convert it to 3D with (approximately) the right depth values to mux it within the final MKV or hardcode it to the video. See the mini guide here (http://forum.doom9.org/showthread.php?p=1742601#post1742601).
Can extract the regular 5.1 DTS or AC3 cores of the DTS-HD, DTS-HD-MA, E-AC3 and TrueHD audio streams.
Can convert the audio tracks to AC3 or AAC for a better compatibility or a smaller file size.
The chapter points are automatically preserved in the final MKV file.
Can include tags about the movie (movie title, director, producer, actors, summary, comments, etc...)
Can add some seconds of black at the beginning or end of the video so that the user has some time to configure his 3D TV and to turn his active 3D glasses on before the beginning of the movie.
The encoding to h264 is made with x264 (32 or 64-bit) for an excellent image quality, and the user can select the most important encoding settings, such as the encoding mode (CQ, CRF, ABR or 2-pass), the preset, tune, profile and level. It can also specify manually additional options if he wish.
The correct 3D video mode is automatically defined in the h264 video stream (the "frame-packing"), in the header of the MKV video file (the stereoscopy mode), and optionally in the file name, so that most TVs and 3D players can switch automatically to the right 3D mode when the file is played.
The final MKV file is automatically muxed at the end of the encoding, and there is an option to shutdown the computer when everything is finished.
BD3D2MK3D has also some independent tools, notably powerful tools to convert an external subtitle stream to 3D, using the 3D depth values extracted from the original 3DBD, and optionally the subtitle positions cloned from another subtitle file.
And much more...

Download:

The latest version of BD3D2MK3D can always be downloaded here: BD3D2MK3D.7z (http://download.videohelp.com/r0lZ/BD3D2AVS/BD3D2MK3D.7z)
The obsolete BD3D2AVS based on ldecod can still be downloaded here: BD3D2AVS.7z (http://download.videohelp.com/r0lZ/BD3D2AVS/BD3D2AVS.7z)

Please note that BD3D2AVS and BD3D2MK3D v0.23 are obsolete. They are still available if you want to try the old conversion methods, but they are no longer developed, and they do not contain all features and bug fixes of the latest BD3D2MK3D. Use them at your own risk!

Installation:

Pre-required and recommended programs:

BD3D2MK3D requires Windows Vista or greater to work properly. Windows XP is not supported (due to incompatibilities in the Intel MVC decoder).
Avisynth v2.5 (http://sourceforge.net/projects/avisynth2/) must be properly installed on your computer. (It's a complex program, but you don't need to use it directly. Just install it.)
To convert the subtitles to 3D or to IDX/SUB format, it is highly recommended to install Java (https://www.java.com/en/download/manual.jsp) (32 or 64-bit). (It is possible to use BDSup2Sub++ instead of the Java version of BDSup2Sub, but it has several important bugs and it is not developed any more. It is therefore not recommended.)
It is also recommended to install a good video player that can play BD's M2TS and MPLS files and that let you select any audio or subtitle stream. The player is used only for the preview. The free players PotPlayer (http://potplayer.daum.net/) or MPC-HC (http://mpc-hc.org/) do the job well, but there are many other good players. Just avoid the Windows Media Player, that doesn't work well at all.
Since BD3D2MK3D doesn't decrypt the commercial 3DBDs, you need a way to decrypt them. That can be a good BD decrypter (http://www.videohelp.com/software/sections/decrypters-bd-hd-dvd) that can create an ISO on hard disc, such as DVDFab HD Decrypter or Ideal Blu-Ray Copy. You can also use AnyDVD HD (https://www.redfox.bz/anydvdhd.html), that decrypts the original BD on the fly. It is also possible to decrypt only the title you want and convert it to lossless 3D-MKV with MakeMKV (http://www.makemkv.com/), preferably v1.9.11 or greater. (MakeMKV is free while in beta if you use the key provided here (http://www.makemkv.com/forum2/viewtopic.php?f=5&t=1053).)

To install BD3D2MK3D, simply extract the content of the 7Z archive to a directory of your choice. BD3D2MK3D saves its settings in its installation directory, and doesn't use the Windows registry. It is therefore highly recommended to install it in a folder where you have full access rights. Do not install it in Program Files or in Program Files (x86). (If you cannot open the 7Z archive, you need a good archiver program such as 7Zip (http://www.7-zip.org/).)
If you wish, you can create a shortcut to BD3D2MK3D.exe in your Start menu (or Start Screen under Windows 8). Or you can simply open the installation folder in Explorer, and double-click BD3D2MK3D.exe to launch the program.


I got it working again, I forgot to install support programs! :)

THANK YOU!! Love it!

r0lZ
24th November 2017, 11:22
Thanks, and welcome to the Doom9 forums.
But it was not necessary to quote the whole first post.

Wildfire
25th November 2017, 01:46
Recently installed v1.3 and today I tried encoding... but it fails, on two separate computers, right after generating the project finishes:


missing operand at _@_
in expression "round(+ _@_* 1000)"
missing operand at _@_
in expression "round(+ _@_* 1000)"
(parsing expression "round(+ * 1000)")
invoked from within
"expr round($audiodelays($audiouid) * 1000)"
(procedure "GetMKVAudioDelays" line 48)
invoked from within
"GetMKVAudioDelays $mplsfile"
(procedure "GenerateAvs" line 1346)
invoked from within
"GenerateAvs"
invoked from within
".nbf5.gf.gen invoke "
invoked from within
".nbf5.gf.gen instate {pressed !disabled} { .nbf5.gf.gen state !pressed; .nbf5.gf.gen invoke } "
(command bound to event)


I'm trying to encode a 3D MKV created with MakeMKV, something I've done dozens of times before without any issues.

Support tools are installed. 32- or 64-bits AVS2YUV doesn't make any difference...

Audio track is DTS by the way, which I left untouched (no conversion to AC3 or AAC).

r0lZ
25th November 2017, 09:28
Hum, that's strange, as I have not modified that part of the code. Perhaps it's because MakeMKV has changed. Or it's because the new version of MkvInfo doesn't return exactly the same information than previously. I will have a look...

r0lZ
25th November 2017, 10:24
Indeed, it's a change in MkvInfo that caused the bug. (That bug doesn't affect the creation of a project from a BD; it happens only when a project is created from an AVC+MVC MKV.) I have modified the code so that it is now able to use indifferently the new or old versions of MkvInfo, and I hope that the output of MkvInfo will not be modified again without notice !

v1.4 (November 25, 2017)
- Fix: Crash when creating a project from a MKV (due to changes in the output of MkvInfo v18.0)

Download: BD3D2MK3D.7z (http://download.videohelp.com/r0lZ/BD3D2AVS/BD3D2MK3D.7z)

Wildfire
25th November 2017, 11:15
Indeed, it's a change in MkvInfo that caused the bug. (That bug doesn't affect the creation of a project from a BD; it happens only when a project is created from an AVC+MVC MKV.) I have modified the code so that it is now able to use indifferently the new or old versions of MkvInfo, and I hope that the output of MkvInfo will not be modified again without notice !

Download: BD3D2MK3D.7z (http://download.videohelp.com/r0lZ/BD3D2AVS/BD3D2MK3D.7z)

Thanks! I didn't expect it to be fixed this soon :)

I'll have a look and see if it works now.

-- Edit: yup, after creating the project encoding starts as it should. Yay! :)

frank
26th November 2017, 08:44
Latest eac3to version is now v3.34 and supports more new formats.
v3.34
* fixed: "min/maxPlayListRuntime" worked for listing, but not processing

v3.33
* fixed a couple of HEVC bitstream bugs
* added new parameter "-minPlayListRuntime=0:15:00"
* added new parameter "-maxPlayListRuntime=4:00:00"
* added support for ".264" and ".265" file extensions

v3.32
* added support for UHD Blu-Ray playlists and clip infos
* added support for h265/HEVC bitstream parsing
* added support for m2ts h265/HEVC splitting
* added support for MKV h265/HEVC splitting
* added support for h265/HEVC framerate modifications
* added detection for Dolby Vision Enhancement Layer Maybe worth an update.

r0lZ
26th November 2017, 11:05
OK, I'll update it for the next release, although it is normally used only to convert audio streams well supported with v3.31.
Anyway, thanks for the info.

kevbo
29th November 2017, 04:16
Sorry for my delay in responding...the US Thanksgiving weekend got the best of me and I forgot.

I see. But does that means that you see a relatively small image in the center of the view, like with a TV in a room? If it's the case, that reduces greatly the interest of the technique.

No, it isn't all that small. The lenses in the headset "grow" the image. Shop around on Amazon: some of the newer headsets actually talk about having like 110-120 degree FOV.

I have had a look at the VR players on the Play Store. There is a lot of apps. Not sure what is the best. Can you conform that AAA VR Cinema and VR Player can decode the 3D videos encoded in HEVC with x265 ?

I'm pretty sure that those players just use the built-in media framework of your device to play the video, and just wrap it in 3D GPU Shaders to shape the image. As such, decoding x.265 would depend entirely on the version of Android you have, and your hardware support. I wouldn't attempt x.265 in software, and I'm using an old Nexus 5 that doesn't support it in hardware, so I've honestly not tried x.265. If you know your hardware can play an x.265 video normally, it should be OK in the 3D players.

r0lZ
29th November 2017, 10:38
OK, good information. Thanks again.

Have you already tested the new option to downmix the audio streams to ProLogic or stereo ? I did some tests myself, but rapidly, and only with a few short clips. In particular, I'm not sure the downmix is correctly made when the source is already in AC3 or THD.

sjwoo
6th December 2017, 17:25
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

This reply is really old, but it's because I just started using BD3D2MK3D! I got this error, too. It's because I didn't have Avisynth installed.

r0lZ
6th December 2017, 17:37
This reply is really old ...Yeah, but thanks for the reply. I will try to add a check to ensure that Avisynth is correctly installed when BD3D2MK3D starts.

Wildfire
6th December 2017, 19:51
I've been experiencing x264 encoder crashes (the basic "has stopped working" error). Switching back to the previous x264 release fixes everything. Am I the only one with this problem?

r0lZ
7th December 2017, 12:28
I've just launched a new encoding to verify, and it has started without problem. I will report here if it crashes before the end of the encoding.
Can you confirm that it's v0.152.2851 (Komisar build) that crashes? Do you use the 64 or 32-bit version?

Wildfire
7th December 2017, 18:57
I've just launched a new encoding to verify, and it has started without problem. I will report here if it crashes before the end of the encoding.
Can you confirm that it's v0.152.2851 (Komisar build) that crashes? Do you use the 64 or 32-bit version?

Yes, that version, 64-bit but I also tried 32-bit.

Currently I'm on v0.150.2833.0 and the encodes that failed with v0.152.2851 work fine with this older version.

I'll try a new encode tonight with the current version of x264 and I'll check if I can dig up any errors in the Windows log files...

r0lZ
7th December 2017, 22:05
No problem here with v0.152.2851 64-bit.

Are you sure that your Avisynth is correctly installed ? It is possible that x264 crashes because Avisynth sends a bad frame or issues an error not correctly handled by x264. Also, I recommend to use only the "standard" Avisynth v2.60. Other versions can have many bugs or subtle differences gthat can be incompatible with BD3D2MK3D.

Another possible cause of crash is a bad BD, possibly with a read-error, or a BD not correctly decrypted. But of course, it the encoding crashes with several BDs, you can exclude this case.

Wildfire
7th December 2017, 22:27
No problem here with v0.152.2851 64-bit.

Are you sure that your Avisynth is correctly installed ? It is possible that x264 crashes because Avisynth sends a bad frame or issues an error not correctly handled by x264. Also, I recommend to use only the "standard" Avisynth v2.60. Other versions can have many bugs or subtle differences gthat can be incompatible with BD3D2MK3D.

Another possible cause of crash is a bad BD, possibly with a read-error, or a BD not correctly decrypted. But of course, it the encoding crashes with several BDs, you can exclude this case.

I started having problems with a recent BD3D2MK3D update, which included the new x264. I never had problems before.

The issue also persists on my 2nd PC so that's why I thought it might be a software issue, and after replacing the x264 executable with the previous release my suspicion was confirmed.

I'm using AviSynth 2.60 as found on https://sourceforge.net/projects/avisynth2/ - the standard release, as you call it.

I use MakeMKV to create 3D MKV's which then serve as input for BD3D2MK3D. Yes, it's the latest version (1.10.8).

I'm currently trying a few new encodes. The crashes occured on several movies but I forgot which ones exactly. :P

r0lZ
8th December 2017, 01:19
I see. Unfortunately, there is nothing I can do, except release a new version of BD3D2MK3D with the last good x264, or wait the next x264 version and hope that it will be fixed. Anyway, the problem doesn't come from my code, as nothing has changed in the x264 command and the way it is launched.

Perhaps you could try to contact the x264 devs ? I can't do it myself, as I don't have the problem. And I will be grateful if you can check the next stable release of x264 before I release it with BD3D2MK3D.

Wildfire
8th December 2017, 10:31
Hmmm.... tried a new encode and while I absolutely swear I had x264 crashes before, now avs2yuv.exe crashes...

From Windows log files (in Dutch, but the relevant parts will be understandable):


Naam van toepassing met fout: avs2yuv.exe, versie: 0.0.0.0, tijdstempel: 0x4228f465
Naam van module met fout: ntdll.dll, versie: 10.0.16299.64, tijdstempel: 0xac8afc81
Uitzonderingscode: 0xc0000005
Foutmarge: 0x0003f500
Id van proces met fout: 0x2060
Starttijd van toepassing met fout: 0x01d37006d002b8e3
Pad naar toepassing met fout: C:\Program Files (x86)\BD3D2MK3D\toolset\avs2yuv.exe
Pad naar module met fout: C:\Windows\SYSTEM32\ntdll.dll
Rapport-id: e0af5b8c-0f0a-4cad-8098-85fd22ef646b
Volledige pakketnaam met fout:
Relatieve toepassings-id van pakket met fout:



Foutbucket 1460961521198399896, type 1
Naam van gebeurtenis: APPCRASH
Antwoord: Niet beschikbaar
Id van CAB-bestand: 0

Handtekening van probleem:
P1: avs2yuv.exe
P2: 0.0.0.0
P3: 4228f465
P4: ntdll.dll
P5: 10.0.16299.64
P6: ac8afc81
P7: c0000005
P8: 0003f500
P9:
P10:

Toegevoegde bestanden:
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER4A2B.tmp.dmp
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER4C7F.tmp.WERInternalMetadata.xml
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER4C8A.tmp.csv
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER4CCA.tmp.txt

Deze bestanden zijn mogelijk hier beschikbaar:
C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_avs2yuv.exe_81c98f127b2e509fff6fa7907dd996155560da26_b83b6774_2f30597b

Analysesymbool:
Opnieuw zoeken naar oplossing: 0
Rapport-id: e0af5b8c-0f0a-4cad-8098-85fd22ef646b
Rapportstatus: 268435456
Opgedeelde bucket: 55069c1852968d10c44660c3558b8198

r0lZ
8th December 2017, 12:52
OK, that seems to confirm that there is something wrong with avisynth or the original BD (or 3D MKV).

If you use the 32-bit version of x264 (not x265), avs2yuv is not necessary and therefore not used. x264 loads the avisynth script directly. It might be a good idea to test that with the same source, as we will know if avs2yuv is the culprit.

Also, you can try to use another version of avs2yuv. There are 4 versions here (http://komisar.gin.by/tools/avs2yuv/). Of course, the 64-bit version is not suitable. The version distributed with BD3D2MK3D is 0.24, but its size is 52KB. All komisar builds have a different size, so try the 3 32-bit versions.

I note also that ntdll.dll is involved in the crash. Perhaps it is the real culprit. Could it be caused by a recent M$ update ? What version of Windows do you use ?

Wildfire
8th December 2017, 22:50
I'm on Windows 10 Pro 64-bit, fully up-to-date (Fall Creators Update including all updates up to today).

I managed to get a x264 crash. It crashes when starting the 2nd pass... and that's with the 32-bit x264.


Naam van toepassing met fout: x264_8bit_x86.exe, versie: 0.152.2851.0, tijdstempel: 0x59581c4e
Naam van module met fout: x264_8bit_x86.exe, versie: 0.152.2851.0, tijdstempel: 0x59581c4e
Uitzonderingscode: 0xc0000005
Foutmarge: 0x0002199e
Id van proces met fout: 0x1278
Starttijd van toepassing met fout: 0x01d37012a63aefb1
Pad naar toepassing met fout: C:\Program Files (x86)\BD3D2MK3D\toolset\x264_8bit_x86.exe
Pad naar module met fout: C:\Program Files (x86)\BD3D2MK3D\toolset\x264_8bit_x86.exe
Rapport-id: fd94f01d-190b-4506-b020-f73162ef25f7
Volledige pakketnaam met fout:
Relatieve toepassings-id van pakket met fout:


Foutbucket 1409739612789152407, type 1
Naam van gebeurtenis: APPCRASH
Antwoord: Niet beschikbaar
Id van CAB-bestand: 0

Handtekening van probleem:
P1: x264_8bit_x86.exe
P2: 0.152.2851.0
P3: 59581c4e
P4: x264_8bit_x86.exe
P5: 0.152.2851.0
P6: 59581c4e
P7: c0000005
P8: 0002199e
P9:
P10:

Toegevoegde bestanden:
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER8597.tmp.dmp
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER8A3D.tmp.WERInternalMetadata.xml
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER8A49.tmp.csv
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER8A88.tmp.txt

Deze bestanden zijn mogelijk hier beschikbaar:
C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_x264_8bit_x86.ex_d7f63a3eaf768c27dd490e86c91523ad361c83_7283c821_12b59025

Analysesymbool:
Opnieuw zoeken naar oplossing: 0
Rapport-id: fd94f01d-190b-4506-b020-f73162ef25f7
Rapportstatus: 268435456
Opgedeelde bucket: 8f75c02b66029f43539066b56e181a97


(and, as stated before, the issue also occurs on another computer, so a software issue seems most likely)

r0lZ
9th December 2017, 12:02
Yes, it seems that it's x264 that has a bug, but if x264 crashes sometimes then avs2yuv or even ntdll.dll, it is not easy to know where the bug really is. Is your other machine also running Windows 10 ?

Usually, I encode in CRF, but to check if I can reproduce the problem, I have just finished a 2-pass encoding of a (very small) clip, and it has not crashed. I'm still using Win7 (64-bit) because Win10 is currently still very unstable, and I hate that OS. Maybe there is something specific in Win10 that is not compatible with x264 ? But I suppose that someone else using Win10 and having experienced similar problems would have replied to this thread. It's why I persist to think that there is something wrong with your machine(s). The question is what !

Also, may I know why you encode in 2-pass ? As I've already explained several times (for example here (https://forum.doom9.org/showthread.php?p=1803343#post1803343)), it is always a bad idea to use 2-pass, unless you need to control exactly the final file size (for example to burn the final MKV on a DVD). So, if it's when starting the second pass that x264 crashes, I strongly suggest to use CRF instead. You will obtain a slightly better quality for the same file size, and no crash any more! ;-)

But of course, it will be better to know why the crash occurs...

Wildfire
9th December 2017, 14:57
Yes, it seems that it's x264 that has a bug, but if x264 crashes sometimes then avs2yuv or even ntdll.dll, it is not easy to know where the bug really is. Is your other machine also running Windows 10 ?

Usually, I encode in CRF, but to check if I can reproduce the problem, I have just finished a 2-pass encoding of a (very small) clip, and it has not crashed. I'm still using Win7 (64-bit) because Win10 is currently still very unstable, and I hate that OS. Maybe there is something specific in Win10 that is not compatible with x264 ? But I suppose that someone else using Win10 and having experienced similar problems would have replied to this thread. It's why I persist to think that there is something wrong with your machine(s). The question is what !

Also, may I know why you encode in 2-pass ? As I've already explained several times (for example here (https://forum.doom9.org/showthread.php?p=1803343#post1803343)), it is always a bad idea to use 2-pass, unless you need to control exactly the final file size (for example to burn the final MKV on a DVD). So, if it's when starting the second pass that x264 crashes, I strongly suggest to use CRF instead. You will obtain a slightly better quality for the same file size, and no crash any more! ;-)

But of course, it will be better to know why the crash occurs...


Windows 10 unstable? Not in my experience, in fact it's the exact opposite: it's really stable. Both my computers (yes, both Windows 10) run really smooth, I have no problems at all other than some crashes with BD3D2MK3D. And those crashes started occuring recently on both systems (before that, I already did dozens of encodes on both machines without any problem at all), although I cannot pinpoint exactly when that was...

To be sure, recently I performed several hardware tests (storage, memory, CPU) and no problems popped up. Even under extreme stress my system runs fine and no CPU overheating or anything like that.

Why 2-pass? Well, you may explain CRF into the most obscure details if you want, but I still think that 2-pass encoding at best settings just "feels" better to me. Also, I really like having a predictable file size even though the encodes go to my NAS which has ample storage space.

r0lZ
9th December 2017, 15:50
I have not a great experience of Win10 (although I have a partition with Win10 on the Win7 PC but I don't use it often). But I follow the RSS feed of The Windows Club (www.thewindowsclub.com), and although they are real M$ enthusiasts, almost every day they reveal a new problem with Win10. In the other hand, Win7 is old, but without the garbage of the new Windows "universal" apps, and totally stable (although they have made a questionable update recently). Anyway, on my machine, I can't reproduce the x264 problem. I must agree that that doesn't mean that it is more stable because the problem might be caused by other things (the CPU for example), but in the absence of another explanation, I must accuse the OS.

According to the x264 authors themselves, 2-pass is slightly less good because specifying a bitrate constraints the encoding between rigid walls. CRF use exactly the same encoding algorithms, but without any constraint. It is therefore free to use the most appropriate bitrate during the whole movie. 2-pass is of course much better than 1-pass ABR because the first pass is used to evaluate approximately what bitrate to use for the different parts of the movie, but it cannot predict exactly the final bitrate. Hence the slight quality difference with CRF. Unfortunately, there are many web sites that suggest to use 2-pass for the best quality, but it's because they are not well informed or their suggestions apply only to encoders without CRF (like the old encoder of DVDFab that had only 1 or 2-pass). Anyway, I just wanted to suggest to use CRF to avoid the crash during the second pass. You are of course free to use 2-pass if you want.

viperlogic
15th December 2017, 22:10
Getting x264 crashes on both win7 (32-bit) and win10 (64-bit) immediately when running __encode_3D.cmd. Windows pop up window of "H.264 (MPEG-4 AVC) encoder has stopped working".

Win7....
Problem signature:
Problem Event Name: BEX
Application Name: x264_8bit_x86.exe
Application Version: 0.152.2851.0
Application Timestamp: 59581c4e
Fault Module Name: FRIMSource.dll
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 596070dd
Exception Offset: 0002ca2c
Exception Code: c0000417
Exception Data: 00000000
OS Version: 6.1.7601.2.1.0.256.1
Locale ID: 6153
Additional Information 1: 2d06
Additional Information 2: 2d069ee6c3d46ad12eaf589f86850707
Additional Information 3: 633c
Additional Information 4: 633c17c95b8b015860e3dddcf1a1cd9a


win10...
Log Name: Application
Source: Application Error
Date: 15/12/2017 21:17:07
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User: N/A
Computer: ADMINRG-T59RE8R
Description:
Faulting application name: x264_8bit_x86.exe, version: 0.152.2851.0, time stamp: 0x59581c4e
Faulting module name: FRIMSource.dll, version: 0.0.0.0, time stamp: 0x596070dd
Exception code: 0xc0000409
Fault offset: 0x0002ca1a
Faulting process id: 0xeec
Faulting application start time: 0x01d375ea0f98f4a8
Faulting application path: C:\Users\johndoe\Downloads\BD3D2MK3D\BD3D2MK3D\toolset\x264_8bit_x86.exe
Faulting module path: C:\Users\johndoe\Downloads\BD3D2MK3D\BD3D2MK3D\toolset\FRIMSource.dll
Report Id: 3132e220-e0a2-4fc5-9cf2-256e90da8568
Faulting package full name:
Faulting package-relative application ID:
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Level>2</Level>
<Task>100</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2017-12-15T21:17:07.601977900Z" />
<EventRecordID>1714</EventRecordID>
<Channel>Application</Channel>
<Computer>ADMINRG-T59RE8R</Computer>
<Security />
</System>
<EventData>
<Data>x264_8bit_x86.exe</Data>
<Data>0.152.2851.0</Data>
<Data>59581c4e</Data>
<Data>FRIMSource.dll</Data>
<Data>0.0.0.0</Data>
<Data>596070dd</Data>
<Data>c0000409</Data>
<Data>0002ca1a</Data>
<Data>eec</Data>
<Data>01d375ea0f98f4a8</Data>
<Data>C:\Users\johndoe\Downloads\BD3D2MK3D\BD3D2MK3D\toolset\x264_8bit_x86.exe</Data>
<Data>C:\Users\johndoe\Downloads\BD3D2MK3D\BD3D2MK3D\toolset\FRIMSource.dll</Data>
<Data>3132e220-e0a2-4fc5-9cf2-256e90da8568</Data>
<Data>
</Data>
<Data>
</Data>
</EventData>
</Event>

This is against the Valerian and the City of a thousand planets 1080p 3D ISO by ESiR release group

Let me know what logs are required to further troubleshoot. Thx

r0lZ
16th December 2017, 11:07
It seems that you are experiencing the same problem that Wildfire has reported above (https://forum.doom9.org/showthread.php?p=1826483#post1826483). Can you try another version of x264 (older here (https://download.videolan.org/x264/binaries/), or another build here (http://komisar.gin.by/) or here (http://msystem.waw.pl/x265/)) ? Unfortunately, I can't reproduce the problem so I can't check myself.

Also, I note in your two logs "Fault Module Name: FRIMSource.dll", so the problem might be caused by FRIMSource as well. So, please try to set Settings -> MVC Decoder -> Use DGMVCSource and/or set the Hardware Acceleration to Disabled.

Thanks anyway for having reported the problem, and welcome to the Doom9 forum, viperlogic !

viperlogic
18th December 2017, 11:01
It seems that you are experiencing the same problem that Wildfire has reported above (https://forum.doom9.org/showthread.php?p=1826483#post1826483). Can you try another version of x264 (older here (https://download.videolan.org/x264/binaries/), or another build here (http://komisar.gin.by/) or here (http://msystem.waw.pl/x265/)) ? Unfortunately, I can't reproduce the problem so I can't check myself.

Also, I note in your two logs "Fault Module Name: FRIMSource.dll", so the problem might be caused by FRIMSource as well. So, please try to set Settings -> MVC Decoder -> Use DGMVCSource and/or set the Hardware Acceleration to Disabled.

Thanks anyway for having reported the problem, and welcome to the Doom9 forum, viperlogic !

Hardware Acceleration to Disabled did the trick!

What settings should be used for no drop in quality, eg the original ISO is 44G, the intermediate .264 is 24G, mvc is 12G and audio is 1.5G resulting in a finished mkv of only 5.3G

r0lZ
18th December 2017, 11:30
Try to update your Intel CPU driver. That may solve the problem even with hardware acceleration enabled. When hardware acceleration is enabled, BD3D2MK3D uses the DLL provided by Intel to decode the video. It is normally somewhat faster than the software DLL provided with BD3D2MK3D, but it is often unstable. It is therefore necessary to always check if you have the latest version.

CRF 0 is lossless, but you will obtain a very large file, most probably much bigger than the original AVC + MVC streams together. around 50 GB. IMO, it doesn't make sense to decrease the CRF value below 18. x264 is a much better h264 encoder than most other encoders, probably including the encoder that has been used to encode the original BD. It is therefore normal to obtain a small file size, especially if the movie is made of CGI graphics with very smooth and clean images, without much noise. Personally, I consider a final file size of 5GB as perfectly normal, but if you are really picky, try to decrease the CRF value. Decreasing the value by 3 means approximately doubling the size of the video stream, so try CRF 20 and you should obtain approximately a 8 GB MKV (with the audio stream).

Anyway, don't forget that the videos on BD are very big only (mostly) for commercial reasons. Trust your eyes and don't trust the guys who explain that you must use a certain bitrate for a good quality. It's pure nonsense, as I have already explained several times elsewhere (https://forum.doom9.org/showthread.php?p=1803343#post1803343).

Triple-M
1st January 2018, 12:17
Hi, Happy New Year to all of you!

I have an 4K TV and i remember that an 4K TV shows 3D in FullHD instead of Half Resolution on a FullHD TV, is this right? If it's right, should i choose a certain setting in your App? Full SBS perhaps?

r0lZ
1st January 2018, 14:31
I'm not sure it's right. That depends probably of the 4K TV, but I suppose that it's indeed an advantage of the 4K 3D TVs.
And yes, Full-SBS (or Full-T&B) is the way to create a full-res 3D MKV. Verify that your TV supports that format, but that should be the case, as 4K TVs have buffers large enough to support that format.

Happy new year to everybody!

hiltr0n
15th January 2018, 05:23
So I came across an issue I haven't had to deal with before. Any assistance would be great. I am trying to hard burn the subtitles from Avatar. On all of my 3D MKV's I do full side by side and on other hard burn subtitles I haven't had any issue. This is the error I'm getting. Any idea how to get the subtitles hard burned? This movie needs them as there's a fair amount of forced subtitles.

Job finished Sun Jan 14 17:26:57 MST 2018
Whole job took 8 minutes and 31 seconds.

Done with errors!

* BDSup2Sub "MKV3D.track_3.Eng.2D.sup": ERROR: Index: 3, Size: 3There were 1 error
* BDSup2Sub "MKV3D.track_3.Eng.2D.sup": java.lang.IndexOutOfBoundsException: Index: 3, Size: 3
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at bdsup2sub.supstream.bd.SubPictureBD.getImageWidth(SubPictureBD.java:94)
at bdsup2sub.supstream.bd.SupBDParser.parse(SupBDParser.java:110)
at bdsup2sub.supstream.bd.SupBDParser.<init>(SupBDParser.java:48)
at bdsup2sub.supstream.bd.SupBD.<init>(SupBD.java:50)
at bdsup2sub.core.Core.readSup(Core.java:442)
at bdsup2sub.BDSup2Sub.runCliLoop(BDSup2Sub.java:290)
at bdsup2sub.BDSup2Sub.execute(BDSup2Sub.java:233)
at bdsup2sub.BDSup2Sub.run(BDSup2Sub.java:52)
at bdsup2sub.BDSup2Sub.main(BDSup2Sub.java:42)
Generating the avisynth script anyway. The subtitles will not be hardcoded. You may have to convert them manually and edit the AVS script.
* Can't convert "MKV3D.track_3.Eng.sup" to 3D BD SUP!
* BDSup2Sub "MKV3D.track_3.Eng.2D.idx": ERROR: Index: 3, Size: 3There were 1 error
* BDSup2Sub "MKV3D.track_3.Eng.2D.idx": java.lang.IndexOutOfBoundsException: Index: 3, Size: 3
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at bdsup2sub.supstream.bd.SubPictureBD.getImageWidth(SubPictureBD.java:94)
at bdsup2sub.supstream.bd.SupBDParser.parse(SupBDParser.java:110)
at bdsup2sub.supstream.bd.SupBDParser.<init>(SupBDParser.java:48)
at bdsup2sub.supstream.bd.SupBD.<init>(SupBD.java:50)
at bdsup2sub.core.Core.readSup(Core.java:442)
at bdsup2sub.BDSup2Sub.runCliLoop(BDSup2Sub.java:290)
at bdsup2sub.BDSup2Sub.execute(BDSup2Sub.java:233)
at bdsup2sub.BDSup2Sub.run(BDSup2Sub.java:52)
at bdsup2sub.BDSup2Sub.main(BDSup2Sub.java:42)
Generating the avisynth script anyway. The subtitles will not be hardcoded. You may have to convert them manually and edit the AVS script.

Launch "__ENCODE_3D_LAUNCHER.cmd" to encode the 3D video (and optionally mux to MKV).

Use a delay of 4004 ms if you mux the files yourself.

r0lZ
15th January 2018, 11:46
The subtitles from the Avatar 3DBD are very difficult to handle. I have recently taken an inventory of the bugs of the various versions of BDSup2Sub (see here (https://forum.doom9.org/showthread.php?p=1828627#post1828627) and the following posts) and Avatar was among the "difficult streams" I've used to do my tests.

I have just implemented in BD3D2MK3D a new "universal" method to convert any stream to 3D, including Avatar, hopefully without problem. It uses the ++ and Java versions when appropriate. It is somewhat difficult to explain, so I will release the new version as soon as possible so that you can use it. If you really want to try the new method yourself, here are brief instructions:


Convert the ORIGINAL subtitle stream with BDSup2Sub++ v1.0.2 to another BD SUP file. (You can find BDSup2Sub++ in the "toolset" folder of BD3D2MK3D. It is important to use v1.0.2, and not any other version including v1.0.2a.) When the Conversion Options window is shown, be sure to tick the "Change frame rate" option and verify that the FPS Source and Target are both set to 23.976. (This is necessary for ALL conversions with ALL versions of BDSup2Sub.) If you are interested in the forced subtitles only, tick that option.

Close and re-open BDSup2Sub++, and this time, load the new SUP you have created in step 1. Export to XML/PNG in a new folder. (Again, verify the Change frame rate option when necessary.)

Open BD3D2MK3D and verify that the Settings -> BDSup2Sub -> Use BDSup2Sub.jar option is selected. (That should be the case according to the log file you have posted.)

In BD3D2MK3D, use the menu "Subtitle tools -> Convert Subtitles to 3D (with 3D-Planes/OFS)". Select the XML file you have just created in step 2 as the Input subtitle stream". Set the output file format to BD SUP and enter the output file name. (You should save it in the Avatar\XXXXX project folder.) Define also the 3D-Plane (OFS) file to use. (You can see what file to use near the end of the 3D-Planes.log file created by BD3D2MK3D when the project has been created, or in the first tab of BD3D2MK3D when the movie is loaded.) Verify the other options and convert the subtitles to 3D.

Just to be sure, open the 3D SUP file in any version of BDSup2Sub, and verify if the subtitles look correct.

Now, open "__ENCODE_3D_MOVIE.avs" in a text editor or notepad. You should see the following lines:

##LoadPlugin(D:\Tcl\work\BD3D2MK3D\toolset\VSFilter.dll")
#LoadPlugin("D:\Tcl\work\BD3D2MK3D\toolset\SupTitle.dll")

[...]

# Hardcode subtitles
##VobSub(".sub")
#SupTitle(".sup")

Change them like this:

##LoadPlugin(D:\Tcl\work\BD3D2MK3D\toolset\VSFilter.dll")
LoadPlugin("D:\Tcl\work\BD3D2MK3D\toolset\SupTitle.dll")

[...]

# Hardcode subtitles
##VobSub(".sub")
SupTitle("your_3D_subtitle_stream.sup")

(where your_3D_subtitle_stream.sup is the final 3D SUP file created in step 4.)
Launch __ENCODE_3D_LAUNCHER.cmd as usual.

This method should work. At least, it works with the French subtitles from my version of Avatar.

Good luck!

r0lZ
15th January 2018, 14:56
OK, here is the new version that should convert the Avatar and other difficult subtitles to 3D correctly.

Note that now, BDSup2Sub++ is used by default when a BD SUP file is opened, as the Java version has too many bugs. Unfortunately, BDSup2Sub++ opens an useless command prompt window when it starts. I have added a little tool (HideWindow.exe) written in AutoHotkey in the toolset folder to close it immediately, and restore the focus to the window that had it when BDSup2Sub++ stole it, but it is not possible to avoid it completely. There is therefore an annoying flash when BD3D2MK3D converts the BD SUP files to 3D or to DVD SUB. I think that that annoyance is better than risking to produce bad 3D subtitles.

Note also that the Java version of BDSup2Sub is still necessary to convert the XML/PNG 3D subtitles to the final BD SUP or DVD SUB format, as BDSup2Sub++ has a big bug when it loads the XML/PNG format. Luckily, it seems that the Java version is OK for that job.

It's an important new version of BD3D2MK3D, as it fixes other problems as well, and it includes a new subtitle tool: Combine Multiple PDS/ODS definitions. It is used internally when there are several subtitles appearing AT THE SAME TIME on screen. It merges them as a single subtitle, and modifies the XML file accordingly. I have added a GUI to use it yourself if you need it, but you should never need it for the subtitles converted to 3D automatically by BD3D2MK3D.

I have released this version now, because hiltr0n may need it to convert its Avatar BD, but I have not tested it carefully, so some bugs can be present. Let me know if there are still some problems when encoding with x264 in hardware mode, and if the subtitles conversions work as expected.

v1.5 (January 15, 2018)
- BD3D2MK3D uses now an "universal" method to convert the subtitles to 3D or DVD SUB, that should hopefully work well in all cases. As a consequence, it is not possible any more to select the preferred version of BDSup2Sub, as the Java or C++ version is used automatically when appropriate.
- New Subtitle tool: Combine Multiple PDS/ODS definitions, used to merge the multiple subtitles (and used internally by the new universal conversion method). See help for more info.
- When a 2D BD Sup subtitle file is muxed in the final MKV, the original Sup extracted from the BD is now used instead of the converted .2D.sup file, to avoid the bugs of BDSup2Sub.
- The audio conversion and the logic used to build the labels of the audio tracks in the final MKV have been rewritten completely and improved. This fixes several bugs introduced with the conversion to Pro-Logic and Stereo in v1.3.
- Updated eac3to and its associated libraries to the latest version (v3.34)
- Updated the Mkvtoolnix exes to the latest version (v19.0.0)
- Updated tsMuxeR to the latest version (v2.6.11)

Download: BD3D2MK3D.7z (http://download.videohelp.com/r0lZ/BD3D2AVS/BD3D2MK3D.7z)

hiltr0n
15th January 2018, 15:32
Wow! Thanks for the quick reply. I'll set it encoding tonight and verify.

hubblec4
15th January 2018, 17:42
...Unfortunately, BDSup2Sub++ opens an useless command prompt window when it starts. I have added a little tool (HideWindow.exe) written in AutoHotkey in the toolset folder to close it immediately, and restore the focus to the window that had it when BDSup2Sub++ stole it, but it is not possible to avoid it completely. There is therefore an annoying flash when BD3D2MK3D converts the BD SUP files to 3D or to DVD SUB. I think that that annoyance is better than risking to produce bad 3D subtitles.

I use also BDSup2Sub++ for some jobs and the command prompt is not shown when the GUI is opened.
A simple command: HideWindow:=true.


EDIT:
The latest Windows version of tsMuxeR is 2.6.12 (https://forum.videohelp.com/attachments/44412-1516034881/tsMuxeR_2.6.12(Windows).7z)

------------ Network Optix tsMuxeR 2.6.12 ----------------------
- several minor bugs fixed

r0lZ
15th January 2018, 18:09
A simple command: HideWindow:=true
That may work with some languages or environments, but I have no way to issue this command from Tcl/Tk.
But thanks for the hint!
The latest Windows version of tsMuxeR is 2.6.12 (https://forum.videohelp.com/attachments/44412-1516034881/tsMuxeR_2.6.12(Windows).7z)
Is it an official release? In the official tsMuxeR thread (https://forum.doom9.org/showthread.php?t=168539), the latest version is still 2.6.11.

hubblec4
15th January 2018, 19:37
Is it an official release? In the official tsMuxeR thread (https://forum.doom9.org/showthread.php?t=168539), the latest version is still 2.6.11.

I can't say this surely, but I'm sure I downloaded this version from the tsMuxeR thread for many years.

r0lZ
15th January 2018, 19:55
Ooops, I did an error. I don't know if v2.6.11 or v2.6.12 is the latest official release, but I forgot that I have banned that two versions due to a big bug. In the dialog that shows the version of tsMuxeR that is distributed with BD3D2MK3D, you will see this:

---------------------------
BD3D2MK3D
---------------------------
Network Optix tsMuxeR. Version 2.6.11. www.networkoptix.com

WARNING: Do NOT use v2.6.11 or v2.6.12 as they have a big bug with the time codes of the subtitle streams of some BDs. The last known good version is v2.6.9.

Visit home page?
---------------------------
Yes No
---------------------------

I forgot that bug, but I should NOT have updated it to v2.6.11, and I don't want v2.6.12 either. I will immediately release a new version of BD2D2MK3D with v2.6.9, as it should.

hubblec4
15th January 2018, 20:05
Thanks for this Info.

r0lZ
15th January 2018, 20:10
OK, here is the latest GOOD version of BD3D2MK3D, that includes tsMuxeR v2.6.9 again.

I have not updated the version number, as BD3D2MK3D itself has not changed. Please download this version if you have already downloaded v1.5 before today, January 15, 2018 at 19:10 GMT.

Download: BD3D2MK3D.7z (http://download.videohelp.com/r0lZ/BD3D2AVS/BD3D2MK3D.7z)

hiltr0n
16th January 2018, 16:49
Thanks r0lZ. I tried the new build and got the error pasted below. I subsequently tried the manual method and it appears the BDSup2Sub++ hangs when I try to load the subtitle file. I tried both one that I manually extracted with MKVTools and the one extracted in the BD3D2MK3D project folder with similar results. Later today I'm going to try on another machine to see if it is that. I can upload the subtitle file if you'd like to see if it works on yours.

Job finished Mon Jan 15 23:06:15 MST 2018
Whole job took 9 minutes and 32 seconds.

Done with warnings!

* Can't convert "MKV3D.track_3.Eng.sup" to 3D BD SUP!

r0lZ
16th January 2018, 17:53
Strange. I did Avatar with hardburned French subtitles without much problems.
I can upload the subtitle file if you'd like to see if it works on yours.
Yes, please do it, and send me the link via PM (for copyright reasons). I will try it with the different versions of BDSup2Sub I have here.

hiltr0n
16th January 2018, 18:26
PM sent

frank
16th January 2018, 21:07
The subs from Avatar are really somewhat strange.

AFAIK there were errors with end time.
I solved the problem by using an older version of BDSup2Sub.jar. ->v4.01
Read the Avatar sup with BDSup2Sub401.jar and store again. That worked.

hubblec4
17th January 2018, 00:00
So many issues with all the BDSup2Sub editions, nobody there who will write a better SUP-Tool?

hiltr0n
17th January 2018, 05:49
So did a few more tests with other versions of BDSups2Sub and they all crash, or have the same error. The closest I've gotten is with the latest version of BD3D2MK3D. It extracts the PNG files into a folder but doesn't complete the temp_2D.xml file or the SUP conversion. Kind of at a loss.

hiltr0n
17th January 2018, 06:48
Ok, tried one last thing. I think my previous issues were because when I ripped my BD in MakeMKV, I only selected the forced subtitles checkbox. I re-ripped the BD with both tracks (normal subs and forced). I created a MD3D2MK3D project with that new MKV + sub track and it created the files and scripts accurately, but I couldn't see an option to only do forced on that one. So I did the manual method as well and extracted / converted only the forced subtitles and replaced the old ones with the new ones and updated the script files. It's converting now so I'll see if it worked tomorrow morning, but this is the closest I've gotten.

r0lZ
17th January 2018, 12:33
OK, so it seems that MakeMKV has trouble extracting the forced subtitles from the original (complete) stream. It's not really astonishing, because the Avatar subtitles are really bizarre. Here is what I know about the Avatar subtitles and the various versions of BDSup2Sub++ I've tested.

BDSupsSubEnhanced and BDSup2Sub++ v1.0.2 can handle the subtitles with "multiple PDS/ODS definitions" (several different subtitles appearing at the same time on screen). BDSup2Sub.jar and all versions of BDSup2Sub++ before 1.0.2 as well as 1.0.2a cannot handle them, and they issue only a warning. (BDSup2SubEnhanced is theoretically able to handle them, but it cannot save them to XML/PNG, so it's not a good choice.) Since BD3D2MK3D uses now only BDSup2Sub++ 1.0.2 to read the original SUP streams, it should be able to process them correctly. Furthermore, since there is only a single 3D-Plane per subtitle stream in a BD3D, all subtitles appearing at the same time on screen must share the same depth, and therefore I guess that multiple ODS are probably never used for 3D movies.

Unfortunately, BDSup2Sub++ has some troubles when it reads some subtitle streams, notably the Avatar streams. It finds multiple ODS when there is only a single ODS (false positives). Therefore, when it converts the subtitle stream to XML/PNG, it creates several bitmaps for the same subtitle, but all of them but one are useless. And it includes them in the XML file, with several problems as well, such as width, height, X and Y positions being 0, or references to non-existing PNG files. So, when the latest version of BD3D2MK3D (v1.5) converts the subtitles to 3D, it checks the XML for that kind of errors, and if it find at least one bad definition, it converts the original BD SUP stream again to BD SUP format with BDSup2Sub++. That fixes "magically" the problem of the fake multiple ODS. (If there are REAL multiple ODS in the original stream, they are preserved.) Then, the new SUP is converted again to XML/PNG, this time without problem. BD3D2MK3D merges then the remaining multiple subtitles (if any) to form single subtitles, so that the problem of the multiple ODS can be ignored. BD3D2MK3D creates then a new XML/PNG stream with the PNGs converted to 3D and a new XML file. To convert that XML/PNG stream back to BD SUP (or to DVD SUB), it must use BDSup2Sub.jar, as ++ has another bug. When ++ imports the PNGs, it crops the fully transparent parts of the subtitles, but it fails when it modifies the Width, Height, X and Y coordinates accordingly, and the final stream has the subtitles at wrong positions. (That bug happens only when the subtitles are cropped, but it's a problem that cannot be easily detected.) Luckily, the Java versions of BDSup2Sub has not that bug, and BD3D2MK3D uses it for the last conversion. Conclusion: It is possible to convert any BD SUP file to XML/PNG and then back to SUP by using the right version of BDSup2Sub for each step, and using a tool I've written to merge the multiple ODS together.

If you need to do convert the streams manually to XML/PNG, just remember to always use BDSup2Sub++ to convert the original SUP to XML/PNG, then use the new BD3D2MK3D subtitle tool "Combine Multiple PDS/ODS Definitions" (or use the little standalone CLI exe I've released here (https://forum.doom9.org/showthread.php?p=1829010#post1829010)) to verify if there are buggy multiple subtitles or merge the real multiple subtitles. Do whatever you need to do with the XML/PNG stream, and use BDSup2Sub.jar to convert the edited XML/PNG to your final format.

Last thing to note: Avatar, as well as a few other 3DBD, has the subtitle streams TWO times. They are in the 2D M2TS file with the AVC video stream and the audio streams, like all other 3DBDs. But they are also in the second M2TS file that should normally contain ONLY the MVC video stream. And the two versions OF THE SAME STREAM have the same stream ID! Therefore, when a demuxer needs to extract a specific subtitle stream from a SSIF with the AVC and MVC streams, if finds two times the same stream. I guess that it's the source of the many problems encountered with the Avatar 3DBD. If it's true, that mean they you should never encounter fake multiple ODS when you process a 2D BD with MakeMKV, tsMuxeR or eac3to.

I don't know why MakeMKV cannot extract correctly the forced subtitles from the AVatar BD, but it's almost certainly caused by the double subtitle streams and the related problem of the false positives multiple ODS. I will add a note in the explanation of how to use MakeMKV with BD3D2MK3D to explain that if there are problems when converting the subtitles, it is necessary to re-rip the BD with the complete subtitle streams ONLY. It's the only thing I can do.

r0lZ
17th January 2018, 12:38
I created a MD3D2MK3D project with that new MKV + sub track and it created the files and scripts accurately, but I couldn't see an option to only do forced on that one.
You can select the forced subtitles only in tab 2 (if you just want to include them as a subtitle stream), or in the drop-down menu of the last tab if you want to burn them in the video stream. I suppose that MakeMKV keeps the individual Forced flags when it creates the MKV, so that should work.

I will try to do what you have tried with my Avatar 3DBD, to verify if I can reproduce the problem you had, and if selecting the complete subtitle stream is sufficient to solve the problem. Perhaps I will also be able to detect the problem before the crash, but I don't think so...

[EDIT] Sorry, I was wrong. With a MKV as input, there is no way to select only the forced subtitles from a "complete" subtitle stream. I will try to add that option, if MakeMKV keeps the individual Forced flags.

von Suppé
17th January 2018, 13:39
..."multiple PDS/ODS definitions" (several different subtitles appearing at the same time on screen).
Hi r0lZ, can you tell me which lines / timecodes those are?

cheers

r0lZ
17th January 2018, 13:56
Hi r0lZ, can you tell me which lines / timecodes those are?
I don't understand. My post above is not related to a specific 3DBD. And as far as I know, all multiple ODS in Avatar are false positive.

If you want a sample of a (real) multiple ODS, download my standalone "Combine Multiple ODS" tool here (https://forum.doom9.org/showthread.php?p=1829010#post1829010). The archive contains samples of several problematic subtitles, including a sample from Avatar and a simple stream with a double subtitle.

hiltr0n
17th January 2018, 15:02
Update: my file works and now has burned in only forced subtitles. It definitely was because I had MakeMKV do the forced subtitles only at that stage. If you add the forced sub only in the hard burn section, that would be awesome. In my experience too, MakeMKV does maintain the forced subtitle flags. The workaround fixed the issue, although I may have to re-do it because I didn't use the java version of BDSup2Sub for the XML/PNG conversion. I'm doing full SBS so not sure if it is cropping it or not. But at least I know I can get the subtitles burned in now. Thanks for your assistance.

von Suppé
17th January 2018, 15:06
Ok, I misunderstood. Will download your mentioned tool. Thank you.

Another question: I'm using your "Clone Subtitle Positions" tool a lot. It works terrificly.
However, in some cases, I would like the possibility to only take over the "horizontal" placement and be able to choose the vertical alignment myself. I do this by creating xml/png files, where I specify the wanted bottom offset myself.

If possible, would it be much trouble to adjust your tool, so that there is a choice to pick horizontal - (or vertical) offset only, or both, to clone/take over?

PS Your mentioned "problem of the multiple ODS bug" and fixtool, are these auto-checked and -executed in your latest BD3D2MK3D?

r0lZ
17th January 2018, 15:22
The workaround fixed the issue, although I may have to re-do it because I didn't use the java version of BDSup2Sub for the XML/PNG conversion.
AFAIK, the cropping bug doesn't happen with Avatar. It happens only with the subtitles that are included in a wider fully transparent bitmap. (You can normally see that in the GUI of BDSub2Sub: the wellow border is larger than the subtitle text itself.) That's relatively rare, except in 3DBDs from the Asian market, and some musical DBs (like the German 3DBD "The Scorpions live in 3D").

So, normally, you can safely launch the encoding of the project as you have it.

I'm not sure I will add the option to extract the forced subs in MakeMKV mode, as that will be confusing, and, as you will see in a following post, the problem you had seems very rare.

r0lZ
17th January 2018, 15:30
Another question: I'm using your "Clone Subtitle Positions" tool a lot. It works terrificly.
However, in some cases, I would like the possibility to only take over the "horizontal" placement and be able to choose the vertical alignment myself. I do this by creating xml/png files, where I specify the wanted bottom offset myself.

If possible, would it be much trouble to adjust your tool, so that there is a choice to pick horizontal - (or vertical) offset only, or both, to clone/take over?
That's not a bad idea. And I have already wanted to do that sometimes, because otherwise the subtitles are not always correctly aligned in Y (for example when a single line uses a double-line subtitle from the guide to grab its position). But note that if you restrict the tool to work only for the X coordinates, the (rare) subtitles that are on the top of the screen in the guide will not be moved. That may and probably will be a problem.

PS Your mentioned "problem of the multiple ODS bug" and fixtool, are these auto-checked and -executed in your latest BD3D2MK3D?Yes, the standalone tool is exactly identical to the new subtitle tool integrated in BD3D2MK3D, and now, BD3D2MK3D is able to avoid the false positive of multiple ODS bug and to merge the real multiple ODS as single subtitles automatically during the creation of the project. Also, note that real multiple ODS are very rare (except in Japanimation).

Don't worry. You need to use the tool manually only if you convert yourself a problematic subtitle stream to XML/PNG.

r0lZ
17th January 2018, 15:41
My test with Avatar through MakeMKV is finished. I have selected the English and French complete and forced-only streams (therefotre a total of 4 streams) in MakeMKV. BD3D2MK3D has been able to convert them all, but with some difficulties.

Here is the log for the conversion to 3D of the English Forced stream. (The logs for the other streams are almost identical.)

In red, the interesting parts:

*** Converting "MKV3D.track_5.Eng.sup" to 3D BD SUP. Please wait!
*** Converting subtitle file "MKV3D.track_5.Eng.sup" to 3D SBS using 3D-plane "3D-Plane-00.ofs" + additional depth 0...
Subtitle language: eng (English)
*** Converting subtitle "MKV3D.track_5.Eng.sup" to "temp_2D.xml"...
> "D:\\Tcl\\work\\BD3D2MK3D\\toolset\\BDSup2Sub++.exe" --palette-mode keep --minimum-time 0 --language en --force-all set --fps-source 24p --fps-target 24p -o "MKV3D.track_5.Eng.3D_2D/temp_2D.xml" "MKV3D.track_5.Eng.sup"
BDSup2Sub++ 1.0.2
OPTION: Set language to English (en)
OPTION: synchronize target framerate to 24p
OPTION: Converting framerate from 23.976fps to 23.976fps
OPTION: Set minimum display time to 0
OPTION: Set palette mode to keep
OPTION: Set forced state of all captions to: set
Converting XML/PNG
Loading E:/BD3D2MK3D_projects/Avatar/MKV3D/MKV3D.track_5.Eng.sup
Detected 83 forced captions.
Writing E:/BD3D2MK3D_projects/Avatar/MKV3D/MKV3D.track_5.Eng.3D_2D\temp_2D.xml
WARNING: fade out detected -> patched palette
Writing E:/BD3D2MK3D_projects/Avatar/MKV3D/MKV3D.track_5.Eng.3D_2D\temp_2D.xml
There was 2 warnings
Conversion of 1 file(s) finished
*** Found 96 captions, including 83 forced captions.
Checking "temp_2D.xml" for false positive of multiple ODS (the "Avatar" bug)...
WARNING: Bad Graphics coordinates detected in event #2.
BDSup2Sup++'s multiple ODS bug detected. Converting the original SUP file to a temp SUP to avoid it...
*** Converting subtitle "MKV3D.track_5.Eng.sup" to "tmp.sub"...
> "D:\\Tcl\\work\\BD3D2MK3D\\toolset\\BDSup2Sub++.exe" --palette-mode keep --minimum-time 0 --language en --force-all set --fps-source 24p --fps-target 24p -o "MKV3D.track_5.Eng.3D_2D/tmp.sub" "MKV3D.track_5.Eng.sup"
BDSup2Sub++ 1.0.2
OPTION: Set language to English (en)
OPTION: synchronize target framerate to 24p
OPTION: Converting framerate from 23.976fps to 23.976fps
OPTION: Set minimum display time to 0
OPTION: Set palette mode to keep
OPTION: Set forced state of all captions to: set
Converting SUB/IDX
Loading E:/BD3D2MK3D_projects/Avatar/MKV3D/MKV3D.track_5.Eng.sup
Detected 83 forced captions.
Writing E:/BD3D2MK3D_projects/Avatar/MKV3D/MKV3D.track_5.Eng.3D_2D\tmp.sub
WARNING: fade out detected -> patched palette
Writing E:/BD3D2MK3D_projects/Avatar/MKV3D/MKV3D.track_5.Eng.3D_2D\tmp.idx
There was 2 warnings
Conversion of 1 file(s) finished
*** Found 96 captions, including 83 forced captions.
Converting the temp SUP file to XML/PNG. This time, the conversion should work.
*** Converting subtitle "tmp.sub" to "temp_2D.xml"...
> "C:\\ProgramData\\Oracle\\Java\\javapath\\java.exe" -Xmx256m -jar "D:\\Tcl\\work\\BD3D2MK3D\\toolset\\BDSup2Sub.jar" "MKV3D.track_5.Eng.3D_2D/tmp.sub" -o "MKV3D.track_5.Eng.3D_2D/temp_2D.xml" --palette-mode keep --minimum-time 1 --language en --force-all set --convert-fps 24p,24p
Loading E:\BD3D2MK3D_projects\Avatar\MKV3D\MKV3D.track_5.Eng.3D_2D\tmp.sub
Detected 96 forced captions.
Writing E:\BD3D2MK3D_projects\Avatar\MKV3D\MKV3D.track_5.Eng.3D_2D\temp_2D.xml
Writing E:\BD3D2MK3D_projects\Avatar\MKV3D\MKV3D.track_5.Eng.3D_2D\temp_2D.xml
Conversion finished.
*** Found 96 captions, including 96 forced captions.
Converting the multiple ODS events to single events in "temp_2D.xml"...
No multiple ODS found in "temp_2D.xml".
*** Adding 3D depth info from "3D-Plane-00.ofs" to "temp_2D.xml"...
Source 3D-plane: 3D-Plane-00.ofs
Min depth: 2
Max depth: 46
Average depth: 12.54
Number of warnings for undefined frame's depth: 0
Number of subtitles processed: 96
Number of forced subs: 96
Frame rate of the stream: 24.0
Frame rate used to convert the drop frames timecodes to frame numbers: 24.0

*** Converting "temp_2D.xml" to 3D...
Input file: temp_2D.xml
Stereoscopy mode: Side by Side (left view first)
Additional or fixed depth: 0
Resize filter: Mitchell
Number of subtitles processed: 96
Conversion of 2D XML/PNG files to 3D using ImageMagick took 27 seconds (00:00:27)
*** Converted 96 subtitles to 3D-SBS. No errors. :-)
*** Trying to determine the best DVD palette for BDSup2Sub VobSub conversions from the single PNG image #32 in directory "MKV3D.track_5.Eng.3D_2D"...
> Found colour #10/#11 in image "temp_2D_0032.png" (subtitle #32):
Primary (lighter) colour: 250,250,51
Secondary (darker) colour: 187,187,17
Debug: Nearest colour in default palette: 250,250,51 (Distance: 0)
Debug: Histogram:
65666: ( 0, 0, 0) #000000 black
2360: (187,187, 17) #BBBB11 srgb(187,187,17)
12029: (250,250, 51) #FAFA33 srgb(250,250,51)
*** Modified 2 colour pairs in the default DVD palette for VobSub conversions.
Saving file "MKV3D.track_5.Eng.palette.ini"...
Saving file "MKV3D.track_5.Eng.palette++.ini"...
*** Converting subtitle "temp.3D.xml" to "MKV3D.track_5.Eng.3D.sup"...
> "C:\\ProgramData\\Oracle\\Java\\javapath\\java.exe" -Xmx256m -jar "D:\\Tcl\\work\\BD3D2MK3D\\toolset\\BDSup2Sub.jar" "MKV3D.track_5.Eng.3D.3D/temp.3D.xml" -o "MKV3D.track_5.Eng.3D.sup" --palette-mode keep --minimum-time 1 --language en --convert-fps 24p,24p
Loading E:\BD3D2MK3D_projects\Avatar\MKV3D\MKV3D.track_5.Eng.3D.3D\temp.3D.xml
Writing E:\BD3D2MK3D_projects\Avatar\MKV3D\MKV3D.track_5.Eng.3D.sup
Conversion finished.
*** Converted 96 captions.
Deleting temp 3D XML/PNG directory "MKV3D.track_5.Eng.3D.3D".
*** Done. Converted 96 subtitles to 3D-SBS. No errors. :-)
Full conversion took 40 seconds (00:00:40)

* All captions in stream "MKV3D.track_5.Eng.sup" are forced.
Forcing the forced flag.

As you can see, BDSup2Sub++ has created wrong entries in the XML, and BD3D2MK3D has detected them. It has then converted the original SUP to a temp SUP, and converted that temp SUP to XML/PNG, again with ++, this time without problem. In the new XML/PNG, there is no multiple ODS any more, so that stream has not been modified. The final conversion to the 3D SUP has been made with BDSup2Sub.jar without problem.

It's exactly what I expected. The same thing has happened when I have converted the decrypted ISO, so it appears that, at least with my version of the BD, you can use MakeMKV to decrypt the movie, including the forced subtitle streams. I don't know what happened with hiltr0n's BD, but I'm unable to reproduce that problem.

There is however a strange thing that I've noticed. When the subtitles streams are converted to XML/PNG with ++, the progress is (relatively) fast during the first 90% of the process, and then it becomes suddenly very slow. But it has reached the end of the conversion without problem.

Also, I note that there are a few subtitles in the complete streams that come from the subtitle stream included in the MVC M2TS. They are full-size 1920x1080 subtitles with "Please turn on your 3D-glasses and put them on now." They are not forced and appear near 0:00:30 in the movie. Unfortunately, I have no way to detect and remove them. I guess that it's for that reason that these streams are so difficult to convert. They interfere with the 2D subtitle stream in the AVC M2TS.

Anyway, with my version of the Avatar 3DBD, things work as expected with the latest version of BD3D2MK3D, with a decrypted ISO or a MKV created by MakeMKV, so I don't think I'll modify it again.

hiltr0n
17th January 2018, 18:05
Understood. I've converted a fair amount of 3D movies with this tool and this is the first time any of the forced subs have given me any problem so I agree that this is quite rare. I'm going to blame it on the Papyrus font they used :D. I have a working full SBS MKV with burned in forced subtitles. Nice to know the manual process for rare cases like Avatar.

von Suppé
17th January 2018, 21:42
As it happens I too have been struggling with the Avatar subtitles. It's one of the 3D movies why I asked r0lZ in my earlier post for a feature in the XY coordinates-processing in one of his tools.
The standard SUPs are displayed way to high, IMO.
Man, have I been busy. OCR-ing the SUPstreams, edit/correcting text, timings, exporting to ASS, adding fonts, creating ASS styles, exporting to SUP. From SUP to XML/PNG. Then cloning positions, remuxing again... pfffff. Lot of work!! And for two languages, that is. I can almost word-for-word say each line perfectly :o

hubblec4 said:So many issues with all the BDSup2Sub editions, nobody there who will write a better SUP-Tool?
I agree fully, I'd also welcome a handy knife that will let you do whatever you want with SUP or XML/PNG files, for that matter. A real-time preview screen during editing/creating is a must.

But note that if you restrict the tool to work only for the X coordinates, the (rare) subtitles that are on the top of the screen in the guide will not be moved. That may and probably will be a problem.
Well, I always keep an eye out for subtitles that are placed on top of the screen. Then, ASS comes in handy as you can use a style to these specific lines. Vertical alignment is specified by your wishes and only applied to the lines with that style.

On the other hand, it is possible to output & OCR SUP lines that only are in the lower half of the picture. So I can imagine SUP lines that are only in the upper half can be output also. If one wants, those 2 SUP files can be processed separately. After you have your separate, wanted SUP- or XML/PNG files (one for the lower and one for the upper half) you would have to merge them, of course. I don't know if that is possible, but I would be very happy if merging SUP- and/or XML/PNG files would be possible.
As you have maybe read my Avatar subtitle experience, you can imagine that such a tool would be very much appreciated.

r0lZ
18th January 2018, 13:11
As it happens I too have been struggling with the Avatar subtitles. It's one of the 3D movies why I asked r0lZ in my earlier post for a feature in the XY coordinates-processing in one of his tools.
I understand your wishes, but Avatar is probably the bad example for the need to move the subtitles. The original 3D subtitles are carefully placed on screen so that they do not enter in the objects or characters in the foreground. The depth of an individual subtitle has been defined for the precise position of that subtitle, and if it is moved elsewhere, chances are that it will not be in a gap between the foreground objects, and you will ruin the 3D effect. This is especially true if you move the subtitles globally down, as usually, there are more objects in the bottom of the foreground.

IMO, restricting the displacement of the subtitles in a specific direction should be used only when the original subtitles are always on the same horizontal line and are only moved to the left or right to avoid to enter in some foreground objects. In that case, grabbing the position of new subtitles from that stream without restricting the Y may give the impression that the subtitles are not correctly aligned along the Y axis.
I agree fully, I'd also welcome a handy knife that will let you do whatever you want with SUP or XML/PNG files, for that matter. A real-time preview screen during editing/creating is a must.
A good wysiwyg subtitle editor is Aegisub, but it works with SSA/ASS subtitles only, and it has no support for the 3D depth.

frank
20th January 2018, 17:51
Attention!
MKVToolNix (used in BD3D2MK3D) has removed features.
# Version 20.0.0 "I Am The Sun" 2018-01-15

* Feature removal: several deprecated features have been removed:
...
* all command line tools: support for the deprecated, old, proprietary format
used for option files
...Now the __MUX_3D_OPTIONS file must be in JSON format. Don't update MKVToolNix files, or you have to change BD3D2MK3D.

r0lZ
20th January 2018, 19:50
Damn! Thanks for the hint!

Rexian
22nd January 2018, 05:39
Hi r0lZ, do you have any plans to add an option in future BD3D2MK3D version to avoid re-encoding and build the frame-packed MKV just with the frames available in the original ISO (AVC+MVC)? I don't know if it's possible for frame-packed but makemkv seems to have found a way to do it for their mkv. I tried an mkv out of makemkv and m2ts out of tsmuxer of the same BD3D on my LG E6's internal player and it was able play those in 2D so the file generated is backward compatible and I could play both of them in 3D using mpc-hc so 3D works as well in the players that support them. Thanks!

r0lZ
22nd January 2018, 11:06
I have to analyse the possibilities of MakeMkv. But if it's only the latest version that can do that, I will not be able to use it, for the reason highlighted by Frank here (https://forum.doom9.org/showthread.php?p=1831196#post1831196). (I may change later the format of the MUX_OPTIONS files to be compatible with Mkvtoolnix v20+, but it's not currently in my todo list.)

Also, since you want to just remux the ORIGINAL AVC + MVC streams as a (big) MK3D, you can already use MakeMKV for that job. It does that very well, and it is still free if you use the key offered regularly here (http://www.makemkv.com/forum2/viewtopic.php?f=5&t=1053). Just add the MVC stream in the list of streams to mux (as it is disabled by default) and let it do its job.

So, if I implement AVC+MVC support in BD3D2MK3D, it should be with the possibility to re-encode the AVC and MVC streams. But that's a big job, so don't expect that soon! And note that only a few Windows players support that format. I'm not really interested in implementing it while no standalone player or TV can play it.

Rexian
23rd January 2018, 01:40
Understood. I too would prefer a more universal format but not able to find something that looks good and my LG TV can play. HSBS was ok for my 55" LCD but on 65" I can see the jaggies. Yet to try SBS but the frame sequential file created with BD3D2MK3D didn't work on my E6, nor with mpc-hc/mpc-be.

Tenker
23rd January 2018, 09:04
@ll

I have the movie "Geostorm.2017.3D" with the v1.5 converted.
Unfortunately, the 3D FORCED subtitles (00098.track_4624.Deu.3D.idx) are black.

https://www2.pic-upload.de/thumb/34708944/Image2.jpg (https://www.pic-upload.de/view-34708944/Image2.jpg.html)

The 2D FORCED subtitle (00098.track_4624.Deu.2D.idx) is white.

https://www2.pic-upload.de/thumb/34708943/Image1.jpg (https://www.pic-upload.de/view-34708943/Image1.jpg.html)

What do I have to change so that they appear white, like other subtitles?

https://www2.pic-upload.de/thumb/34708945/Image3.jpg (https://www.pic-upload.de/view-34708945/Image3.jpg.html)

Thanks and best regards
tenker

r0lZ
23rd January 2018, 11:30
Strange! Yet another bug of BDSup2Sub. :-(

Try to load the ORIGINAL stream (without .2D or .3D extension) in BDSup2Sub++ or in BDSup2Sub.jar. (They are in the toolset folder.) Be sure to enable the Change Frame Rate option and set the FPS Source and FPS Target to 23.976. (It's necessary to avoid little timing problems.) Verify if the forced subtitles have the right color. If it's not the case, retry with the other version of BDSup2Sub. When it's correct, save them as a new temporary BD SUP file. Then, have a look at the end of the 3D-Planes.log file to identify the 3D-Plane to use for your stream, and use BD3D2MK3D -> Subtitle Tools -> Convert Subtitles to 3D (with 3D-Plane/OFS) to convert the 2D stream you have just created.

I note also that the images above are taken from an OCR program that accepts only DVD SUB/IDX. Converting to that format is not recommended, because it is less good than the original SUP, and it has to reduce the number of colours to 3 (plus the transparent background). That may be the cause of the problem. So, do the conversion in SUP format only, and if you really need the IDX/SUP stream, convert the final 3D SUP to DVD SUB. That should work.

If a specific version of BDSup2Sub produced the black subtitles, and if it works correctly with the BD SUP format, please let me know. I will try to convert the same stream myself, and see if I can find a solution to detect the problem automatically and, if it's possible, implement a workaround.

Anyway, thanks for the bug report!

r0lZ
23rd January 2018, 11:35
Yet to try SBS but the frame sequential file created with BD3D2MK3D didn't work on my E6, nor with mpc-hc/mpc-be.The FS format is very special, and many players do not support it. It has been implemented mainly for some old projectors that do not support SBS or T&B.

Have you tested Full-SBS with your TV ? If it has frame buffers large enough, that's probably the best solution. (It's the case of all UHD (4K) 3D TVs, but unfortunately, many standard HD TVs do not support the Full formats.)

Tenker
23rd January 2018, 12:26
Strange! Yet another bug of BDSup2Sub. :-(

Try to load the ORIGINAL stream (without .2D or .3D extension) in BDSup2Sub++ or in BDSup2Sub.jar. (They are in the toolset folder.) Be sure to enable the Change Frame Rate option and set the FPS Source and FPS Target to 23.976. (It's necessary to avoid little timing problems.) Verify if the forced subtitles have the right color. If it's not the case, retry with the other version of BDSup2Sub. When it's correct, save them as a new temporary BD SUP file. Then, have a look at the end of the 3D-Planes.log file to identify the 3D-Plane to use for your stream, and use BD3D2MK3D -> Subtitle Tools -> Convert Subtitles to 3D (with 3D-Plane/OFS) to convert the 2D stream you have just created.
...

I did as you suggested.

https://www2.pic-upload.de/thumb/34709669/Image4.jpg (https://www.pic-upload.de/view-34709669/Image4.jpg.html)

https://www2.pic-upload.de/thumb/34709671/Image5.jpg (https://www.pic-upload.de/view-34709671/Image5.jpg.html)

https://www2.pic-upload.de/thumb/34709670/Image6.jpg (https://www.pic-upload.de/view-34709670/Image6.jpg.html)


The result is what I need

https://www2.pic-upload.de/thumb/34709672/Image7.jpg (https://www.pic-upload.de/view-34709672/Image7.jpg.html)


...
I note also that the images above are taken from an OCR program that accepts only DVD SUB/IDX. Converting to that format is not recommended, because it is less good than the original SUP, and it has to reduce the number of colours to 3 (plus the transparent background). That may be the cause of the problem. So, do the conversion in SUP format only, and if you really need the IDX/SUP stream, convert the final 3D SUP to DVD SUB. That should work.
...


I use the Program Subtitle Edit just to check the SUB.

Thank you for your quick help.
Tenker

r0lZ
23rd January 2018, 13:28
Thanks.

Are you sure you have used the latest version of BD3D2MK3D ? I have just reorganized the way the subtitles are processed, and now BDSup2Sub++ is used for the conversion of the original SUP to XML/PNG. As far as I know, only BDSup2Sub.jar has that wrong colour bug, and therefore the conversion of the subtitles to 3D should not exhibit that problem. Can you confirm that you have used a version older than the latest v1.5 to create the project ? If it's the case, I can assume that the new version works well. Otherwise, I will have to check again the new method, and that takes much time...

BTW, I did Geostorm with v1.5, without any problem with the colours of the (French) subtitles. I don't think the German subtitles are different. But perhaps you have another edition of the 3DBD.

Tenker
23rd January 2018, 15:10
Yes, the v1.5.

I have sent you more information via PM.
Now I have made a Tet with all FORCED subtitles.
All forced subtitles are affected in my case ...
Normal subtitles are after conversion O.K.

r0lZ
23rd January 2018, 16:00
All forced subtitles are affected in my case ...
Normal subtitles are after conversion O.K.It's even more strange, since the two MKV streams come from the same original SUP stream.

Yet another thing to confirm. Are you sure Java is properly installed on your PC ? You can verify it with Help -> Java Version. You should see the java version number.

The BDSup2Sub.jar is still used to convert the 3D XML/PNG stream back to the BD SUP format (or DVD SUB if you have requested that format). The problem can also come from that operation.

BTW, if you have not deleted the project folder yet, can you verify also the PNG files in the temp folder with the 2D XML/PNG stream ?

Rexian
24th January 2018, 02:10
The FS format is very special, and many players do not support it. It has been implemented mainly for some old projectors that do not support SBS or T&B.

Have you tested Full-SBS with your TV ? If it has frame buffers large enough, that's probably the best solution. (It's the case of all UHD (4K) 3D TVs, but unfortunately, many standard HD TVs do not support the Full formats.)

Yes, just tried now. Started the conversion last night after posting here. The file looks good with resolution 1920x2160, encoded at CRF 20 but doesn't play well in mpc-hc or mpc-be.

For some reason it doesn't take the entire width of the screen so after switching the TV to 3D-TAB mode manually, it shows good 3D but only for the center area with vertical black bars on both sides. So left it at that yesterday.

Today tried playing on the TV (LG E6) directly using the Emby app and the TV recognized it and switched to 3D mode automatically but with the vertical bars on the side, just like mpc-hc. So, the TV can handle 3D-TAB it seems but the players, both on PC and TV, are trying to maintain the weird 16:18 aspect ratio instead of 16:9 per eye. Am I missing any key configuration for TAB conversion? I checked the BD option, wonder if that could cause this.

Here is a screenshot.
http://i63.tinypic.com/250mn0n.jpg

Tenker
24th January 2018, 08:15
It's even more strange, since the two MKV streams come from the same original SUP stream.

Yet another thing to confirm. Are you sure Java is properly installed on your PC ? You can verify it with Help -> Java Version. You should see the java version number.

The BDSup2Sub.jar is still used to convert the 3D XML/PNG stream back to the BD SUP format (or DVD SUB if you have requested that format). The problem can also come from that operation.

BTW, if you have not deleted the project folder yet, can you verify also the PNG files in the temp folder with the 2D XML/PNG stream ?

1. Java Version is 8.0.1610.12

2. All * .png pictures in the folder
00098.track_4623.Fra.3D_2D
00098.track_4624.Deu.3D_2D
00098.track_4625.Ita.3D_2D
00098.track_4626.Spa.3D_2D
are white

3. Today I converted the BD 3D to a sample on another PC (Win1064Bit with all updates + BD3D2MK3D v1.5).
Unfortunately the same result = all Forced SUB are black.
Standart SUB 00098.track_4610.Deu.3D.sub is white.

Where is the mistake?

r0lZ
24th January 2018, 11:53
So, the TV can handle 3D-TAB it seems but the players, both on PC and TV, are trying to maintain the weird 16:18 aspect ratio instead of 16:9 per eye. Am I missing any key configuration for TAB conversion? I checked the BD option, wonder if that could cause this.[/url]
Unfortunately, there is no well established standard for the aspect ratio of Full-SBS or T&B. Some players want the aspect ratio of a single view, and others want it for the combined views. Try to play with the two settings in Settings -> Full-SBS/T&B Aspect Ratio.
And yes, there are two different aspect ratios. You have to find the good configuration for your players. (I suggest to encode a small clip for your tests.)

Good luck, and please report here what settings give the correct results for your TV and players.

r0lZ
24th January 2018, 11:57
Unfortunately the same result = all Forced SUB are black.
Standart SUB 00098.track_4610.Deu.3D.sub is white.

Where is the mistake?
I'm still investigating the problem. It is very bizarre that the final subtitles are black if the PNG images are correct. And why is that problem limited to forced subtitles only ?

I did Geostorm again yesterday, but unfortunately, BD3D2MK3D has crashed before the subtitle conversions due to a bug I have just introduced in the beta I am currently developing. I have just fixed the bug and will convert Geostorm a third time, with the German forced subs of course. Stay tuned...

Tenker
24th January 2018, 12:09
1000 x :thanks: r0IZ

Rexian
24th January 2018, 16:45
Unfortunately, there is no well established standard for the aspect ratio of Full-SBS or T&B. Some players want the aspect ratio of a single view, and others want it for the combined views. Try to play with the two settings in Settings -> Full-SBS/T&B Aspect Ratio.
And yes, there are two different aspect ratios. You have to find the good configuration for your players. (I suggest to encode a small clip for your tests.)

Good luck, and please report here what settings give the correct results for your TV and players.

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?

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.

r0lZ
5th April 2018, 21:53
Well, it's not so simple to do. If doing the work manually seems simple, it is much more hard to adapt the GUI to be able to open and deal with the two sources at the same time.

Furthermore, it is much more difficult to properly demux a 2DBD, as it can contain streams and especially audio in recent formats (like Atmos) that are prohibited in a 3DBD. Therefore, the tools that BD3D2MK3D uses currently are probably not well adapted to the 2D streams.

I add that if it is true that the streams from the 2D and 3D versions of the same movie from the same package are usually compatible, it's not necessarily the case if the 3D and 2D BDs have been bought separately. It is not rare that the movies begin with different studio logos with different lengths. There is no easy way to verify that, and I don't want to deal with the numerous sync problems that will certainly happen.

Finally, BD3D2MK3D is complex enough for the casual user. It will be difficult and probably not well understood if I add a new tab to open a 2DBD.

Anyway, BD3D2MK3D has been designed to make it as simple as possible to add external audio or subtitle tracks to the final MKV. You have just to demux them, and edit the __MUX_3D_OPTIONS file to add the new streams. Or you can use your method with MakeMKV. (Very good method BTW. However, I think the method can be even faster if you simply rip the audio alone, without the useless 2D AVC video stream, but I don't know if it's feasible with MakeMKV.)

Honestly, what you want to do is very specific to your needs, and I don't think it is worth implementing a complex method to do it automatically with BD3D2MK3D. Sorry.

sfatula
5th April 2018, 21:58
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 never looked, this is a great idea though, thanks. I’ll make sure to check all my 3d again and update as needed.

mparade
6th April 2018, 12:41
Hello r0lZ,

First of all, thank you very much for this astonishing software.
This is what I have been looking for for a long time now. Currently, for play back of my movies (both 2DBD mkv-s, 3DBD mkv-s UHD HDR mkv-s, and DVD mkv-s made by makemkv), I am using JRiver and madVR as the video renderer. Recently, I have decided to reencode my movie collection using StaxRip and BD3D2MK3D to save a lot of space for my NAS while maintaining some "visual transparency". But now I have met an "issue" at the forum of madVR. madVR simply doesn't want to treat any 3D formats as input correctly excluding MVC-3D streams. Currently, via JRiver, I can choose if I want to play only the 2D part or both the 2D and 3D part of a BD3D mkv. According to my choice madVR does the rendering job correctly. So, I really do not want to make two versions of a BD3D to be playable both in 2D and 3D (do not want to lose functionality by converting to an other format while saving a lot in size). Is it possible?

Your help would be appreciated.

Thanks again for your great software.

r0lZ
6th April 2018, 16:39
I'm not sure I understand. BD3D2MK3D generates only the 3D version of the movie in Half or Full SBS, TAB or FS (although you can use it to encode also a 2D version of the same 3D movie). A good player should be able to play only a single view of the 3D MKV, but of course if you encode in Half-SBS or Half-TAB, you will have only the half resolution in one direction. (On my Samsung TV, I have to go to the options to select the 2D playback of a 3D movie. It's not really easy, but it's possible.)

In the other hand, if you want something to re-encode a BD50 and compress it enough to burn a BD25 or buils an AVC+MVC 3D MKV, and keep the possibility to play it in 2D or 3D, you have to use a tool that can encode in MVC. BD3D2MK3D cannot do that. See the tools associated with the FRIM encoder, based on the Intel libraries, the only free MVC encoder. The quality of the encoding is somewhat leak, certainly less good than the encodings made with x264 or x265, but it can encode in MVC, and therefore keep the original BD3D format.

Personally, I prefer an half resolution well encoded, but it's a matter of taste.

Actionable Mango
6th April 2018, 18:11
Anyway, BD3D2MK3D has been designed to make it as simple as possible to add external audio or subtitle tracks to the final MKV. You have just to demux them, and edit the __MUX_3D_OPTIONS file to add the new streams.

Thanks for your consideration and response. I'll look into this.

mparade
6th April 2018, 19:57
Personally, I prefer an half resolution well encoded, but it's a matter of taste

I am still thinking about a (HTAB + 2D version)/3DBD as well as a solution. I have an LG C6V, anyway.Comparing e.g. HTAB to FTAB I have half of the horizontal resolution for the TV to begin with. It will then upscale both of the images to it's native resolution (4K in this case) then be throwing away half of the horizontal resolution for each eye (passive technology). Am I right? Based on this method I would assume FTAB should give somewhat better result (assuming identical encoding settings) but maybe I would not even sense any of the difference.

I do not want to store 3DBD-s, they are just too huge if you are a 3D fan with a big collection of movies. :) Reserving an average capacity of ~35-40GB on a HDD/3D movie in the magical world of x264/x265 and "powerful" processors, is a nonsense and maybe totally irrational as well. :)

r0lZ
6th April 2018, 21:48
Am I right?
I'm not sure. I have an active Samsung TV, and it doesn't work like a passive LG. In my case, the full resolution is used anyway, so indeed FTAB (or FSBS) is better, as nothing is thrown away. In the case of a passive LG, I think that the even lines of the TV are used for one eye (with a specific polarization), and the odd lines for the other eye (with the opposite polarization). That means that theoretically, you don't need the full vertical resolution, as only one every two lines are really displayed. (It's also why HSBS is not recommended for LG, as the horizontal resolution is divided by 2 during the encoding, and the vertical during the playback.)

Of course, if you want to play the 3D movie in 2D, FTAB is preferable, as you will watch the 2D movie in its original resolution.

Honestly, I don't know if the LG begins by upscaling the image, or if it is smart enough to understand that it's useless. But anyway, even if it does it, the gain in quality will be minimal, or even null. But with a 4K YV, all original lines of a Full-HD 3D movie can be displayed, so the problem depends of the resolution of the TV.

For 2D+3D playback of the same MKV, you can perhaps also include TWO video streams in the same MKV. A 3D HTAB and a full-res 2D. Something similar to what Actionable Mango does with the audio streams, but for the video. It's technically possible with Mkvtoolnix. But I don't think that many players will let you chose what video stream to play. They will probably just pick the first one. And if you encode in FTAB, that will be a waste of disc space.

I agree that storing BD ISOs or physical burned BD25 is not a good idea. With a good h265 encoding, you can have an almost as good quality for 1/10 of the file size. But on the other hand, the SBS, TAB and FS frame packing methods are not well defined, and suffer several problems that the 3DBD do not have (such as the problem of the correct aspect ratio to adopt, discussed previously in this thread).

mparade
7th April 2018, 12:41
Thank you very much for the explanation.

I am going to choose FTAB played via Kodi v17 as for 3D with a 3D subtitle track (forced subs) burnt in in my language and with 1pc of audio track using your magical software. The usefulness of a 2D version of the same film is still a question for me because of the drastic expansion of UHD HDR movies.
I do not want both a HD and an UHD version of the same movie on my NAS.

Again, thank you very much!

dm9656
9th April 2018, 21:20
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.

I have the same LG E6 TV and here are my observations after many tests:
- you can encode a Full TAB or SBS 3D movie which will not loose its aspect ratio with subtitles, when you select the following option : "Full SBS/..." / "Use 32:9..." and "use respectively 1:2 and 2:1..." AND you manually edit the aspect ratio in file "__MUX_3D_OPTIONS.txt" to "16/9" instead of the value you'll find there
- however, the subtitles will have problems: in FTAB, they will display both up and down of the picture; in FSBS, they will display only in one side (left). The reason is that the subtitles pictures are generated in a format that has not the same size as the FTAB or FSBS encoded picture (ex: 1920x1080 instead of 1920x2160); and I think the TV needs the 3D subtitle picture to be the same size as the FTAB picture to display it correctly along the movie picture.

So, my guess for a solution to this problem is to have options to generate the 3D subtitle pictures with the same resolution & aspect ration as the FTAB or FSBS frame instead of the target (2D) size.

As for Frame Sequence, I could not make it work properly, there are too few players out there able to play it correctly.

Meanwhile, if somebody could give me some hints for generating the 3D subtitles at the desired resolution? Is there a way to tweak BD3D2MK3D ?

r0lZ
10th April 2018, 09:40
Welcome to the Doom9 forums, dm9656.
[...] option : "Full SBS/..." / "Use respectively 32:9..." [...] AND you manually edit the aspect ratio in file "__MUX_3D_OPTIONS.txt" to "16/9" instead of the value you'll find thereIt's a contradiction. If you DON'T tick the option "Use respectively 32:9 or 16:18 AR", then the aspect ratio in __MUX_3D_OPTIONS.txt will be 16:9. It's the only thing that is changed with that option.

The 2:1 or 1:2 SAR is different, as it is used by x264 or x265 during the encoding and is included in the video stream itself.

So, if I understand correctly, for your LG, you should set the AR to 16:9 and the SAR to 1:2 / 2:1, and it should not be necessary to manually edit any file.

- however, the subtitles will have problems: in FTAB, they will display both up and down of the picture; in FSBS, they will display only in one side (left). The reason is that the subtitles pictures are generated in a format that has not the same size as the FTAB or FSBS encoded picture (ex: 1920x1080 instead of 1920x2160); and I think the TV needs the 3D subtitle picture to be the same size as the FTAB picture to display it correctly along the movie picture.
Correct. Unfortunately, currently, the free tools that are able to edit the SUP files are made for the standard resolutions, SD (PAL or NTSC), "small-HD" (720p) and Full-HD (1080p). The other formats (UHD and 3D) are currently not supported.

Note also that currently, it is not possible to generate the 3D subtitles for Full-SBS or Full-TAB, as they require a larger resolution (in one direction only) than Full-HD.

Some players are able to display the 2D subtitles correctly, including PotPlayer, my preferred video player for Windows. It has an option to display the subtitles before or after the rendering of the video. For the 3D movies, that means that it can display the subtitles over the whole SBS/TAB video, before the cut of the two views, and that leads to the problem you have described. But it can also display the 2D subtitle after the cut of the two views, and in that case, the 2D subtitles are perfectly centered on screen, like in the original BD. (It's the first mode that is required to display properly the 3D subtitles for Half-SBS/TAB, as they have the same resolution and dual view as the 3D video format, and the second mode must be used to display the 2D subtitles over any 3D video.) Perhaps your TV or player has a similar option?

Otherwise, many players have also an option to ignore the position of the subtitles encoded in the SUP file and display them anyway somewhere in the bottom-center of the screen, or in the black bars of a Cinemascope movie. Such option can help too.

Unfortunately, the hardware players (TVs, projectors, BD-players and other multimedia boxes) have often only a very basic player with very few options, and it is not possible to modify the subtitles for proper playback of 3D material.
So, my guess for a solution to this problem is to have options to generate the 3D subtitle pictures with the same resolution & aspect ration as the FTAB or FSBS frame instead of the target (2D) size.
Correct, but as I wrote above, the current tools are not able to do it. Otherwise, I would have implemented that option.

As for Frame Sequence, I could not make it work properly, there are too few players out there able to play it correctly.
FS is indeed not well supported, but it is necessary for some old "3D ready" projectors that cannot handle the (relatively new) SBS and TAB formats.

Meanwhile, if somebody could give me some hints for generating the 3D subtitles at the desired resolution? Is there a way to tweak BD3D2MK3D ?
As I wrote above, there is currently no way to generate 3D subtitles for Full-SBS or Full-TAB. Try to play with the options of your player, or connect your PC to your TV and use a good software player that can handle the subtitles correctly to send a correctly decoded video stream with the subtitles (@23.976x2 fps) to the TV via HDMI.

In the future, perhaps a better tool to edit UHD SUP files will be available. I am currently helping someone to write an app that should be able to produce UHD 3D subtitles, but it is not ready yet...

Actionable Mango
13th April 2018, 21:11
As for Frame Sequence, I could not make it work properly, there are too few players out there able to play it correctly.

It worked for me using Plex client installed on the TV itself.

Relight
17th April 2018, 23:09
I use this great program for all of my 3D Blu-rays, with the MKV mode. Never had a problem until now.

I finally got a copy of Avatar that kind of seems to work, after trying 3 US copies I gave up and imported a UK copy.

Like the US copies, MakeMKV had no problem with creating a backup but ran into "trying to work around" issues when making the MKV. However, it did complete apparently successfully.

Watching the MKV out of MakeMKV, it seems okay and plays without problems. There is a subtitle track with both all subtitles and Na'vi subtitles, and a separate subtitle track for the forced-only Na'vi subtitles.

Now we get to BD3D2MK3D - it seems to work fine for the subtitle track with ALL subtitles, but it doesn't work for the forced-only Na'vi subtitles, which is what I want.

It completes the process and the resulting SBS MKV looks fine, but it gives errors during the process, which show that it fails the track containing the forced-only Na'vi subtitles.

I've attached the error message that popped up during the "Generating project" stage, as well as the log file. (The attachments are pending approval.)

Any help would be much appreciated!

r0lZ
18th April 2018, 09:26
The Avatar subtitles are known to be problematic, probably because they are included two times (in the AVC and MVC M2TS files), and that confuses the demuxers. I'm not sure why it doesn't work with the MKV source, but it is possible to extract them properly from the (decrypted) BD. Anyway, if I remember correctly, there is only one subtitle stream for a specific language, and the Navi forced subtitles are simply included in the complete stream and tagged as forced. So, if BD3D2MK3D has properly demuxed the whole stream, you can normally simply extract the forced subtitles from the full stream, with BDSup2Sub. Just launch BDSup2Sub (with Subtitles Tools -> Open Subtitle Stream in BDSup2Sub), and export a new SUP file with the forced subtitles only. You can then use Subtitle Tools -> Convert Subtitles to 3D with the right 3D-Plane (see the 3D-Planes numbers in tab 1 of BD3D2MK3D - Do not trust tsMuxeR!). That works perfectly with the subtitles directly extracted from the (properly decrypted) original European BD. If that's not possible with the MKV created by MakeMKV, then there is a bug in MakeMKV, and you should contact its authors.

r0lZ
20th April 2018, 12:36
I see now the approved attached images. I can only tell you that the "index out of bounds" error happens usually when a stream is created, but it contains no subtitles at all, or just pointers to non-existing bitmaps. Therefore, I guess that MakeMKV has created a bad forced stream. Try to do what I have explained in my previous post. It should be easy to extract the forced subtitles from the full stream.

Since the first time I have converted Avatar, that was from the 3DBD, I've just converted it again, but this time I have decrypted it with MakeMKV and converted the 3D MKV, with the English and French subtitles, to verify if I can reproduce your problem. Everything went fine, including the forced subtitles. I may have another version than yours, but AFAIK, the current version of BD3D2MK3D has no problem with the subtitles. However, it includes 3 subtitles at the very beginning (up to 30 seconds in the movie) with a full-screen text "Please turn on your 3D glasses and put them on now". English subs 1475 to 1607 (from 2:36:43 to 2:41:40) are identical. They are the subtitles taken from the MVC M2TS. These subtitles are useless but are present only in the output streams with all subtitles. The forced streams are not affected. Unfortunately, BD3D2MK3D has no way to understand that these subtitles should be removed, and therefore they appear in the full stream. Of course, for a better result, it is better to remove them manually with BDSup2Sub, and remux the movie with __MUX_3D.cmd.

I don't remember if that strange subtitles were also present in the streams generated from the BD during my first encode of Avatar, but I remember that I have had many problems with the Avatar subtitles, and I've added some workarounds in BD3D2MK3D to be able to handle them. Currently, it seems that BD3D2MK3D can convert the streams successfully, but at least when converting the 3D MKV, it cannot avoid the "3D glasses" full-screen subtitles. IMO, it's the job of MakeMKV to try to export only the subtitles from the AVC M2TS and ignore the subtitles from the MVC M2TS. Since in the 3D MKV, they have been merged, BD3D2MK3D cannot distinguish them, and therefore cannot ignore them.

Anyway, on my side, I cannot do something to avoid your problems. You will have to create the forced stream manually.

Relight
20th April 2018, 16:38
Thanks for the step-by-step instructions! I have successfully used BDSup2Sub and then BD3D2MK3D's Convert Subtitle tool. Thanks!

r0lZ
20th April 2018, 17:21
OK, so you can confirm that it is possible to extract the forced subs from the complete stream ? That confirm that MakeMKV has probably a bug, perhaps only with the "difficult" Avatar subtitles.

Relight
20th April 2018, 22:43
As you probably know, the way MakeMKV shows subtitles is as 1 track with a nested forced track. It then puts 2 subtitle tracks into the MKV file. If there are no forced subtitles, then of course it doesn't make a second track.

I took the path of least resistance and used BDSup2Sub with the already-extracted full subtitle track from the BD3D2MK3D working project directory (which BD3D2MK3D took from the original MakeMKV MKV file). From that full subtitle track, it successfully made me a new forced-only track - it had some errors (I think related to subtitle end times), but none were critical and I guess it fixed them. And then BD3D2MK3D successfully took that new forced-only track and made the 3D subtitle as sub/ipx, which again seemed the quickest path of least resistance for playback with MPV.

Only watched half the movie so far but everything seems to be working correctly.

I did see that "3d glasses" message in BDSup2Sub, but I never saw it when I started watching the movie.

When I have some more time I will look at muxing the new subtitles into my final SBS file.

r0lZ
21st April 2018, 09:07
OK, thanks for the precisions.

r0lZ
24th April 2018, 09:16
This is an important version. The format of the input and output of the mkvtoolnix tools has radically changed in mkvtoolnix v20. Previously, it used a text format, relatively easy to parse and create. Since v20, that text format has been dropped and replaced by the JSON format. As a consequence, it was impossible to use the new version of mkvmerge with the __MUX_3D_OPTIONS.txt file produced by BD3D2MK3D. (Same thing for the two 2D versions.) And it was impossible to use the output of mkvinfo to analyse the content of the 3D MKV files created by MakeMKV. So, everything was broken, and especially the possibility to open a 3D MKV created by MakeMKV.

I have had to rewrite almost from scratch two parts of the program to make it compatible with mkvmerge and mkvinfo v20. Currently, it seems that the new BD3D2MK3D v1.7 works perfectly with mkvtoolnix v21 and v22, and should work also with future versions. (Note that mkvtoolnix v20 requires already the JSON format, but it doesn't support comments and therefore is not compatible with BD3D2MK3D v1.7.) Therefore, v1.7 is NOT compatible any more with mkvtoolnix v20 or lower. Also, although I have tested v1.7 as far as possible, I cannot be absolutely sure that the format change has not introduced new bugs. If, for any reason, you want to use v1.6 with the old mkvtoolnix exes, you can still download it here (http://download.videohelp.com/r0lZ/BD3D2AVS/BD3D2MK3D_v1.6.7z). Of course, you should preferably use the latest version, and report here if you find a bug.

This version fixes also two bugs (including an important bug introduced in v1.5), and I have added a tool to check any external audio file for Cinavia (requires the free CinDe (http://cinexhd3.com) Cinavia detector installed on your computer).


v1.7 (April 24, 2018)
- Adapted the format of the _MUX_*_OPTIONS files to the new JSON input format necessary for MkvMerge v21+.
- Adapted the way the informations are retrieved from the input MKV due to the new JSON output of MkvInfo v21+.
- Bug introduced in v1.5: The complete 2D subtitle stream was muxed instead of the forced-only stream.
- Fix for new tool Combine two XMP/PNG Streams Together: The values in the <Description> section of the XML were sometimes wrong
- Added the option "Attach some project files as doc" to enable or disable the attachments in the final MKV.
- Added Tools -> Check an audio file for Cinavia (Requires CinDe.exe. See the Help menu.)
- Updated the MkvToolnix exes to the latest version (v22). ATTENTION: BD3D2MK3D REQUIRES now MkvMerge v21 or greater!
- Updated x264 to the latest version (v0.155.2901). x264 is now the same exe for 8 and 10-bit colour depth encoding.
- Updated x265 to the latest version (2.7+3)

Download latest version: BD3D2MK3D.7z (http://download.videohelp.com/r0lZ/BD3D2AVS/BD3D2MK3D.7z)

konikpolny
4th May 2018, 18:56
Hi r0lZ,
can I ask where you get your x264 exes from?
The ones at http://download.videolan.org/pub/videolan/x264/binaries/ seem to be different from yours
:confused:

r0lZ
4th May 2018, 21:57
https://www.videohelp.com/software/x264-Encoder
There is a lot of different builds of x264 and x265, with different compilers and optimization options. It is not always easy to grab the best one, but currently, I trust VideoHelp. It links to download.videolan.org anyway.

BTW, you can easily open the download page of any external tool distributed with BD3D2MK3D with Help menu -> "[toolname] version".

konikpolny
5th May 2018, 14:47
:thanks:

Actionable Mango
8th May 2018, 22:18
I'm looking for troubleshooting advice. I imported the region locked Terminator 2 3D disc from the UK. I ran it through MakeMKV and BD3D2MK3D, then play back through Plex on the LG TV.

The problem I'm having is that the sound is wonky. Dialog and front L/R channels are very quiet and subdued. If I crank up the volume to compensate, I can hear what people are saying but there is very poor dynamic range. Almost everything sounds very damped and muted.

I say "almost" because on rare occasion there is a rear channel audio effect, and that sounds like it has normal dynamic range. And with the volume cranked way up, it is tremendously loud in relation to everything else.

So the opening battle scene in the Skynet future sounds like this:

Laser, laser, laser, gun, explosion, truck driving by, killer robots, REAR LASER BEHIND YOU, laser, laser, laser, gun, etc.

Because the disc is region locked, I cannot simply pop in the disc and see how it is natively. I did look up a review of this UK disc just to see if there was any mention of poor audio mastering, but audio actually gets high marks.

I've read before that certain HD or lossless audio types are not really supported by one or more tools in my process, and also not supported by my TV's audio return channel (ARC) to the receiver. So I tried BD3D2MK3D's audio conversion option to AAC 5.1, which I know is supported by Plex on my TV (in fact Plex even shows an AAC logo for the ripped title).

But, converted to AAC 5.1 it sounds exactly the same to me, with exactly the same problems. And the theory doesn't make much sense because other titles with HD/lossless audio sound great, or at the very least they sound adequate.

FWIW, I'm having the same or similar problem with my Dredd 3D disc rip, but other titles seem fine. I cannot figure out the difference between Dredd/Terminator 2 and all of my other 3D rips.

Any ideas?

r0lZ
8th May 2018, 23:25
Hum, it's the first time I hear about that problem.

Have you tried to mux the original audio (without any conversion to AAC or AC3)? You don't tell what format it is, but normally, BD3D2MK3D is able to just mux it without conversion or channel remapping. If the problem persists, then it's probably your audio decoder or the ARC that has a problem.

Anyway, I have never encountered that problem, and I can't help much more.

tebasuna51
9th May 2018, 09:49
Conversion between audio formats only can produce volume changes if:

1) There are a downmix between number of channels 7.1 -> 5.1 -> 2.0
Do you listen the audio with only stereo speakers?
To avoid the problem maybe you need another downmix instead the default.

2) There are differences between decoders in your audio chain.
Try muxing the original audio like r0lZ say.

von Suppé
9th May 2018, 15:40
Because the disc is region locked, I cannot simply pop in the disc and see how it is natively.Maybe it's in the ripping. You can try to rip the bluray to your hardrive with AnyDVD HD and than check the audio channels. AnyDVD HD will decrypt your BD and can remove region codes also.
You can download a free trial version here:
https://www.redfox.bz/en/anydvdhd.html

Actionable Mango
9th May 2018, 18:02
Thanks everyone, I am grateful to see people trying to help me.


Have you tried to mux the original audio (without any conversion to AAC or AC3)? You don't tell what format it is, but normally, BD3D2MK3D is able to just mux it without conversion or channel remapping. If the problem persists, then it's probably your audio decoder or the ARC that has a problem.

Yes, I originally ran BD3D2MK3D leaving all the streams alone (at default) like I usually do. I only ran it again a second time with AAC 5.1 conversion in BD3D2MK3D because of the bad results from the first run.


1) There are a downmix between number of channels 7.1 -> 5.1 -> 2.0
Do you listen the audio with only stereo speakers?

2) There are differences between decoders in your audio chain.
Try muxing the original audio like r0lZ say.

Thanks for some ideas.

1) The English sound track on the disc is DTS-HDMA 5.1 and I have 5.1 system.

2) I think that's definitely true of the AAC, but I did try the original audio first.

Maybe it's in the ripping. You can try to rip the bluray to your hardrive with AnyDVD HD and than check the audio channels. AnyDVD HD will decrypt your BD and can remove region codes also.
You can download a free trial version here:
https://www.redfox.bz/en/anydvdhd.html

Thanks for that I will give this a try this weekend.

r0lZ
10th May 2018, 08:58
Maybe it's in the ripping.
I don't think so. The ripping can fail, but normally, it has no way to change the volume of some channels only within an audio track. As far as I know, nothing is modified during the decrypting and demux processes.
Anyway, I agree that doing a test with AnyDVD worth it.

von Suppé
10th May 2018, 09:08
Normally both AnyDVD and MakeMKV do a perfect job. I think highly of both.
Though, I do remember having issues with one (of both of them) where the other tool helped me out.

Ant Man
26th May 2018, 08:37
Hello, rOIZ...

First, let me say how much I appreciate your work on this program and your dedication to the community of folks who use and enjoy it!

I have been using BD3D2MK3D for a couple of years and have never had any problems getting it to work until now. After I downloaded version 1.7 I've been getting the error message: "H.264 (MPEG-4 AVC) encoder has stopped working". This happens when I try to run BD3D2MK3D on an MVC 3D file created by MakeMKV. Can you offer any suggestions about things I may be doing wrong to cause this to happen?

Thank you very much.

Ant Man

r0lZ
26th May 2018, 09:12
Welcome to the Doom 9 forums, Ant Man.

Unfortunately, I have never seen this error myself, although some other users have has similar problems (see here (https://forum.doom9.org/showthread.php?p=1826483#post1826483) and here (https://forum.doom9.org/showthread.php?p=1836360#post1836360)). Since I can't reproduce the crash, I don't know how to solve it.

Perhaps it's something wrong with the version of x264 distributed with BD3D2MK3D. Try to download an older version (here (https://www.videohelp.com/software/x264-Encoder)) or the very latest one. Overwrite the x264_x64.exe in the toolset folder with the version you have just downloaded and relaunch __ENCODE_3D_LAUNCHER.cmd.

If that doesn't work, perhaps there is a bug in the current version of MakeMKV. I have already received some complains about MakeMKV not working correctly any more, but it is difficult for me to verify if it is really the culprit. Anyway, if a new version is available, try it.

You can also try to change the settings of the MVC decoder to check if the same problem happens when using DGMVCSource instead of FRIMSource (or the opposite). Try also to disable the hardware acceleration of the MVC decoder. (See the Settings -> MVC Decoder menu.) You will have to relaunch the creation of the project to check the new settings. Try to do some tests with a short clip.

Disabling the hw acceleration has been sufficient to solve the problem for at least one person (see here (https://forum.doom9.org/showthread.php?p=1827655#post1827655)), so try that anyway. If disabling it solved the problem, that may mean that your Intel CPU drivers are outdated. Check if an update is available.

Good luck! In the meantime, I will do some tests here, but I think that everything will be fine. Of course, if you find the origin of the problem, please report it here. Thanks in advance.

BTW, I will be in holidays during June, and I will probably be unable to reply here. Sorry in advance if I can't help you during that period.

r0lZ
26th May 2018, 09:38
Just some hints to facilitate your tests with the other MVC decoder or with hardware acceleration enabled or disabled, without having to relaunch the creation of the whole project each times.

Edit the file __ENCODE_3D_MOVIE.avs with any text editor. You will see lines similar to this:

#LoadPlugin("D:\Tcl\work\BD3D2MK3D\toolset\FRIMSource.dll")
LoadPlugin("D:\Tcl\work\BD3D2MK3D\toolset\DGMVCDecode.dll")

[...]

# Load the two video streams (114391 frames per stream)
#interleaved = FRIMSource("mvc", "01001.track_4113.264", "01001.track_4114.mvc", num_frames = 114391, cache = 2, platform = "")
interleaved = DGMVCSource("01001.track_4113.264", "01001.track_4114.mvc", view = 0, frames = 114391, mode = "auto") # Old syntax for mode: hw = 0


The code above uses DGMVCSource as the MVC decoder. To check with FRIMSource, just comment out the two lines with "DGMVC" and uncomment the two lines with "FRIM", like this:

LoadPlugin("D:\Tcl\work\BD3D2MK3D\toolset\FRIMSource.dll")
#LoadPlugin("D:\Tcl\work\BD3D2MK3D\toolset\DGMVCDecode.dll")

[...]

# Load the two video streams (114391 frames per stream)
interleaved = FRIMSource("mvc", "01001.track_4113.264", "01001.track_4114.mvc", num_frames = 114391, cache = 2, platform = "")
#interleaved = DGMVCSource("01001.track_4113.264", "01001.track_4114.mvc", view = 0, frames = 114391, mode = "auto") # Old syntax for mode: hw = 0

To turn off the hardware acceleration for DGMVCSource, you have to change the mode = "auto" or mode = "hw" parameter to mode = "sw".

For FRIMSource, change platform = "" or platform = "hw" to platform = "sw".

Then, relaunch __ENCODE_3D_LAUNCHER.cmd. If that works, don't forget to change the setting in the BD3D2MK3D GUI, and let me know...

Ant Man
26th May 2018, 19:34
Thanks very much for these suggestions, rOIZ. I will give them a try.

Ant Man

Ant Man
27th May 2018, 21:07
Hello again, rOIZ...

Well I feel very embarrassed. After trying a few of your suggestions I decided to take a look at my AviSynth installation and it turned out I had been trying to make BD3D2MK3D work with AviSynth 2.5.8. I uninstalled 2.5.8 and installed 2.6 and all returned to normal.

Thanks again for trying to help me, I really appreciate it.

I hope you have a great time on your vacation!

Ant Man

r0lZ
27th May 2018, 21:40
No problem. And it is good to know that old versions of avisynth are not compatible. I did not know that.

Have nice encodings!

ggtop
11th June 2018, 20:03
Hi r0lZ,

first time user here. I read about the requirement to have Java installed for certain functions.
Now my question if there is a way to point BD3D2MK3D to a portable Java version. Maybe through editing an ini file as it surely won't be detected automatically.

Hope this hasn't been asked and answered several times...

Thanks,
ggtop

r0lZ
11th June 2018, 22:42
It's possible, yes.
Be sure to close BD3D2MK3D. Then, open BD3D2MK3D.cfg (in the program's directory) and edit the following line:

set ::config(javapath) {C:\Program Files (x86)\Java\jre1.8.0_171\bin\java.exe}

Paste your path to java.exe between the {}.
That should work.

ggtop
12th June 2018, 19:01
Thank you. It works. First I re-enabled the Java check through setting:
set ::config(nojavawarning) false
and then entered the path:
set ::config(javapath) K:\PortableApps\CommonFiles\Java\bin\java.exe}

Hope I can try the final file on the weekend.

Thanks,
ggtop

r0lZ
12th June 2018, 19:10
set ::config(javapath) K:\PortableApps\CommonFiles\Java\bin\java.exe}

Take care. The opening { is missing. Without it, BD3D2MK3D may not start, and the path will not be taken into account anyway.

ggtop
12th June 2018, 21:05
Eagle eye :-)
Obviously I missed it when pasting into the code block. "{" is there. Thank you for looking into it.

ggtop

WhoIsRich
12th September 2018, 01:37
First, thank you for making this tool, it's been very helpful converting my 3D blurays to a format that works on VR headsets.

As other seem to have experienced, occasionally I would find encoding failed from X264 crashing.
By repeatedly running and closing the launcher bat, I could trigger this randomly but frequent enough to test.
So I went through the parameters to see if changing them made a difference, and this was what I found:

In __ENCODE_3D_MOVIE.avs there is a line generated that looks like this:


interleaved = FRIMSource("mvc", "00800.track_4113.264", "00800.track_4114.mvc", num_frames = 137995, cache = 2, platform = "")


According to the 'FRIMSource_readme.pdf' when MVC is used, the layout parameter is mandatory, so I changed the line:


interleaved = FRIMSource("mvc", "00800.track_4113.264", "00800.track_4114.mvc", num_frames = 137995, cache = 2, platform = "", layout = "alt")


After this the crashing stopped, and more importantly, removing it caused the crashing to return!
It would be great if you could make a version that includes layout for further testing.
Another minor observation, in the Help, About, it says use Avisynth 2.5 instead of 2.6.0

Pino72
18th September 2018, 12:15
Hi,

I manage to convert 3D Bluray no problem but would like to crop in my case the roque one video from 1920x1080 to 1920x800 (2.40 AR). When I use the crop paramter for x.264 it takes away 140 from top and bottom of entire 3D file which would normally be with a 100% TAB 1902x2160. I want 1920x1600 but not cropped from top and bottom but top and bottom from both pictures. I hope I made myself clear.

Normally I use dvdfab but it does not work properly with this 3D Bluray and gives me a skip in video/audio after a couple of seconds.

So how can I crop from left and right eye picture the black bars and not from the whole TAB Picture?

Otherwise working really good inlcuding rendering forced subs into video, I like alot! Thanks.

Cheers

r0lZ
18th September 2018, 17:03
Welcome to the Doom9 forums, WhoIsRich, and sorry for replying so late. I have not been notified of your post.

It would be great if you could make a version that includes layout for further testing.
Not sure why the layout argument is mandatory, but I can easily add it. Thanks for the suggestion.
[EDIT] I did some tests with layout = "alt" and it works well. But I have never experienced crashes without that argument, so I can't judge its usefulness.
According to the doc, it is necessary only to properly synchronize the audio and video, but since the avisynth script generated by BD3D2MK3D drops the audio, it should be useless. I added it in my code anyway, because it doesn't hurt, and it is possible that it fixes some random crashes, although I don't understand why (since the default layout is alt anyway).


Another minor observation, in the Help, About, it says use Avisynth 2.5 instead of 2.6.0
Oops, yes, I will fix that too.

Thanks!

r0lZ
18th September 2018, 17:12
Welcome to the Doom9 forums, Pino72!
So how can I crop from left and right eye picture the black bars and not from the whole TAB Picture?
Sorry. I have already explained several times why it's a very, VERY bad idea to crop a 3D movie. I will not repeat the 1000 arguments against cropping again (see here (https://forum.doom9.org/showthread.php?p=1754710#post1754710) and here (https://forum.doom9.org/showthread.php?p=1697804#post1697804) for some), but take in mind that the de-facto standard for 3D REQUIRES a 16:9 picture. Dot. Everything else should be prohibited.

So, sorry, but although it is possible to add a crop in the avisynth script (and modify a couple of other files to take it into account), I will not explain how to do it, because I don't want to encourage you (and possibly other peoples) to do it. And if DVDFab lets you crop 3D videos, stop using it!

Pino72
19th September 2018, 09:14
Fine for me, never had any problems with 2.40 AR 3D Full TAB mkv's in PowerDVD or Kodi etc. If it's too much of a hassle to crop I will leave it uncropped when using your tool no prob.

r0lZ
19th September 2018, 10:32
Thanks for understanding.

I agree that most software players can play cropped 3D movies without too many problems. But most 3D TVs (including probably all Samsung TVs) need the full 16:9 picture, as otherwise they stretch it to occupy the whole screen, and of course, the image is terribly deformed. Perhaps you will buy later a 3D TV that will be incompatible with your cropped movies. Too bad!

Also, the 3D subtitles are positioned for the native 16:9 image, and if you crop it, the player doesn't know where they should be positioned. As a consequence, they are usually shown at a wrong position, and it's terrible for 3D subtitles, as they may be "inside" an object in the foreground of the scene. (And if I implement cropping in BD3D2MK3D, I will be forced to add the code to compute the new positions of all subtitles and to modify the subtitle streams accordingly. Useless and tedious job for me.)

Another argument is that displaying 3D is relatively difficult with the cheap processors of most 3D TVs, and 3D requires precise timings, especially for active 3D glasses. The 3D TVs are optimized for a full 16:9 picture, and are often unable to synchronize correctly the two views when the video has been cropped.

There are many other arguments, and last but not least, it is useless to crop the black borders, as they are extremely easy to compress and do not consume much disc space.

Pino72
20th September 2018, 13:38
Since 3D for new TV's is more or less dead it is a non issue for the future. I always render forced subs into video so no positioning problems :)

The information of having a 21:9 AR is important if you have an automatic screen masking when using a projector e.g. Otherwise of course no need to crop it.

In terms of encoding speed or getting smaller file sizes the black bars are really not making any sort of difference worth mentioning in my view.

WhoIsRich
20th September 2018, 18:33
Welcome to the Doom9 forums, WhoIsRich, and sorry for replying so late. I have not been notified of your post.

Thank you :) I also didn't get notified of your reply, but did for the people before and after.

I can only speculate that the PDF mentions the param doubles an internal cache, which may only affect certain systems.

But I have a stack of blurays to convert, so will give them a go when you release a new version and see what happens...

vadlerg
1st October 2018, 10:07
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.

Excuse me r0lZ to coming back to this question but made some tests again with this amazing BD3D2MK3D tool creating Half-T&B 1920x1080 movies playing nice 60 fps according to my 4K passive 3D TV set. Creating encode with StackVertical(Left,Right) and SAR 1:2 I get an 1920:2160 encode which is playing 24 fps according to the TV info displayed.
I'm not fully convinced about the Full-T&B's superior quality. Is the displayed fps per eye or per full frame to understand in this case? Full-T&B encode is nearly double size. May Full-T&B inferior in quality in this case?

r0lZ
1st October 2018, 11:11
There are two things to consider: Half vs Full and SBS vs T&B.

Obviously, the Full resolution is better than Half, as there are no "lost pixels" during the encoding. But as you have noticed, the rendering may be slower, depending of your TV set. I suppose that it's because the TV needs more memory for its image buffers when handling Full-SBS/T&B. As a consequence, it cannot show the images at the same frame rate, and it cannot interpolate them. You may see a slight flickering when you watch the movie. In the other hand, the resolution is better. You have to decide what you prefer.

Theoretically, Full-SBS and Full-T&B (and Frame Sequential) are strictly identical in term of quality and resolution. The TV must split the combined image in two views anyway, and dividing the original image vertically or horizontally doesn't matter.

For Half-SBS and Half-T&B, the resolution is divided by two in one direction only, and that direction may have an effect on certain TVs. It is often recommended to use Half-SBS for active TVs and Half-T&B for passive TVs. Personally, I prefer Half-SBS for my active Samsung TV, mainly because horizontal lines with high contrast (like the horizon of a landscape under the sun or the baseline of the text of the credits) are more frequent than contrasted vertical lines, and the less good vertical resolution of Half-T&B may make that horizontal lines flicker somewhat. I have never noticed that problem with Half-SBS.

If Half-T&B is often recommended for passive TVs, I think it's because the LG TVs use all even lines with a specific polarization for one view, and all odd lines with the opposite polarisation for the other view. As a consequence, the LG TVs are forced to divide the vertical resolution by 2 anyway, and if you encode in Half-SBS, the resolution is cut by 2 during the encoding and again by 2 during the projection. With Half-T&B, the problem is less important. But I've read somewhere that LG has released expensive TVs that can display all lines in both polarization. Of course, with that TVs, no resolution is lost during the rendering, and Half-SBS and Half-T&B should be equivalent. It's probably also the case for UHD TVs, where there are two times the number of lines and columns anyway.

So, IMO, there is no absolute truth. You may prefer Half or Full and SBS or T&B depending of your equipment, the context (the ambiant light is very important to minimize the flickering effect), and your eyes. I can only recommend to do some tests with a short movie, and watch them without prejudice. It's why BD3D2MK3D has the possibility to encode in that 4 modes (plus Frame Sequential, necessary mainly for some old projectors).

vadlerg
4th October 2018, 11:16
Thank You r0lZ for your time.
I've made some short very high quality HEVC encodings (big files) for testing. The video sequence is quite fast moving so if there are significant quality differences between half and full T&B better to be spotted. I know it may be a little bit off topic but uploaded and sharing them for testing.
Here is half-T&B SAR1:1 (https://mega.nz/#!wfpTxQTY!FT5i5arR2TaYwUZctkj-W_cJDD7OXkt5vQ_tpLYCNXk) and full-T&B SAR1:2 (https://mega.nz/#!xTpzVYYJ!aAW1ui7o3oRVgA7FwSy1WcEVm6I8CTxQB27MIqQhW0I) for testing best on passive 4K TV set.

In the BD3D2MK3D package I've changed the FRIMSource and x265 to the latest available versions.
For full T&B in settings menu - Full-SBS/T&B aspect ratio selection chosen 'Use respectively 1:2 and 2:1' but it set SAR 2:1 in _ENCODE_3D.cmd which is not correct for my 4k LG TV so edited the CMD to SAR 1:2.
Obviously full T&B should be better looking (twice the vertical resolution and so twice the file size). Please check for yourself if interested.

r0lZ
4th October 2018, 12:44
OK, thanks. But my active TV doesn't support Full-T&B or Full-SBS, so I'm not the right person to check your samples. Sorry.

topjes
7th October 2018, 22:07
Hi, can not find any solution online to this error. Windows 7 x64 Ultimate.

Encoding movie in 3D
Movie: Goosebumps 2015 1080p 3D CEE Blu-ray AVC DTS-HD MA 5.1-HDClub
Encoding started 2018-10-07 23:03:19,72

c:\Dane\Goosebumps 2015 1080p 3D CEE Blu-ray AVC DTS-HD MA 5.1-HDClub\MKV3D>"C:\
Program Files (x86)\BD3D2MK3D\toolset\avs2yuv.exe" "__ENCODE_3D_MOVIE.avs" -fr
ames 148560 -o - | "C:\Program Files (x86)\BD3D2MK3D\toolset\x265_x64.exe" -
-output-depth 10 --crf 16 --preset veryslow --no-sao --sar 1:1 --range lim
ited --colorprim bt709 --qpfile chapters_3D.qpfile --frames 148560 --fps 24000/1
001 --output "MKV3D_3D.265" --y4m -

Avisynth error:
ERROR: unknown error (-1), ..\frim_decode\src\pipeline_decode.cpp (191)

ERROR: unknown error (-1), ..\frim_decode\src\pipeline_decode.cpp (786)


(__ENCODE_3D_MOVIE.avs, line 21)
x265 [error]: unable to open input file <->
Encoding finished 2018-10-07 23:03:21,25

c:\Dane\Goosebumps 2015 1080p 3D CEE Blu-ray AVC DTS-HD MA 5.1-HDClub\MKV3D>"C:\
Program Files (x86)\BD3D2MK3D\toolset\mkvmerge.exe" @__MUX_3D_OPTIONS.json | "
C:\Program Files (x86)\BD3D2MK3D\toolset\tee.exe" "MKV3D_3D.mkvmerge.log"
mkvmerge v22.0.0 ('At The End Of The World') 32-bit
Error: The file 'MKV3D_3D.265' could not be opened for reading: open file error.


Press any key to continue . . .

r0lZ
8th October 2018, 09:30
Welcome to the Doom9 forums, topjes !

It seems that it's a problem with the FRIM decoder. Since I'm not the programmer of FRIM, I don't know exactly what is the cause of the error, but there are several things to investigate.


I have recently (https://forum.doom9.org/showthread.php?p=1851363#post1851363) learned that the absence of the layout argument in the FRIMSource avisynth command may be the cause of some random crashes. I have already fixed that problem, but the version with the fix is not available yet. So, the first thing to try is to add that argument manually. Edit the __ENCODE_3D_MOVIE.avs file and add layout = "alt" at the end of the FRIMSource command, like this:
interleaved = FRIMSource("mvc", [...], platform = "", layout = "alt")
Relaunch __ENCODE_3D_LAUNCHER.cmd to verify if that works. Honestly, I'm not sure, as I have never had any problem without that argument, but try anyway.

If you have a recent Intel processor, FRIM tries probably to use the hardware acceleration. It may fail if you don't have the latest Intel drivers properly installed. Try to update them and relaunch __ENCODE_3D_LAUNCHER.cmd.

If that doesn't work, force FRIM to use the software decoder. Change the BD3D2MK3D config with Settings -> MVC Decoder -> Hardware Acceleration -> Disabled, and recreate the project.

If you don't want to recreate the project, you can also edit the __ENCODE_3D_MOVIE.avs file and change the platform argument in the line with interleaved = FRIMSource("mvc", [...], platform = "") to platform = "sw" and relaunch the encoding.

If you still get that error, try to use the DGMVCSource decoder : Settings -> MVC Decoder -> Use DGMVCSource.
Again, try to use also the software decoder. Relaunch the project.

Or, if you prefer to just modify your current project to test if that works, edit __ENCODE_3D_MOVIE.avs and change this:

LoadPlugin("D:\Tcl\work\BD3D2MK3D\toolset\FRIMSource.dll")
#LoadPlugin("D:\Tcl\work\BD3D2MK3D\toolset\DGMVCDecode.dll")

[...]

# Load the two video streams (137033 frames per stream)
interleaved = FRIMSource("mvc", [...], platform = "")
#interleaved = DGMVCSource([...], mode = "auto") # Old syntax for mode: hw = 0

to this:

#LoadPlugin("D:\Tcl\work\BD3D2MK3D\toolset\FRIMSource.dll")
LoadPlugin("D:\Tcl\work\BD3D2MK3D\toolset\DGMVCDecode.dll")

[...]

# Load the two video streams (137033 frames per stream)
#interleaved = FRIMSource("mvc", [...], platform = "")
interleaved = DGMVCSource([...], mode = "sw") # Old syntax for mode: hw = 0

If that work, you can also try with mode = "auto" to use the hardware acceleration.

Can you tell me if it's the first time you use BD3D2MK3D, or if you have already converted some movies successfully ? In the second case, there is perhaps a problem with the BD. Are you sure it has been correctly decrypted ?
Or perhaps you have just updated the Intel drivers and the latest version has some bugs ? (It's not impossible with Intel!)

Anyway, let me know if one of the tricks above was sufficient to solve the problem.

Good luck !

Spo0cky ^^
10th October 2018, 21:12
Hello Guys, hopefully somebody here can help me.
I have the following problem.
I tried to convert a "3D Bluray" to "3D Mkv" which worked so far, until the last process.
There the program assembles the movie from the video track, the audio track, the subtitle track and the chapters.
Unfortunately, the program doesn't do that for me.
Is it possible to start the last process manually ?
If you need a log file, please tell me which file I need to post.

Greetz Spo0cky ^^

r0lZ
10th October 2018, 22:46
Welcome to the Doom9 forums, Spo0cky ^^

BD3D2MK3D should have generated the file __MUX_3D.cmd, that is normally launched automatically after the encoding of the video (unless you have unticked the option "When encoding is finished, mux to MKV file" at the bottom of the last tab.)

Anyway, just double-click it to create the final MKV file.

If that doesn't work, edit that file and add the command "pause" (without the quotes) at the end of the file, and relaunch it. You should see an error message in the command prompt window. Post it here, and I'll try to understand what's going wrong. Also, verify if the file 00800_3D.264 exists in the project folder (00800 is the number of the playlist of the BD, and may be different.)

Roco
19th October 2018, 14:23
Hi, I initiated conversion of a B&W old iso 3D bluray image ~25GB to TAB mkv +DTS to AC3 on a 45GB free-space folder and the app always warned that there is 0.0 GB left. I gradually increased free space up to 80GB and I was always getting that erroneous warning. Then I realized that this is a bug and I proceeded with the conversion anyway. I set CRF at 21 to get some more detail. After about 6 hours I got the following warning with the corresponding feedback:

https://i2.imageban.ru/out/2018/10/19/b75eead69ae8f1c906d2a144acc7e57b.png


https://i5.imageban.ru/out/2018/10/19/f00e8c88d33f1371240e85fc7ae7b738.png

I thought that I lost the whole conversion but after I pressed 'close program' it started to multiplex and a few seconds later I got the final conversion -which was non-corrupted, but it was only 2.7GB! I never asked nor I wanted economy in file size, especially of that magnitude -I haven't seen such a small TAB file (running time 1h, 20').

Aside the issues above, out of your experience what settings should I use (on average) when I want to preserve the grain and the subtle detail on a relatively noisy movie? I guess that lowering CRF alone is not enough. I'd also prefer to set the bitrate if possible, not an abstract, non-linear, unintuitive setting like CRF.

r0lZ
19th October 2018, 16:07
Hum, not sure why you got the false free-space warning. What version of Windows do you use ?

For the crash of the encoder, I'm not sure too, but it might be fixed in the version I will release soon.

The final file size is strange indeed, especially if you have encoded a noisy movie. Normally, with CRF 21, I expect a file size around 6 GB, or more if the movie is particularly noisy. Your movie is very short, but it's strange anyway. Are you sure the encoding is really finished and you can play the final credits up to the end ?

I have read somewhere that lowering the CRF by 3 has the effect of approximately doubling the bitrate of the video track. But take in mind that the final file size depends also of other factors, like the preset. A slower preset compresses better and/or has less artifacts.

Preserving the grain is always a delicate operation, as it's the first thing that the encoder removes (or simplifies at best), so you need either a very low CRF, or perhaps you should try the "grain" tune. (I don't use it myself, so I don't know if it is efficient.)

If you want to obtain precisely a final bitrate or file size, just change the Mode to 2-pass, and select either the target video bitrate of the final size of the MKV file (including the audio tracks and other overheads). However, you should know that, in addition to be much slower, 2-pass encoding gives ALWAYS a slightly less good quality than CRF for the same bitrate, due to the additional constraint. ABR (aka 1-pass) is really bad, but if the second pass can distribute almost correctly the bitrate, it cannot be perfect. It's why I prefer to always encode in CRF, without any constraint. and I reserves 2-pass to when the final file size is really important, like when I want to copy the movie on a DVD.

And I have to disagree with you. CRF is MUCH MORE intuitive than 2-pass. Because it computes exactly the best result given the movie you are encoding. You will therefore obtain a very low final bitrate for a movie easy to compress (such as an animated movie in computer graphics without any noise), and a bigger file size for a difficult, noisy action movie. Giving the same bitrate to that two opposed kind of movies is simply a nonsense, and it is very difficult for a human being to know what bitrate is really suitable for a specific movie. The CRF mode computes it automatically for you, and usually, it does it well. Now, in your precise case, I can understand that you don't trust it. :-(

Roco
20th October 2018, 11:31
I'm using Windows 7.

In my case I also have a real constraint that it is directly related to the bitrate: my 3D TV has a limit of the bitrate it can playback (like all other TVs obviously) which is about 25-27Mbps. Imagine spending two days for a conversion and then discover that the bitrate is above that limit and it is stuttering or worse.
If the movie is noisy + too long, I could use the highest allowable bitrate eg 24Mb/s and be assured that I will get the best quality I can (for a given preset/encoding time investment).

For such cases of physical constraints, I think a high bit-rate limit would be a very useful feature while using CRF -but obviously that will have to be implemented by the x264 developer guys.

Anyway, is it possible to make BD3D2MK3D encode just a tiny part of the movie -preferably from the middle to avoid the credits, in order to test and decide the best settings?


P.S. Despite the difficulties, your tool is still very helpful, thanks and congrats.

r0lZ
20th October 2018, 12:01
[...] I think a high bit-rate limit would be a very useful feature while using CRF -but obviously that will have to be implemented by the x264 developer guys.
You can actually specify the maximum bitrate, either yourself in the "additional options" field in the last tab, or simply by specifying the level, again in the last tab. I use always the level 4.1, that forces the maximum bitrate to 62500 and is suitable for most TVs. (A BD Player is limited to level 4.0, but there is little difference with 4.1. Levels 5.0 and more are necessary for Full-SBS or Full-T&B.) Note that the buffer size is also automatically limited to 78125 when using level 4.1. Take care: specifying the level alone in the command line is NOT sufficient to enforce that limits. You have to add the corresponding limitations in the command line, but BD3D2MK3D does it automatically for you, so you don't have to worry. The command for my encodings at level 4.1 looks like this:

"D:\BD3D2MK3D\toolset\avs2yuv.exe" ^
"__ENCODE_3D_MOVIE.avs" -frames 147552 -o - ^
| "D:\BD3D2MK3D\toolset\x264_x64.exe" --output-depth 8 ^
--crf 20 --preset slow --level 4.1 --vbv-bufsize 78125 --vbv-maxrate 62500 ^
--sar 1:1 --range tv --colormatrix bt709 ^
--frame-packing 3 --qpfile chapters_3D.qpfile --frames 147552 --fps 24000/1001 ^
--output "01113_3D.264" --demuxer y4m --stdin y4m -

You should know what is the maximum level (and not bitrate) that your TV supports, and use it for your encodings, and you will be safe, even with a very low CRF.

Note also that to be absolutely sure that your encoding will be OK for all TVs, you can also tick the "BD Compatible" option, that enforces some additional parameters so that your encoding will be limited to what a 1080p BD is supposed to contain.

Anyway, is it possible to make BD3D2MK3D encode just a tiny part of the movie -preferably from the middle to avoid the credits, in order to test and decide the best settings?
Unfortunately, the currently available free MVC decoders (FRIMSource and DGMVCSource) used internally by BD3D2MK3D are unable to seek to a specific frame in the movie. Therefore, your encoding must begin with frame 0. But if you wish, you can limit the encoding to a certain number of frames. Just edit the two numbers of frames in the command (highlighted in green in the example above). However, you should know that the whole audio and subtitle tracks will be muxed, and therefore most players will consider that the movie is complete, although of course you will be unable to play past the cut point.

Personally, I did most of my tests with a couple of short movies, and I don't have to check the parameters with each new encode.

Roco
22nd October 2018, 22:58
Thanks for the info, I'm using --frames to test the settings for the first few minutes.
The level is not mentioned in the user manual but since level 4.0 is limited to 25Mbits which is very close to the limit I have experienced, that must be it.

The TV definitely doesn't support full TAB/SBS (via a usb drive). Ironically it does playback 3D blurays compressed with makemkv though (full 3D res), but they stutter as they are higher bitrate except a couple of cases (initially the screen is black and it works after I select TAB).

r0lZ
23rd October 2018, 09:14
The TV definitely doesn't support full TAB/SBS (via a usb drive). Ironically it does playback 3D blurays [...]
Full-SBS of Full-TAB requires a buffer twice as large as the 1080p resolution, plus two buffers to store respectively the left and right images. It's why most 1080p TVs do not support Full-SBS/TAB. In the other hand, a BD player (or a 3D MKV made with MakeMKV) serves the images one at a time, and therefore they do not require the additional double-sized buffer. (BD3D2MK3D can create also Frame Sequential MKV, where the images are in full resolution, and there is no need to split them since they are stored alone, but unfortunately, only a few TVs support that mode. Pity!)

sneaker_ger
23rd October 2018, 10:45
In the other hand, a BD player [...] serves the images one at a time
Isn't 3D in HDMI basically SBS?

r0lZ
23rd October 2018, 16:19
I'm not sure, but I don't think so. The images are probably served one at a time, in alternance. Why should the player combine them in SBS to let the TV split them right after ?
Also, AFAIK, SBS (and T&B) are non-official standards, invented by the users, and not defined by the industry.

sneaker_ger
23rd October 2018, 16:34
Maybe I was mistaken. I thought 3D in HDMI was always SBS. But they support different variants according to the HDMI website (https://www.hdmi.org/manufacturer/hdmi_1_4/3d.aspx).

r0lZ
25th October 2018, 11:31
This version is mainly an update of the third party applications, but it contains also two attempts to fix little bugs.

v1.8 (October 25, 2018)
- Changed the (wrong) link to BDSup2Sub++ in Info -> BDSup2Sub++ Version.
- Added the layout parameter to the FRIMSource avisynth syntax, to possibly fix some random crashes of the decoder.
- Fixed Avisynth version in Help -> About, from 1.5 to 1.6
- Attempt to fix a bug with free disc space wrongly reported as 0 KB.
- Updated x264 to the latest version (0.157.2935)
- Updated x265 to the latest version (2.9+2)
- Updated the MkvToolnix exes to the latest version (28.1.0)

Enjoy! BD3D2MK3D.7z (http://download.videohelp.com/r0lZ/BD3D2AVS/BD3D2MK3D.7z)

zaphodalive
26th October 2018, 20:50
r0lZ! Ah, 'tis been many a season since I was last on here. I take full credit for the initial suggestion of allowing full-SBS long ago, and many thanks to you for implementing it as asked. It's good to see you're still working on this tool after so long... I've decided to go encode my backlog of ISOs so my CPU's gonna be busy for the next 2-3 weeks ;)

I've started using x265 but it's disconcerting when a full-SBS movie comes in at 6-8Gb - I'm using a decent CRF (18) so I guess I'll just have to trust it ("future" technology is scary as I get older!)

Anywho I hope you enjoy maintaining the tool and many thanks for doing so! Have a good one.

Cheers

r0lZ
26th October 2018, 23:07
Hi, zaphodalive! Yes, I'm still working on it, although it is now stable and doesn't require much work any more.
I've started using x265 but it's disconcerting when a full-SBS movie comes in at 6-8Gb - I'm using a decent CRF (18) so I guess I'll just have to trust it ("future" technology is scary as I get older!)
h265 is indeed extremely efficient, and small file sizes are not abnormal, especially for clean movies in computer graphics, easy to compress. You can certainly divide the size of the same movie encoded with x264 by 2 for the same, or even a better quality. Anyway, as I have already written many times, trust your eyes. If the result is pleasant, don't think that a low bitrate is bad.

Good work with BD3D2MK3D !

deank
28th October 2018, 11:10
Hey r0lZ!

Thanks for BD3D2MK3D!

I have some interesting information to share after I tried a lot of different formats with my android TV. I wanted to use a native android app (in my case Movian) to play 3D content on the tv and since no external HDMI-connected-player is involved I cannot use the HDMI 1.4+ 1920x2205 frame-packing format. I had to chose from one of the HALF SBS/TAB formats, because I had some weird issues with the FULL SBS/TAB.

Anyway, my TV is Sony Bravia 4k 2015 (KD-55S8505C) with active 3D, running Android TV 7 and it supports H264/AVC Level 5.2 3840x2160 so I decided to encode 4K SBS :) which is 1920x2160 for each eye (vertically stretching each frame). During playback the TV stretches each frame to 3840x2160 (or shrinks it to 1920x1080) and this gives me back two full 1920x1080p frames in 3D. It is kind of a hybrid version of Half/Full SBS/TAB. :)


StackHorizontal(BicubicResize(Left, 1920, 2160, 0, 0.5), BicubicResize(Right, 1920, 2160, 0, 0.5))
AssumeFPS("ntsc_film")


I encoded it at 20MBps bitrate (level 5.1) and compared it to the quality of a true frame-packed video from an external player (in my case Raspberry Pi3, which sends the original blu-ray AVC+MVC in 1920x2205 via HDMI). I can say that the result is perfect and I can enjoy full 1080p/24hz for each eye on Android TV.

I know it is a very specific case, but may be there are people out there who would like to use only the TV without an external player (no extra hdmi/cables/devices).

And another note on using HorizontalResizeBy2 (http://avisynth.nl/index.php/ReduceBy2):


ReduceBy2 filters do not preserve the position of the image center. It shifts color planes by half of pixel


I'm not sure how much it affects the 3D perception (if at all).


If you are enlarging your video, you will get sharper results with BicubicResize than with BilinearResize. However, if you are shrinking it, you may prefer BilinearResize as it performs some antialiasing.

r0lZ
28th October 2018, 11:45
Interesting information, but honestly, I'm not sure I like the idea of upscaling the 3D full-HD to UHD. IMO, the good way to preserve the quality is to encode in Full-SBS or Full-T&B. Upscaling introduces always some artifacts, even with the best (and slow!) resize method. And, of course, it requires more disc space, or a less good encoding quality. I understand that Full-SBS is not supported by your equipment, but as you wrote, it's a very specific case. So, I don't think I will implement that method in BD3D2MK3D, as it can also be confusing for most users. Anyway, it is easy to do the modification yourself, as you have explained.

For the ReduceBy2 method, I have already explained that it's IMO the best compromise. Don't forget that the resolution is divided exactly be 2 (in one direction), and that means that merging two pixels to form a single pixel is sufficient. It's extremely easy, and a rough and rapid algorithm is largely sufficient for a good quality. And the shift of the color planes by 1/2 pixel is so small that it is certainly un-noticeable. Bicubic and Bilinear resizers are certainly better when you have to shrink by a factor different than 2, but they are probably not really better to divide the resolution by 2. And of course, it is easy for a powerful user to edit the avisynth script if he really wants to use another filter. So, here again, I will not change that.

Thanks anyway for the information. I wrote BD3D2MK3D with peoples like you in mind. The program creates the basis so that newbies can obtain a good result immediately, without having to learn a lot of things, but the app creates the various scripts with a lot of comments so that power users can modify them easily to suit their needs.

frank
31st October 2018, 10:50
Posted by sneaker_ger:
...I thought 3D in HDMI was always SBS. But they support different variants according to the HDMI website.

From HDMI Wiki:
HDMI 1.4a was released on March 4, 2010, and added two mandatory 3D formats for broadcast content, which was deferred with HDMI 1.4 pending the direction of the 3D broadcast market. HDMI 1.4a has defined mandatory 3D formats for broadcast, game, and movie content. HDMI 1.4a requires that 3D displays implement the frame packing 3D format at either 720p50 and 1080p24 or 720p60 and 1080p24, side-by-side horizontal at either 1080i50 or 1080i60, and top-and-bottom at either 720p50 and 1080p24 or 720p60 and 1080p24.

T&B is the best format for passive 3D (LG TVs).

frank
31st October 2018, 11:24
Recently I had errors with "Geostorm 3D".
DGMVCSource() decodes black frames in hardware mode .
But FRIM does it properly.

The FRIM packet was compiled with latest Intel SDK, but DGMVC not.

I use Win 10 Pro 64bit 1709.

r0lZ
31st October 2018, 16:33
Thanks for the info. Not really surprising, and it's why FRIM is now the default encoder (but the update to a new version of BD3D2MK3D doesn't change your settings).

Also, hardware mode has always been picky, especially if your drivers are not up to date. I even wonder if I should set the software mode by default, instead of automatic. Given the low speed gain of hw mode and the additional security of sw mode, that could be a good thing.

videoh
31st October 2018, 17:19
Recently I had errors with "Geostorm 3D".
DGMVCSource() decodes black frames in hardware mode .
But FRIM does it properly.

The FRIM packet was compiled with latest Intel SDK, but DGMVC not.
DGMVCSource beta 26:

* Rebuilt with the latest Intel MSDK 2018 R2.

http://rationalqm.us/dgmvcsource/dgmvcsource100b26.zip

Please advise if it is working with Geostorm 3D.

frank
31st October 2018, 19:26
Hi Donald! :thanks:

I have tested your new dgmvcsource.dll b26
But sorry, same behavior: First about 10 sec until it starts encoding, and then encodes black frames. :(
SW mode works.

I'm working with Dell 9560, W10 Pro and Avisynth 2.6.0 / Avisynth+


EDIT:
If I right remember I had the same problem with The Marsian 3D.

videoh
31st October 2018, 20:26
Thanks for the testing. Any possibility you could cut a sample for me that shows this behavior? It's working fine on the samples that I have. Ciao.

frank
2nd November 2018, 10:41
Here two test files, about 180MB:
Geostorm1.3D.mkv (https://ufile.io/x2ben)
DerMarsianer1.3D.mkv (https://ufile.io/vdhg8)
They don't decode in HW mode with DGMVCsource.dll but decode properly with FRIMsource.dll.

Something happend. The old version FRIMsource 1.27 (2017) has the same issue as DGMVCsource. The latest version 1.29 (2018) included in BD3D2MK3D works.
Maybe Intel has something changed to support newer hardware. My Notebook has the Kaby Lake chipset.

videoh
2nd November 2018, 18:33
Here two test files, about 180MB:
Geostorm1.3D.mkv (https://ufile.io/x2ben)
DerMarsianer1.3D.mkv (https://ufile.io/vdhg8)
They don't decode in HW mode with DGMVCsource.dll but decode properly with FRIMsource.dll. Thanks very much frank; it's greatly appreciated.

Something happened. The old version FRIMsource 1.27 (2017) has the same issue as DGMVCsource. The latest version 1.29 (2018) included in BD3D2MK3D works. Do you have any insights about what was changed between 1.29 and 1.27 that made the difference? It appears that just rebuilding with the latest IMSDK is not enough.

videoh
4th November 2018, 18:56
frank,

I haven't worked with 3D MKV files before. How do you properly demux the video so that it can be opened by my filter or frim? Thanks.

frank
4th November 2018, 19:21
Do you have any insights about what was changed between 1.29 and 1.27 that made the difference?
No idea but I asked videofan3d.


I haven't worked with 3D MKV files before. How do you properly demux the video so that it can be opened by my filter or frim?

Use BD3D2MK3D and load the mkv. It creates a project with all scripts.
BD3D2MK3D is a simple archive that you can extract to your user folder.

AFAIK only MakeMKV can create the 3D mkv from BD or ISO. The idea came from the developer of the Stereoscopic Player.
The MVC 3D mkv format generated by MakeMKV is not an industrie standard, the dependent view is embedded in specific NAL units with extended SEI messages. Only few players support the 3D feature: PotPlayer, Kodi, PowerDVD 17...
Others only decode the basic 2D stream.

r0lZ
4th November 2018, 20:39
To demux the MKV samples, you can also use mkvextract, a command line tool that is part of mkvtoolnix (https://mkvtoolnix.download). It is also included in the toolset folder of BD3D2MK3D. If you prefer a GUI, try mkvextractGUI-2 (https://sourceforge.net/projects/mkvextractgui-2/). And, as Frank wrote, you can also just replace DGMVCDecode.dll in the toolset folder of BD3D2MK3D and use it in MKV source mode.

BTW, thanks to you, and to Frank, for your efforts! And sorry. I can't help, because I can't test the filter in hw mode. :-(

videoh
4th November 2018, 22:00
Thanks, guys.

frank
5th November 2018, 09:47
After Win10 update to v1709 M$ has changed the power plans.
So the High Performance plan has disappeared! I prefer it to use in BD3D2MK3D. Always worked properly to avoid sleep/hibernate.
But the scheme is not lost. On notebooks it is present in Windows Mobility Center.

After some powercfg research I found:
Use aliases instead of cryptic GUID strings. M$ recommends it, because it works in all languages and versions.
cmd to show the options:
powercfg /aliases
I cannot change the config of BD3D2MK3D, it only accepts GUID.
In the encode script to set High Performance:
powercfg -setactive SCHEME_MIN
At end to set Balanced:
powercfg -setactive SCHEME_BALANCED
So you don't need a copy of the power plan or other workarounds. That's all. Please change.


BTW HW mode increases the speed about 25 % on my Intel chipset.

r0lZ
6th November 2018, 16:57
Yeah, Doom9 is back!
After Win10 update to v1709 M$ has changed the power plans.
So the High Performance plan has disappeared!
It's not what I've seen. The High Performance power plan is now somewhat hidden, but it is still available via the powercfg.cpl control panel. Just tick the Show Additional Plans, and you'll see it. (Same thing for Win7 BTW.)

Anyway, BD3D2MK3D doesn't need it visible to function properly. You should see the 3 "classic" power plans, plus any additional plan you may have created manually in the Settings -> Power Plans menu.

However, I did not know that alias stuff. Thanks for the information.
So, I've slightly modified my code, and now BD3D2MK3D still uses the GUID internally, but it uses the alias in the cmd scripts it generates, as it's easier to understand and modify. (Of course, if you create a new plan yourself, I suppose that it will not have an alias, and if you use it with BD3D2MK3D, the GUID will still be used.) Also, note that the GUIDs are not hardcoded. BD3D2MK3D retrieves them when it starts with the command powercfg -list, so I'm sure it will work with any plan of any version of Windows.

frank
7th November 2018, 22:18
Thanks!

I had the problem that I tested old conversion from saved scripts, not from the BD3D2MK3D GUI, because they are specific. In the mean time M$ had changed GUID or I used another machine (created new power plans...) and the old GUID strings did'nt work anymore. :(

With aliases it worked again without starting the whole BD3D2MK3D conversion.
If you create a new power plan then it gets no alias, I know that. I don't need new power plans, I only wanted the High Performance visual back. That works in the latest Win10 with a copy -- and new GUID...
Yes, the High Performance power plan is hidden, not deleted because of a big number of hardware drivers that uses it.

r0lZ
8th November 2018, 11:32
Thanks!

I had the problem that I tested old conversion from saved scripts, not from the BD3D2MK3D GUI, because they are specific. In the mean time M$ had changed GUID or I used another machine (created new power plans...) and the old GUID strings did'nt work anymore. :(
I see. So, I will need to change another thing in BD3D2MK3D. Currently, the power plan to use when encoding and the default plan to restore are still stored in the settings as GUIDs. I will change that, so that the setting will still work in case of GUID change.

Triple-M
30th January 2019, 18:00
I installed your tool again today because the topic 3D is up to date again with me and now I have the problem that the subtitle is not displayed correctly. Can you tell me what I'm doing wrong?
Unfortunately, I can not set a picture but the subtitle is displayed only halfway. if I represent the pictures side by side then half of the subtitle is right in the picture and the other half in the left picture.

r0lZ
30th January 2019, 19:55
The 3D subtitles are made of two parts, just like the video. It's normal. They must be displayed over the video by the player BEFORE the split of the two views (to send each half to the corresponding eye). Unfortunately, most players, and especially most 3D TVs, cannot display them correctly. More advanced players (like PopPlayer, for example) have options to tell when and how to display the subtitles. With that kind of players, it should be sufficient to modify an option somewhere to see the subtitles correctly, with the right 3D depth.

If you use a basic player, without that possibility, I recommend to use the option in the last tab to "burn" (or "hardcode") the 3D subtitles in the video. The big advantage is that they will be displayed correctly with all players. But of course, you cannot disable them or change for another subtitle language. If, for any reason, burning the subtitles is not acceptable, you can also use the option to generate only the 2D subtitles, but of course they will be displayed on the surface of the screen, without any 3D depth. IMO, it's the worst solution, but it is supported by BD3D2MK3D.

So, to summarise, if you have already used the "classic" 3D subtitles streams successfully with your current 3D equipment and player, then an option has changed, and you must restore it. Otherwise, your player may be incompatible, and the best solution is to burn the 3D subtitles in the video.

Triple-M
30th January 2019, 19:59
Thx. I will test it tomorrow.

syrist
8th February 2019, 16:33
The original ISO has the left and right eyes backwards so I have to manually tell the player to swap eyes.

So before I encode the ISO to half top-bottom, it would be nice to have the left-right eyes swapped to save that extra step in the player. Does BD3D2MK3D have this ability somewhere? I couldn't find it.

Thanks,
-Pete

r0lZ
8th February 2019, 16:53
It's not in the GUI, because BD3D2MK3D trust the BD, but you can change the order of the views manually.
Just generate the project normally, but before launching the encoding, edit the file __ENCODE_3D_MOVIE.avs in the project folder with a text editor or notepad, and change the following lines:

left = SelectEven(interleaved)
right = SelectOdd(interleaved)

to this:

right = SelectEven(interleaved)
left = SelectOdd(interleaved)

Or the opposite, depending of the order stored in the MPLS file. The idea is to swap the left and right streams just by swapping their names.
That should work.

syrist
9th February 2019, 15:54
It's not in the GUI, because BD3D2MK3D trust the BD, but you can change the order of the views manually.
Just generate the project normally, but before launching the encoding, edit the file __ENCODE_3D_MOVIE.avs in the project folder with a text editor or notepad, and change the following lines:

left = SelectEven(interleaved)
right = SelectOdd(interleaved)

to this:

right = SelectEven(interleaved)
left = SelectOdd(interleaved)

Or the opposite, depending of the order stored in the MPLS file. The idea is to swap the left and right streams just by swapping their names.
That should work.

Thanks for the reply... I'll try it tonight!

albur
23rd March 2019, 11:45
Hi, i can't get a propper Full SBS or Full TAB, it always create a huge black bars so the image is seen in a little square, in SBS i get double bars up and down and in TAB I get bars in the sides, what i'm doing wrong? thx

konikpolny
25th March 2019, 23:51
Hi r0lZ,
I also had a problem with the swapped views. BD3D2MK3D created __ENCODE_3D_MOVIE.avs with this info and swapped the streams as

# Current base view: right eye!
# The views are inverted: AVC stream = right view, MVC stream = left view.
right = SelectEven(interleaved)
left = SelectOdd(interleaved)
...
# Build Side-by-Side stream
StackHorizontal(Left, Right)

However this setting for me output identical 2 views - there is no 3D, the left and right views have exactly the same image/frame.

Now, I made a few quick tests (upto some limited number of frames from the start) and manually changed the above settings - but whatever config i tried the best I could get was an inverted 3D view, which obviously is still better than no 3D :)

1a)
left = SelectEven(interleaved)
right = SelectOdd(interleaved)
StackHorizontal(Left, Right)
= inverted 3D

1b)
left = SelectEven(interleaved)
right = SelectOdd(interleaved)
StackHorizontal(Right, Left)
= no 3D, 1 duplicated VIEW!

2a)
right = SelectEven(interleaved)
left = SelectOdd(interleaved)
StackHorizontal(Right, Left)
= inverted 3D

2b) #(original BD3D2MK3D setting)
right = SelectEven(interleaved)
left = SelectOdd(interleaved)
StackHorizontal(Left, Right)
= no 3D, 1 duplicated VIEW!

Could you please check if everything's correct as far as BD3D2MK3D is concerned. The same ONE duplicated view seems like the setting is wrong, and the StackHorizontal() pair should be inverted also. What I don't understand is why I cannot get the right base view as the 1st left view.

On my final note I can add that with the PotPlayer I can change the filename to tell it how to read the 3D and force the proper view order. If i append to the filename " 3D-rl.mk3d" the views are swapped and no additional change on the device (projector,TV) would be necessary. Still, as Syrist says
it would be nice to have the left-right eyes swapped to save that extra step in the player. I would also very much like to ensure that my movie is properly encoded.

r0lZ
26th March 2019, 09:22
Sorry for replying late. I haven't been notified of your post.
Hi, i can't get a propper Full SBS or Full TAB, it always create a huge black bars so the image is seen in a little square, in SBS i get double bars up and down and in TAB I get bars in the sides, what i'm doing wrong? thx
Well, it's the first time I heard of this problem. Anyway, BD3D2MK3D doesn't add black bars. Never. It doesn't remove the original black bars, because the 3D specs impose a 16:9 aspect ratio, and removing them is therefore prohibited. So, IMO, if your movie has unusual black bars around the picture, it's probably because there are already present in the original movie.

To confirm this, please open the BD in BD3D2MK3D, and use the preview button in the bottom corner of the first tab to play the movie (in 2D) in your player. Try to capture a single frame (most players have an option to save the current image as JPEG) or do a screenshot, and post the resulting image in an image sharing service such as ImageShack (https://imageshack.us), and post the link here. I'll try to understand what's happening.

Also, I'm interested to know the name of the movie you are encoding. Perhaps I can try it here...

r0lZ
26th March 2019, 09:55
Could you please check if everything's correct as far as BD3D2MK3D is concerned. The same ONE duplicated view seems like the setting is wrong, and the StackHorizontal() pair should be inverted also. What I don't understand is why I cannot get the right base view as the 1st left view.
Me too, I don't understand.
The fact that the original script produces a flat picture is very strange. And, indeed, if it's the case, it seems difficult to re-order the views correctly simply by editing the AVS script. I suspect something else, but it is difficult to know exactly what.

If, when you play the original BD in your 3D BD player, the 3D is correct and the views are not inverted, then you should not need to change the views order in the script, as BD3D2MK3D is able to detect the correct order automatically. So, I suspect something else, probably related to the decoding of the MVC stream. So, restore the script as it has been created by BD3D2MK3D, and then try the following things:

If you have an Intel CPU that supports the hardware acceleration, perhaps the problem is due to the Intel drivers. (They have already been the source of several problems in the past.) So, try to disable the hardware acceleration to force the MVC decoder to use the libraries provided by BD3D2MK3D.

If you use the FrimSource decoder, change this line:
interleaved = FRIMSource("mvc", "00352.track_4113.264", "00352.track_4114.mvc", layout = "alt", num_frames = 168072, cache = 2, platform = "")
to this:
interleaved = FRIMSource("mvc", "00352.track_4113.264", "00352.track_4114.mvc", layout = "alt", num_frames = 168072, cache = 2, platform = "sw")

And if you use DGMVCSource, change this:
interleaved = DGMVCSource("00352.track_4113.264", "00352.track_4114.mvc", view = 0, frames = 168072, mode = "auto") # Old syntax for mode: hw = 0
to this:
interleaved = DGMVCSource("00352.track_4113.264", "00352.track_4114.mvc", view = 0, frames = 168072, mode = "sw") # Old syntax for mode: hw = 0

The problem could also be caused by a bug in the Avisynth filter. So, try to use the other decoder. Here is the protion of the script that determines what decoder is used:

#LoadPlugin("D:\Tcl\work\BD3D2MK3D\toolset\FRIMSource.dll")
LoadPlugin("D:\Tcl\work\BD3D2MK3D\toolset\DGMVCDecode.dll")

[...]

# Load the two video streams (168072 frames per stream)
#interleaved = FRIMSource("mvc", "00352.track_4113.264", "00352.track_4114.mvc", layout = "alt", num_frames = 168072, cache = 2, platform = "")
interleaved = DGMVCSource("00352.track_4113.264", "00352.track_4114.mvc", view = 0, frames = 168072, mode = "auto") # Old syntax for mode: hw = 0

In the example above, DGMVCDecode is used, because the line that loads the FRIMSource filter is commented out, as well as the FRIMSource command, with the two # (in red).

To use the other decoder, remove the red #, and comment-out or delete the two lines related to the other decoder.

Of course, you can also change these settings in the BD3D2MK3D menu Settings -> MVC Decoder, but you will have to regenerate the whole project. IMO, to do some tests, it is easier to edit the AVS script. (BTW, for quick tests, you can also change the number of frames to encode in the __ENCODE_3D.cmd file. You should change the two occurrences.)

Let me know if one of these tricks has worked. And if it's the case, change the settings accordingly in the BD3D2MK3D menu for your next encodings.

Also, please tell me what is the BD3D that has caused that problem, and if you have already experienced similar problems in the past. Thanks in advance.

albur
26th March 2019, 12:22
Sorry for replying late. I haven't been notified of your post.

Well, it's the first time I heard of this problem. Anyway, BD3D2MK3D doesn't add black bars. Never. It doesn't remove the original black bars, because the 3D specs impose a 16:9 aspect ratio, and removing them is therefore prohibited. So, IMO, if your movie has unusual black bars around the picture, it's probably because there are already present in the original movie.

To confirm this, please open the BD in BD3D2MK3D, and use the preview button in the bottom corner of the first tab to play the movie (in 2D) in your player. Try to capture a single frame (most players have an option to save the current image as JPEG) or do a screenshot, and post the resulting image in an image sharing service such as ImageShack (https://imageshack.us), and post the link here. I'll try to understand what's happening.

Also, I'm interested to know the name of the movie you are encoding. Perhaps I can try it here...

Thank you, the screenshots are:

2d
https://i.ibb.co/dBP8yvK/2d.jpg (https://ibb.co/dBP8yvK)

SBS
https://i.ibb.co/Kb8X848/sbs.jpg (https://ibb.co/Kb8X848)

TAB
https://i.ibb.co/PWznLKh/tab.jpg (https://ibb.co/PWznLKh)

If I set in mkvtoolnix the aspect ratio of 16:9 extra black bars dissapear but 3D doesn't work.

The movie is Batman vs Superman dawn of justice

Could be that i'm playing it in a 1080p resolution?

r0lZ
26th March 2019, 12:50
I did that movie without problem. Is it the first time you use BD3D2MK3D ? Have you changed its settings recently ?

The original image you have posted is correct (although it doesn't have the usual 1080p resolution, but I guess it's due to the file sharing service).
The SBS and TAB images are strange indeed. It seems that they have been calculated in Full-SBS and Full-TAB, as the resolution is not divided by 2 vertically or horizontally. So, verify in the last tab if you have unticked the "Half" option. Normally, it should be ticked. And verify also that the "Resize video to 720p" option is NOT ticked. The last thing that could be responsible of the problem (although I don't think so) is the "Move cinemascope image up in 16:9 frame". It should be disabled. If one of these parameters were not set at their default values, please retry.

I should be able to understand what's wrong if you post here the content of the avisynth script __ENCODE_3D_MOVIE.avs.

albur
26th March 2019, 19:48
I did that movie without problem. Is it the first time you use BD3D2MK3D ? Have you changed its settings recently ?

The original image you have posted is correct (although it doesn't have the usual 1080p resolution, but I guess it's due to the file sharing service).
The SBS and TAB images are strange indeed. It seems that they have been calculated in Full-SBS and Full-TAB, as the resolution is not divided by 2 vertically or horizontally. So, verify in the last tab if you have unticked the "Half" option. Normally, it should be ticked. And verify also that the "Resize video to 720p" option is NOT ticked. The last thing that could be responsible of the problem (although I don't think so) is the "Move cinemascope image up in 16:9 frame". It should be disabled. If one of these parameters were not set at their default values, please retry.

I should be able to understand what's wrong if you post here the content of the avisynth script __ENCODE_3D_MOVIE.avs.


Second time i use it, same with Gods of Egypt.

Here is the log, thanks


# Avisynth script generated Sat Mar 23 00:17:22 CET 2019 by BD3D2MK3D v1.8
# to convert "G:\BDMV\PLAYLIST\00098.mpls"
# (referencing the M2TS/SSIF files 00052)
# to 3D Top & Bottom.
# Movie title: hjkgikuhgkj
#
# Source MPLS information: Blu-ray 3D.
# MPLS file: 00098.mpls
# Video : Und AVC, 1080p, 23.976 fps, left-eye
# Video : Und MVC, 1080p, 23.976 fps, right-eye (32 3D-Planes)
# Audio : Eng TrueHD, Multi-channel, 48 Khz
# Audio : Eng AC3, Multi-channel, 48 Khz
# Audio : Ita AC3, Multi-channel, 48 Khz
# Audio : Spa AC3, Multi-channel, 48 Khz
# Subtitle: Eng PGS, 3D-plane: 2
# Subtitle: Ita PGS, 3D-plane: 3
# Subtitle: Spa PGS, 3D-plane: 4
# Subtitle: Ara PGS, 3D-plane: 5
# Subtitle: Bul PGS, 3D-plane: 6
# Subtitle: Ell PGS, 3D-plane: 7
# Subtitle: Heb PGS, 3D-plane: 8
# Subtitle: Ron PGS, 3D-plane: 9
# Subtitle: Ita PGS, 3D-plane: 10
# Subtitle: Spa PGS, 3D-plane: 11
LoadPlugin("C:\Users\PC01\Desktop\BD3D2MK3D\BD3D2MK3D\toolset\FRIMSource.dll")
#LoadPlugin("C:\Users\PC01\Desktop\BD3D2MK3D\BD3D2MK3D\toolset\DGMVCDecode.dll")

##LoadPlugin(C:\Users\PC01\Desktop\BD3D2MK3D\BD3D2MK3D\toolset\VSFilter.dll")
#LoadPlugin("C:\Users\PC01\Desktop\BD3D2MK3D\BD3D2MK3D\toolset\SupTitle.dll")

# Load the two video streams (218209 frames per stream)
interleaved = FRIMSource("mvc", "00098.track_4113.264", "00098.track_4114.mvc", layout = "alt", num_frames = 218209, cache = 2, platform = "")
#interleaved = DGMVCSource("00098.track_4113.264", "00098.track_4114.mvc", view = 0, frames = 218209, mode = "auto") # Old syntax for mode: hw = 0
# Current base view: left eye.
# The views are in the common order: AVC stream = left view, MVC stream = right view.
left = SelectEven(interleaved)
right = SelectOdd(interleaved)

# Hardcode subtitles
##left = VobSub(left, "subtitle_to_hardcode_left.sub")
##right = VobSub(right, "subtitle_to_hardcode_right.sub")
#left = SupTitle(left, "subtitle_to_hardcode_left.sup")
#right = SupTitle(right, "subtitle_to_hardcode_right.sup")

# Build Top & Bottom stream
StackVertical(Left, Right)
AssumeFPS("ntsc_film")

# Return the 3D clip.
Return(last)#.Info()

r0lZ
26th March 2019, 20:46
OK, obviously, the "Half" option is not ticked, as the StackVertical command doesn't have the VerticalReduceBy2 command. Anyway, even with the Half option disabled, there is a problem. I will try to reproduce it here, and if it appears that it's caused by a bug in BD3D2MK3D, I'll release rapidly a new version.

In the meantime, try to remove the layout = "alt" argument (in red below) from the FRIMSource command. That option has been introduced recently, and may be the cause of the problem.
interleaved = FRIMSource("mvc", "00098.track_4113.264", "00098.track_4114.mvc", layout = "alt", num_frames = 218209, cache = 2, platform = "")

If that doesn't work, restart the whole project, this time in Half-SBS or Half-TAB mode. I'm pretty sure that that will work.

r0lZ
26th March 2019, 21:54
OK, I did some Full-TAB tests and everything works as expected, at least here.

But I've also played with the settings of the players, and I have managed to get something identical to what you have shown in your TAB screenshot above. So, now, I suspect that your player doesn't have the correct settings to play 3D movies with the correct aspect ratio.

What player do you use ? Have you tried to play the movie with a 3D TV ?

Anyway, try to change the aspect ratio settings of your player. It should be possible to display the movie correctly, in 2D or 3D.

Also, can you open the movie in a good player, and ask for information about the video stream. With MPC, just select the Properties menu item. You should see something like this:
Video: MPEG4 Video (H264) 1920x2160 (16:9) 23.976fps [...]
With PotPlayer, select the Playback/System Info option, and look for the width and height fields in the File Info tab:
Width : 1 920 pixels
Height : 2 160 pixels
Note the resolution (in red). It's the correct resolution for Full-TAB. If you have the same resolution, that means almost certainly that the video is correct, and you have just to either change the aspect ratio and/or 3D settings of your player, or use a better player. (Personally, I recommend PotPlayer.)

Let me know if you need some help to configure your player.
Good luck!

albur
26th March 2019, 23:06
OK, I did some Full-TAB tests and everything works as expected, at least here.

But I've also played with the settings of the players, and I have managed to get something identical to what you have shown in your TAB screenshot above. So, now, I suspect that your player doesn't have the correct settings to play 3D movies with the correct aspect ratio.

What player do you use ? Have you tried to play the movie with a 3D TV ?

Anyway, try to change the aspect ratio settings of your player. It should be possible to display the movie correctly, in 2D or 3D.

Also, can you open the movie in a good player, and ask for information about the video stream. With MPC, just select the Properties menu item. You should see something like this:
Video: MPEG4 Video (H264) 1920x2160 (16:9) 23.976fps [...]
With PotPlayer, select the Playback/System Info option, and look for the width and height fields in the File Info tab:
Width : 1 920 pixels
Height : 2 160 pixels
Note the resolution (in red). It's the correct resolution for Full-TAB. If you have the same resolution, that means almost certainly that the video is correct, and you have just to either change the aspect ratio and/or 3D settings of your player, or use a better player. (Personally, I recommend PotPlayer.)

Let me know if you need some help to configure your player.
Good luck!

Thank you, i've tried in MPC-HC, VLC, PowerDVD and Kodi 18 Player, in everyone i get the same except PowerDVD that only shows 2D, i don't really know why.

I will pot player a try, could be that i have a 1080p Resolution and it cant show the image (2160p) keeping the aspect ratio?

r0lZ
26th March 2019, 23:38
I will pot player a try, could be that i have a 1080p Resolution and it cant show the image (2160p) keeping the aspect ratio?I don't think it's the problem. If the player can load the file and has enough RAM for its buffers, it should be able to display it with the right aspect ratio.

Note also that AFAIK MPC is not able to play 3D-video files. It's certainly not the right player to test your encodings. Pot Player can, but it is relatively difficult to configure. I don't use VLC, PowerDVD and Kodi, so I can't help to configure them.

BTW, there are also some settings related to the aspect ratio in BD3D2MK3D. It seems that the required aspect ratio when encoding in Full-SBS or Full-TAB is not always necessarily coherent for some TVs (notably LG). That problem is not present when you encode in Half-SBS or Half-TAB, but since you prefer the hard way, you may want to experiment with these settings too, although the software players are normally powerful enough to let the user change the aspect ratio manually.

albur
26th March 2019, 23:43
I don't think it's the problem. If the player can load the file and has enough RAM for its buffers, it should be able to display it with the right aspect ratio.

BTW, there are also some settings related to the aspect ratio in BD3D2MK3D. It seems that the required aspect ratio when encoding in Full-SBS or Full-TAB is not always necessarily coherent for some TVs (notably LG). That problem is not present when you encode in Half-SBS or Half-TAB, but since you prefer the hard way, you may want to experiment with these settings too, although the software players are normally powerful enough to let the user change the aspect ratio manually.


With potplayer by default it doesn't work, but in this one if i chage the ratio in the player to 16:9 it works. I will try in the projector.

Thx

konikpolny
26th March 2019, 23:49
r0lZ,
Regarding the Flat 3D problem, many thanks for your suggestions.
First, the machine in question is AMD, so not the intel issue. Second, my original Avisynth script was using FRIMSource as the decoder.
Now, the tests you suggested:
The results for FRIMSource with platform = "sw" are exactly the same as before.
However, the change to DGMVCSource decoder did fix the problem.
Note that as with FRIMSource the change in the mode between "auto" and "sw" did not make any difference.
Below the 4 configurations and results with DGMVCSource:
1a)
left = SelectEven(interleaved)
right = SelectOdd(interleaved)
StackHorizontal(Left, Right)
= inverted 3D

1b)
left = SelectEven(interleaved)
right = SelectOdd(interleaved)
StackHorizontal(Right, Left)
= correct 3D!

2a)
right = SelectEven(interleaved)
left = SelectOdd(interleaved)
StackHorizontal(Right, Left)
= inverted 3D

2b)
right = SelectEven(interleaved)
left = SelectOdd(interleaved)
StackHorizontal(Left, Right)
= correct 3D!

I recently had 3 of such BD3Ds, all animated titles: the Boss Baby, Shrek the Third, Epic.
Now I know it, I will look at each avisynth script before encoding but it would be good BD3D2MK3D pop up the message, or even change the script accordingly.
Many thanks again :thanks:

r0lZ
27th March 2019, 09:40
With potplayer by default it doesn't work, but in this one if i chage the ratio in the player to 16:9 it works. I will try in the projector.

ThxThat means at least that there are no black borders. What you have seen are borders around the picture, added by the player when you play the movie full-screen.

End of story. :-)

r0lZ
27th March 2019, 10:00
r0lZ,
Regarding the Flat 3D problem, many thanks for your suggestions.
First, the machine in question is AMD, so not the intel issue. Second, my original Avisynth script was using FRIMSource as the decoder.
Now, the tests you suggested:
The results for FRIMSource with platform = "sw" are exactly the same as before.
Note that as with FRIMSource the change in the mode between "auto" and "sw" did not make any difference.If you don't have a CPU compatible with the hardware acceleration, "auto" uses the software mode, and it is therefore exactly equivalent to "sw". And don't try to force "hw", as the script will crash. It's normal. Anyway, the hardware mode is not terribly efficient. Just a little bit faster, but it has also a lot of problems, due to the bugs in the Intel libraries. Personally, I'm happy with the software mode.


However, the change to DGMVCSource decoder did fix the problem. Good to know. Unfortunately, none of these decoders is perfect. I have already changed the default decoder (currently FRIMSource), but perhaps I will have to change it again. :-(

Below the 4 configurations and results with DGMVCSource:

[...]

2b)
right = SelectEven(interleaved)
left = SelectOdd(interleaved)
StackHorizontal(Left, Right)
= correct 3D!

I recently had 3 of such BD3Ds, all animated titles: the Boss Baby, Shrek the Third, Epic.
Now I know it, I will look at each avisynth script before encoding but it would be good BD3D2MK3D pop up the message, or even change the script accordingly.
Many thanks again :thanks:
The 2b script is the one that has been created by BD3D2MK3D, right? So, without the FRIMSource bug, BD3D2MK3D does its work correctly, right ? So, IMO, there is nothing to change in BD3D2MK3D. And I don't understand what you suggest. What message should I show ? Except explaining that in case of bug, it might be useful to try the other decoder, I can't do much more.

Of course, I will contact VideoFan3D, the author of FRIM, in the hope that he will be able to fix the bug. [EDIT] Done. See here (https://forum.doom9.org/showthread.php?p=1870049#post1870049).

konikpolny
27th March 2019, 11:07
The 2b script is the one that has been created by BD3D2MK3D, right? So, without the FRIMSource bug, BD3D2MK3D does its work correctly, right ? So, IMO, there is nothing to change in BD3D2MK3D. And I don't understand what you suggest. What message should I show ? Except explaining that in case of bug, it might be useful to try the other decoder, I can't do much more.


Yes, the 2b script is the one BD3D2MK3D created. I agree we can wait to see what the FRIM's author says and possibly for the bug to be fixed.

albur
27th March 2019, 11:18
That means at least that there are no black borders. What you have seen are borders around the picture, added by the player when you play the movie full-screen.

End of story. :-)

Thank you, ok at least it can be played changing aspec ratio, i will dig into the muxing. When i show info into potplayer it shows:

1920x2160 (1:1.13/1:1.13)

And in mph-hc
Width : 1 920 pixels
Height : 2 160 pixels
Display aspect ratio : 0.889

r0lZ
27th March 2019, 15:00
However this setting for me output identical 2 views - there is no 3D, the left and right views have exactly the same image/frame.
I did some tests here, and indeed, I can confirm that FRIM bug. It happens only when the two views are in the unusual order (AVC base view = right eye, MVC dependent view = left eye).

Note that you don't have to examine the AVS script to see the order of the views. In the first tab of BD3D2MK3D, you can see what eye is associated with the AVC and MVC streams. And anyway, currently, I suggest to select DGMVCSource anyway.

And I understand now what you have suggested. I could add a warning when FRIM is defined as the MVC decoder and the two views are inverted. However, I would prefer a fix from Videofan3D...

Thanks for having discovered and reported this important bug !

r0lZ
27th March 2019, 15:08
Thank you, ok at least it can be played changing aspec ratio, i will dig into the muxing. When i show info into potplayer it shows:

1920x2160 (1:1.13/1:1.13)

And in mph-hc
Width : 1 920 pixels
Height : 2 160 pixels
Display aspect ratio : 0.889

The sample aspect ratio is normally 1:1 for a 2D BD and the display aspect ratio must be 16:9. But things are more complicated for the 3D SBS or T&B movies, as there are two images stacked together. The question is therefore: should I specify the AR for a single image, or for the two at the same time ? It seems that the answer depends of the TV used to play the movie, hence the difficulty. It's why it's a setting in BD3D2MK3D.

However, when you play the movie on a PC with a software player, the aspect ratio on fhe MKV file can easily be overwritten by the user. That means that you can play the movie without problem with any good 3D player, regardless of the AR in the file. But if you want to play it on a TV, be sure to test what you really need before you encode your entire collection of 3D BDs!

konikpolny
27th March 2019, 23:13
Note that you don't have to examine the AVS script to see the order of the views. In the first tab of BD3D2MK3D, you can see what eye is associated with the AVC and MVC streams. And anyway, currently, I suggest to select DGMVCSource anyway.

Indeed I can :)
Thanks for the info

r0lZ
31st March 2019, 08:59
Videofan3D will fix the FRIMSource bug with the inverted views soon (https://forum.doom9.org/showthread.php?p=1870434#post1870434). When the update will be available, I'll release a new version of BD3D2MK3D...

r0lZ
8th April 2019, 15:28
OK, Videofan3D has released a new beta with a fixed FrimSource. He wants to integrate the new Intel libraries before releasing it officially, but I have tested the 32-bit DLL and it works as expected. So, if you want to test it too, or if you prefer FrimSource rather than DGMvcSource, you can download the package (https://forum.doom9.org/showthread.php?p=1871006#post1871006), extract FRIMSource32.dll, rename it FRIMSource.dll, and overwrite the original DLL in the BD3D2MK3D's toolset folder.

I will release the new version of BD3D2MK3D when the final version of FRIMSource will be available...

albur
10th April 2019, 10:13
The sample aspect ratio is normally 1:1 for a 2D BD and the display aspect ratio must be 16:9. But things are more complicated for the 3D SBS or T&B movies, as there are two images stacked together. The question is therefore: should I specify the AR for a single image, or for the two at the same time ? It seems that the answer depends of the TV used to play the movie, hence the difficulty. It's why it's a setting in BD3D2MK3D.

However, when you play the movie on a PC with a software player, the aspect ratio on fhe MKV file can easily be overwritten by the user. That means that you can play the movie without problem with any good 3D player, regardless of the AR in the file. But if you want to play it on a TV, be sure to test what you really need before you encode your entire collection of 3D BDs!

Ok, i've found my issue, the result file is 3840x1080p, players doesn't deal fine with it, that's why height is half of it's size. Changing it to 3840x2160p in mkvmerge works fine in all players. But... if i play this in a 1080p screen i'm getting the same that if i play in half sbs?

r0lZ
5th May 2019, 10:36
The official release of the new version of FRIMSource is not available yet, but I have decided to release this version (with the bugfix test release of FRIMSource) because I think that it is important to fix the bug of the bad views occurring with the BD with the inverted views (right view first) as soon as possible. So, here is v1.9.

It fixes also a few other minor bugs, and as usual, I have updated the third-party exe files.

v1.9 (May 5, 2019)
- Workaround for the libDcaDec error when converting audio from DTS-HD/MA due to a change in numbers of channels. (Fix for Incredibles 2)
- When available, the alias of the Power Plans set before and restored after the encoding is now used instead of the GUID. Thanks Frank!
- Little bugs fixed
- Updated the FRIMSource MVC decoder to the bugfix version 1.29_20190406. Thanks konikpolny!
- Updated x264 to the latest version (0.157.2969)
- Updated x265 to the latest version (3.0_Au+18)
- Updated Mkvtoolnix to the latest version (33.1.0 'Primrose')

Download: BD3D2MK3D.7z (http://download.videohelp.com/r0lZ/BD3D2AVS/BD3D2MK3D.7z)

Spaded21
7th May 2019, 04:09
This software is great and I find the SBS mkv files to be much better than the actual disc. There is no blur when watching the SBS files. I have converted 16 movies so far and almost all came out great. However there are 2 movies, Life of Pi and Edge of Tomorrow, that have no offset between the 2 halves. When I put the glasses on, it's combines the images, but it's only 2D. I ran Life of Pi through twice just to see if it was a bad conversion or something, but the results are the same. Has anyone had this issue before?

In any case, thank you r0lZ for this great software. I can finally import my 3D library into Plex and even add the Atmos tracks when available.

konikpolny
7th May 2019, 11:57
Hi Spaded21,
regarding your encodes resulting in 2D, check your __ENCODE_3D_MOVIE.avs file if the views are inverted:

# Current base view: right eye!
# The views are inverted: AVC stream = right view, MVC stream = left view.
right = SelectEven(interleaved)
left = SelectOdd(interleaved)

if that's the case it's probably the bug with FRIMSource MVC decoder to blame. I suggest downloading the latest version of BD3D2MK3D as it's got a newer version of this 3rd party library and have another go.

You can also read more about the bug quite recently reported
here (http://forum.doom9.org/showthread.php?p=1869965#post1869965) and here (http://forum.doom9.org/showthread.php?p=1870025#post1870025)

Spaded21
7th May 2019, 17:40
Hi Spaded21,
regarding your encodes resulting in 2D, check your __ENCODE_3D_MOVIE.avs file if the views are inverted:

# Current base view: right eye!
# The views are inverted: AVC stream = right view, MVC stream = left view.
right = SelectEven(interleaved)
left = SelectOdd(interleaved)

if that's the case it's probably the bug with FRIMSource MVC decoder to blame. I suggest downloading the latest version of BD3D2MK3D as it's got a newer version of this 3rd party library and have another go.

You can also read more about the bug quite recently reported
here (http://forum.doom9.org/showthread.php?p=1869965#post1869965) and here (http://forum.doom9.org/showthread.php?p=1870025#post1870025)

I just tried with the new version and this is what's in the .avs file


# Current base view: right eye!
# The views are inverted: AVC stream = right view, MVC stream = left view.
right = SelectEven(interleaved)
left = SelectOdd(interleaved)

# Build Side-by-Side stream
StackHorizontal(HorizontalReduceBy2(Left), HorizontalReduceBy2(Right))
AssumeFPS("ntsc_film")

Does that mean it's still incorrect?

I registered for this forum a week or so ago and had to wait at least 5 days to post. I guess I should have caught up on the thread before asking my question. Thanks again.

konikpolny
7th May 2019, 22:29
Does that mean it's still incorrect?


It's OK, provided you use the latest BD3D2MK3D version. The old version would not work with the inverted views as the FRIMSource MVC decoder used in the previous BD3D2MK3D version was buggy. With the old version 1.8 you could still use the alternative MVC decoder DGMVCSource. You can read about this solution in the recent posts (links in my previous post).

r0lZ has recently posted this new version with an updated FRIMSource MVC decoder.

Spaded21
7th May 2019, 23:59
It's OK, provided you use the latest BD3D2MK3D version. The old version would not work with the inverted views as the FRIMSource MVC decoder used in the previous BD3D2MK3D version was buggy. With the old version 1.8 you could still use the alternative MVC decoder DGMVCSource. You can read about this solution in the recent posts (links in my previous post).

r0lZ has recently posted this new version with an updated FRIMSource MVC decoder.

Thanks again for your help. I did read through them but some of it was over my head. It's starting to make sense to me though.

Edit: Just want to confirm it's working for me now. Life of Pi looks amazing in 3D!

Spaded21
9th May 2019, 15:57
I have another question. Currently, some movies require me to use the 3D sync invert option on my projector and some do not. I would prefer not to have to use it at all. Is there a setting I can change to prevent this? And is this something I can only do prior to encoding?

konikpolny
9th May 2019, 20:30
And is this something I can only do prior to encoding?
Yes this is the setting I mentioned earlier in the __ENCODE_3D_MOVIE.avs file with the inverted views.
This is something that can only be set before the encoding starts. BD3D2MK3D however recognises such inverted stream views and swaps them to get the proper left base view when it creates the project, so you should always be OK with BD3D2MK3D.

The bug in the FRIMSource MVC decoder was causing problems here resulting in flat 3D movie for movies with inverted views which BD3D2MK3D tried to correct.
Normally if you swap the views there you get the inverted 3D effect.

konikpolny
15th May 2019, 14:32
r0lZ,
When I convert SRT 2D to ASS 3D with the 2D guide file temp_2D.xml (grabbed from the project's png subs directory) vertical placement is made correctly according to the guide but for the horizontal positioning none of the subs is correctly taken from the guide. THis is something I observed a long time ago but didn't have time to let you know.
Could you please have a look at this when you have time.

Also, I think someone already asked a similar request in the past - It would be really great if there was a choice to select whether we want both horizontal and vertical guides to be used or selectively horizontal or vertical only.

What I really care about is some adjustment to the vertical placement. This could be done by forcing the manual "Bottom margin" setting, or some additional adjustment option which would be added to the guide's vertical value. Ideally having both of these options available would be useful, but forcing the "Bottom margin" setting seems more important.
The reason why I am asking for this is that, whenever I can, I place my subtitles some way down half below the bottom edge of the video to get the subtitles out of the picture as much as possible, but at the same time still making them easy for the eyes to read.

Is that something that you could do in future?

dejoro
22nd May 2019, 06:46
Hello everyone,

I discovered this forum finally, such a forum that I had been looking for quite some time.

I converted a 3D Bluray 3D MVC with Makemkv and from there I enter it directly into BD3D2MK3D to create a 3D SBS Full HD of 3840x1080p but I can not read it. This is the first time I use BD3D2MK3D.

Reading it with MPC-HC I get a stretched tape genre 2.40 while my film is in original 16/9. I have 3D but the format is wrong.

So my question, is there a specific player to read this file from BD3D2MK3D or any player, MPC-HC, VLC or Potplayer can read it? Or changes in the settings to make?

I have a passive 3D system with 2 Epson Full HD projectors, a Geobox G-303, Omega filters in the projectors and Omega glasses.

I can not find a tutorial to use BD3D2MK3D correctly because given the number of parameters to enter, I am lost.

Could you put me on the trail of a tutorial?

Thanks for your help. Excuse me for my english translated with Google Translator.

Denis

konikpolny
22nd May 2019, 10:53
Hi dejoro,


Reading it with MPC-HC I get a stretched tape genre 2.40 while my film is in original 16/9. I have 3D but the format is wrong.


When you play your 3D Full-SBS movie in MPC-HC on your PC before you display it on your projector, are your left and right images squeezed vertically/horizontally being distorted or do they have proper dimensions side-by-side full frame pictures but just smaller to fit in screen?

So my question, is there a specific player to read this file from BD3D2MK3D or any player, MPC-HC, VLC or Potplayer can read it? Or changes in the settings to make?
All the 3 can play 3D Full-SBS for your projector with appropriate settings made in the player

r0lZ
14th June 2019, 13:59
Sorry for replying so late. For whatever reason, I have not been noticed of the new posts in this forum. Luckily, konikpolny has replied to most questions, and I have just to add that I agree totally with what he wrote.

Thanks Spaded21 for your positive feedback. Much appreciated ! And welcome to the Doom 9 forums.

Yes, the last version fixes the problem of the flat 3D when converting a movie with the inverted views with the FRIM decoder. The bug is fixed in the new FRIM decoder, and has never been present with the DGMVCSource decoder. So, just be sure to use the latest version, with whatever decoder you prefer.

I have another question. Currently, some movies require me to use the 3D sync invert option on my projector and some do not. I would prefer not to have to use it at all. Is there a setting I can change to prevent this? And is this something I can only do prior to encoding?
As explained by konikpolny, BD3D2MK3D is smart enough to encode the movie with always the left view first, regardless of the order of the views in the original BD. Of course, if the info about the orders of the views in the BD is wrong, BD3D2MK3D will fail too, but AFAIK that case has happened only once, with an obscure Chinese movie.
So, I guess that you have to swap the views manually only when you play some original BDs (and that means that your equipment ignores the "left view first" flag, not a good point!), or you have played MKV files not created by BD3D2MK3D, or downloaded from YouTube or other sources. Currently, all movies converted with BD3D2MK3D should never need to manually invert the views. Again, konikpolny was right.

r0lZ
14th June 2019, 14:25
r0lZ,
When I convert SRT 2D to ASS 3D with the 2D guide file temp_2D.xml (grabbed from the project's png subs directory) vertical placement is made correctly according to the guide but for the horizontal positioning none of the subs is correctly taken from the guide. THis is something I observed a long time ago but didn't have time to let you know.
Could you please have a look at this when you have time.
Sure, but I wonder if the problem is not just due to the difference with the single and double-line subtitles. If the subtitle is on a single line in the guide and split on 2 lines in the SRT, the result will be a bit too low, because it will be globally centered around the centre of the guide's subtitle, and not above its baseline. The opposite gives of course the opposite effect. Of course, I can't fix that easily, because BD3D2MK3D knows only the "bounding box" of the subtitle of the guide, and not the position of its baseline. Furthermore, even with 2 subtitles sharing the same number of lines, the placement is not always perfect, because the font size may be different, and the subtitles may contain some letters with "extensions" above or below the normal letters, and the other subtitle not. This causes some little Y displacements, difficult to avoid completely.

I agree that a solution could be an option to force the Y position, and to grab the X position from the guide only. That cannot be forced anyway, as many subtitles are placed on screen at different heights (like in Avatar) to avoid entering in the objects of the foreground. Some other examples use subtitles always at the same Y position, except for some of them, that are placed above the image (in the sky). It's also something that must be handled.

Also, I think someone already asked a similar request in the past - It would be really great if there was a choice to select whether we want both horizontal and vertical guides to be used or selectively horizontal or vertical only.
I agree and I'll try to do it.

What I really care about is some adjustment to the vertical placement. This could be done by forcing the manual "Bottom margin" setting, or some additional adjustment option which would be added to the guide's vertical value. Ideally having both of these options available would be useful, but forcing the "Bottom margin" setting seems more important.
The reason why I am asking for this is that, whenever I can, I place my subtitles some way down half below the bottom edge of the video to get the subtitles out of the picture as much as possible, but at the same time still making them easy for the eyes to read.
I see, but what you do is dangerous. Often, the subtitle's depth is computed so that it appears just above the ground. If you place it below its normal position, chances are that it will enter in the ground. So, IMO, you should first analyse the guide, and force the Y position of all subtitles only if the analyse deduces that all subtitles are placed approximately at the same Y position, and to avoid problems, you should use that position, and not force them below (or above) that position.

Is that something that you could do in future?
I will have to analyse the problem of the wrong placement. If you have good examples of the first problem you have reported, please send me the guide (XML file only) and the SRT, and the number of one or two misplaced subtitles. It will be easier for me to fixd the bug, if any.

I can also add an option to "freeze" the X position on the center of the screen, and another to force the Y position to either the average Y position of the subtitles of the guide, or another Y position specified by the user. Perhaps also with an option to ignore that setting for all subtitles appearing in the upper half of the screen.

However, I'm going in holidays this weekend for 4 weeks, so don't expect that soon.

r0lZ
14th June 2019, 14:40
Hello everyone,

I discovered this forum finally, such a forum that I had been looking for quite some time.

I converted a 3D Bluray 3D MVC with Makemkv and from there I enter it directly into BD3D2MK3D to create a 3D SBS Full HD of 3840x1080p but I can not read it. This is the first time I use BD3D2MK3D.

Reading it with MPC-HC I get a stretched tape genre 2.40 while my film is in original 16/9. I have 3D but the format is wrong.

So my question, is there a specific player to read this file from BD3D2MK3D or any player, MPC-HC, VLC or Potplayer can read it? Or changes in the settings to make?

I have a passive 3D system with 2 Epson Full HD projectors, a Geobox G-303, Omega filters in the projectors and Omega glasses.

I can not find a tutorial to use BD3D2MK3D correctly because given the number of parameters to enter, I am lost.

Could you put me on the trail of a tutorial?

Thanks for your help. Excuse me for my english translated with Google Translator.

Denis
Welcome to the Doom 9 forums, dejoro !

You can probably use a player that can force the aspect ratio of the movie (like PotPlayer), but IMO it's not the right solution.

The problem with the SBS and TAB 3D movies is that the aspect ratio must be specified either for the whole image (with the 2 views), or for a single view (after the division to 2 equal views, and the required resize). It seems that it's not a problem with Half-SBS and Half-TAB, but for Full-SBS or Full-TAB, the de-facto standard is not well established. So, the right aspect ratio to include in the file depends of your 3D equipment. Furthermore, two different aspect ratios must be specified, one in the video stream, and one in the MKV header. Since I can't know in advance on what equipment the final MKV will be played, it is your responsibility to provide the right aspect ratios.

See the menu Settings -> Full-SBS/T&B aspect ratio. Change the two settings one at a time, and try to encode a short clip, to determine what combination works best with your equipment or software player. It's a pity, but I cannot help you more.

Note also that Full-SBS is a non-standard format. If you want to avoid most problems (with the aspect ratios or the 3D subtitles for example), I recommend to encode in Half-SBS. The price to pay is of course the half-resolution, but it's much more simple, and you will probably never have bad surprises, especially when you buy a new TV or video player.

albesp77
26th June 2019, 09:31
just a stupid question, if i generate a full sbs or full ou video files (instead of half ones) to see them on a fullhd tv that not support natively this format (works good on half files) which kind of external player i need ?

konikpolny
26th June 2019, 15:53
just a stupid question, if i generate a full sbs or full ou video files (instead of half ones) to see them on a fullhd tv that not support natively this format (works good on half files) which kind of external player i need ?

any player on PC will do: MPC-HC, VLC or Potplayer. For full-SBS / OU you just need to change video Aspect Ratio to 16:9

donpoku
30th June 2019, 22:15
Hi guys, I'm trying to MUX 3d ISO to m2ts, I keep getting this using BD3 work my laptop, I read here it could be a sleep mode problem but I have changed my battery settings to never sleep.
Here's the CMD report

Encoding movie in 3D
Movie: Captain Marvel (2019)
Encoding started 23/06/2019 18:12:18.93

C:\Users\.....\Documents\Captain Marvel (2019)\MKV3D>"D:\S\New folder\Recovered data 10-06 06_45_31\Deep Scan result\More Lost Files(RAW)\Rich Text Document\BD3D2MK3D (2)\BD3D2MK3D\toolset\x264_x86.exe" --output-depth 8 --crf 23 --preset medium --sar 2:1 --range tv --colormatrix bt709 --frame-packing 4 --qpfile chapters_3D.qpfile --frames 177957 --fps 24000/1001 --output "MKV3D_3D.264" "__ENCODE_3D_MOVIE.avs"
avs [error]: ERROR: Cannot initiate Intel Media Decoder.

(__ENCODE_3D_MOVIE.avs, line 20)
x264 [error]: could not open input file `__ENCODE_3D_MOVIE.avs'
Encoding finished 23/06/2019 18:12:19.44

C:\Users\....\Documents\Captain Marvel (2019)\MKV3D>"D:\S\New folder\Recovered data 10-06 06_45_31\Deep Scan result\More Lost Files(RAW)\Rich Text Document\BD3D2MK3D (2)\BD3D2MK3D\toolset\mkvmerge.exe" @__MUX_3D_OPTIONS.json | "D:\S\New folder\Recovered data 10-06 06_45_31\Deep Scan result\More Lost Files(RAW)\Rich Text Document\BD3D2MK3D (2)\BD3D2MK3D\toolset\tee.exe" "MKV3D_3D.mkvmerge.log"
mkvmerge v33.1.0 ('Primrose') 32-bit
Error: The type of file 'MKV3D_3D.264' could not be recognized.

supa2001
3rd July 2019, 17:45
I have some interesting information to share after I tried a lot of different formats with my android TV. I wanted to use a native android app (in my case Movian) to play 3D content on the tv and since no external HDMI-connected-player is involved I cannot use the HDMI 1.4+ 1920x2205 frame-packing format. I had to chose from one of the HALF SBS/TAB formats, because I had some weird issues with the FULL SBS/TAB.

Anyway, my TV is Sony Bravia 4k 2015 (KD-55S8505C) with active 3D, running Android TV 7 and it supports H264/AVC Level 5.2 3840x2160 so I decided to encode 4K SBS :) which is 1920x2160 for each eye (vertically stretching each frame). During playback the TV stretches each frame to 3840x2160 (or shrinks it to 1920x1080) and this gives me back two full 1920x1080p frames in 3D. It is kind of a hybrid version of Half/Full SBS/TAB. :)


Anyone else able to do this on a Sony 3D TV?
I tried it, but my Sony Z9D won't play 3D for any film that has resolution greater than 1080p.
Sony's site says it also "An Android TV that supports 3D format
If you have a 4K TV, a 3D signal won't display if the TV receives a 4K signal."
https://www.sony.com/electronics/support/articles/00172421

Any idea how to get around this limitation?

konikpolny
15th July 2019, 11:35
Hi r0lZ,
I hope you had great holidays!

Regarding the X positioning from the guide problem:
Sure, but I wonder if the problem is not just due to the difference with the single and double-line subtitles.
By horizontal I mean X placement. The double/single lines difference does not apply here as it would only affect the Y plane, which works fine for me. What you are describing here is possible minor differences but for Y axis.
I also do the subtitles OCR myself. They have original number of lines and lines length.
I did check it carefully - selected subtitles position on original BD3D movie, the temp_2D.xml guide, and also studying the subtitles placement through your tool SRT 2D to ASS 3D > Analyse the subtitle Guide > BDSup2Sub. The latter clearly confirms the original BD guides have the correct position for the selected subtitles showing them at left / right sides rather than in the exact center X axis! And I don't mean here subtle differences they just come in the very center of X placement!


I see, but what you do is dangerous. Often, the subtitle's depth is computed so that it appears just above the ground. [...] So, IMO, you should first analyse the guide, and force the Y position of all subtitles only if the analyse deduces that all subtitles are placed approximately at the same Y position, and to avoid problems, you should use that position, and not force them below (or above) that position.
In extreme cases (which in my experience are rare) i can manually replace the lines in the subtitles with the ones with the original Y position. Also what you suggest for an option to ignore Y user custom position if sub lines are in the upper half would resolve most cases. I just don't like subtitles to be covering the video, pushing them slightly down works fine for me 90%. If the X guide worked it would be even better!


I can also add an option to "freeze" the X position on the center of the screen, and another to force the Y position to either the average Y position of the subtitles of the guide, or another Y position specified by the user. Perhaps also with an option to ignore that setting for all subtitles appearing in the upper half of the screen.
As i said earlier the Option to ignore forced user's Y placement setting if the subtitle appear in the upper half of the screen is a great idea indeed!

Locking X position in center in my opinion is not very useful as it would be more like not using guide at all - which is already an available option. But you can add it if you think having a user customised Y placement option implies doing the same for the X position.

Summing up the options for custom user Y positioning worth considering are:
- ignore guide completely and use user Y value (this is most important in my opinion)
- add/deduct user value to guide Y value
- average Y position

Please have a look at the XML guide and SRT attached;
some lines to look at:
#21:right,#25:left,#26:right,#39:right,#65:left,#77:left,#95:up center (OK),#126:right,#127:left,#128:right,#129:right,#130:right,#131:left,#138:left,#139:left,#664:left,#665:left,#666:left

donpoku
19th July 2019, 12:28
Hi guys, I'm trying to MUX 3d ISO to m2ts, I keep getting this using BD3 work my laptop, I read here it could be a sleep mode problem but I have changed my battery settings to never sleep.
Here's the CMD report

Encoding movie in 3D
Movie: Captain Marvel (2019)
Encoding started 23/06/2019 18:12:18.93

C:\Users\.....\Documents\Captain Marvel (2019)\MKV3D>"D:\S\New folder\Recovered data 10-06 06_45_31\Deep Scan result\More Lost Files(RAW)\Rich Text Document\BD3D2MK3D (2)\BD3D2MK3D\toolset\x264_x86.exe" --output-depth 8 --crf 23 --preset medium --sar 2:1 --range tv --colormatrix bt709 --frame-packing 4 --qpfile chapters_3D.qpfile --frames 177957 --fps 24000/1001 --output "MKV3D_3D.264" "__ENCODE_3D_MOVIE.avs"
avs [error]: ERROR: Cannot initiate Intel Media Decoder.

(__ENCODE_3D_MOVIE.avs, line 20)
x264 [error]: could not open input file `__ENCODE_3D_MOVIE.avs'
Encoding finished 23/06/2019 18:12:19.44

C:\Users\....\Documents\Captain Marvel (2019)\MKV3D>"D:\S\New folder\Recovered data 10-06 06_45_31\Deep Scan result\More Lost Files(RAW)\Rich Text Document\BD3D2MK3D (2)\BD3D2MK3D\toolset\mkvmerge.exe" @__MUX_3D_OPTIONS.json | "D:\S\New folder\Recovered data 10-06 06_45_31\Deep Scan result\More Lost Files(RAW)\Rich Text Document\BD3D2MK3D (2)\BD3D2MK3D\toolset\tee.exe" "MKV3D_3D.mkvmerge.log"
mkvmerge v33.1.0 ('Primrose') 32-bit
Error: The type of file 'MKV3D_3D.264' could not be recognized.

Is nobody able to help us, this is not what the community is about?

r0lZ
20th July 2019, 18:12
Sorry for replying so late. I was in holidays.

avs [error]: ERROR: Cannot initiate Intel Media Decoder.
This problem can be caused by several things, but normally, that means that you have an Intel CPU compatible with the hardware acceleration for the MVC decoding, but the Intel drivers do not work correctly. Try to update the Intel drivers, or re-install them. Then, launch __ENCODE_3D_LAUNCHER.cmd again.

If that doesn't work, try to set the Settings -> MVC Decoder -> Hardware Acceleration option to Disabled. This will use the Intel decoder provided with BD3D2MK3D, and normally it works correctly. Then re-generate the whole project. (Alternatively, you can also edit the platform argument of the FRIMSource line or the mode argument of the DGMVCSource line in the avisynth script __ENCODE_3D_MOVIE.avs, and replace "" or "auto" with "sw", as explained elsewhere in this thread. If you do that, you don't need to re-generate the project.)

And if there is still a problem, try to swap the decoder (Settings -> MVC Decoder: FRIMSource <-> DGMVCSource).

Good luck!

r0lZ
20th July 2019, 18:17
Hi r0lZ,
I hope you had great holidays!
Yes, fine, although very hot !

I will have a look at the subtitles placement problems, but I still need some time. I am currently seeking for a house to move in France, and I have to continue searching. So, don't expect a new version soon.

[EDIT] Just had a look, and it seems that indeed, the X position of all subs is always the center of the screen when the SRT is converted to ASS 3D with the Margins option. However, with the option "{\pos(x,y)} commands", it seems that the X placement is correct. Can you verify ?

konikpolny
21st July 2019, 11:44
Hi r0lZ,
Yes I confirm X placement in SRT 2 ASS conversion with the guide using {\pos(x,y)} works as expected! Thanks for this hint.
I am perfectly OK to wait for the SRT 2 ASS bug fix (X guide with margin method) and enhancements whatever time it takes to accomplish. Please take care and time to sort out all your private matters.

donpoku
23rd July 2019, 06:49
Sorry for replying so late. I was in holidays.


This problem can be caused by several things, but normally, that means that you have an Intel CPU compatible with the hardware acceleration for the MVC decoding, but the Intel drivers do not work correctly. Try to update the Intel drivers, or re-install them. Then, launch __ENCODE_3D_LAUNCHER.cmd again.

If that doesn't work, try to set the Settings -> MVC Decoder -> Hardware Acceleration option to Disabled. This will use the Intel decoder provided with BD3D2MK3D, and normally it works correctly. Then re-generate the whole project. (Alternatively, you can also edit the platform argument of the FRIMSource line or the mode argument of the DGMVCSource line in the avisynth script __ENCODE_3D_MOVIE.avs, and replace "" or "auto" with "sw", as explained elsewhere in this thread. If you do that, you don't need to re-generate the project.)

And if there is still a problem, try to swap the decoder (Settings -> MVC Decoder: FRIMSource <-> DGMVCSource).

Good luck!
Thanks the first option worked.

What is the best setting for 1:1 copy with no loss in quality,?

donpoku
23rd July 2019, 21:13
Hi yday I did one from 40gig disc to 7gb using this, surely there's a loss in quality? If so what's the best way to get like for like with no loss in quality?

Many thanks

TVI
23rd July 2019, 21:35
Dear r0lZ. First of all thank you for your program it's fantastic. I do have a question.

I use BD3D2MK3D to convert ripped 3D Blu-Rays to watch on the Ocolus Go and it works a treat. I'm not particularly tech-savvy...I download the ripped MKV and don't change any of the settings.

The files will vary in size and quality. For example -
Terminator 2 - 7.22GB - Great picture
Gravity - 3.72GB - decent picture
Bladerunner 2049 - 1.63GB - okay picture but more "screen door" effect

I just wondered if there was a simple reason why the files vary in size/quality?

Thanks.

tebasuna51
23rd July 2019, 23:19
I just wondered if there was a simple reason why the files vary in size/quality?

If you encode using CRF method you obtain the same quality always, but the size can vary because the images are more or less compressibles.

For instance Terminator 2 can have grain or noise and need more bitrate (size) than a modern movie Blade Runner 2049 (BTW 1.63 GB is very small, use a better CRF)

mi3gai4rui4
25th July 2019, 06:22
Hi,
I have a 4k OLED with a passive 3d filter that works with madVR set to "3D format: line alternative".

I'd like to convert from my 3d mvc file to an mkv file that is 3840x2160 in line alternative format so that I can play it on a player that doesn't know how to decode 3D at all and the TV will just play it like a regular 2160p file.

I tried following the directions below but I ended up with a 1920x1080 file.
Could anyone suggest how to get a 3840x2160 line alternative file?

Thanks!

@Shark: My PC doesn't have a 3D graphic card, so I suppose that options cannot be used. But thanks anyway.

@IanD:
I have modified the files of a short clip and I think I have something that should work. Can you test the modifications?
Use a short clip to begin (and, optionally, select the UltraFast x264 preset). Use T&B or SBS, that doesn't matter.
When the demux phase is finished, edit the following files.

_ENCODE_3D_MOVIE.avs:
You should replace the following lines:

left = SelectEven(interleaved)
right = SelectOdd(interleaved)

# Build combined Side-by-Side image
StackVertical(...) (or StackHorizontal)

with this:

left = SelectEven(interleaved).SeparateFields().SelectOdd()
right = SelectOdd(interleaved).SeparateFields().SelectEven()

# Build combined Row-interlaced image
Interleave(left, right).Weave()

The code above is for the left view in the top field. To place the right view in the top field, use this:

left = SelectEven(interleaved).SeparateFields().SelectEven()
right = SelectOdd(interleaved).SeparateFields().SelectOdd()

# Build combined Row-interlaced image
Interleave(right, left).Weave()

That should work, but I'm not sure. If you see inverted fields, experiment with the words in red above.

You should also modify _ENCODE.CMD and replace the option "--frame-packing 4" (or 3 for SBS) with "--frame-packing 2".

You should also edit the "3D Video stream" section of the _MUX_3D_OPTIONS.txt file, like this:

# 3D video stream

--track-name
0:3D Row interlaced (x264 CRF 22, preset ultrafast, level 4.1)
--stereo-mode
0:7
--aspect-ratio
0:16/9
--default-duration
0:24000/1001p
--default-track
0:yes
01000_mpls.264

The stereo mode 7 is for the left field on top. Use 6 for the right field on top.

When the edits are finished, encode normally, and watch the movie on your TV. Perhaps you'll see some flickering effects (especially with thin horizontal lines, or in the end credits). Please let me know if it's the case. It is perhaps possible to improve the image quality and avoid the flickering with a resize instead of the SeparateFields().SelectOdd/Even() code.

Let me know if it works fine. If your tests are conclusive, I may add that option in the next version...

r0lZ
25th July 2019, 08:42
Sorry again, for whatever reason, the forum do not send me the notifications for the new posts any more, hence my late replies.Hi yday I did one from 40gig disc to 7gb using this, surely there's a loss in quality? If so what's the best way to get like for like with no loss in quality?

Many thanks
When you re-encode a video file, there is always a loss in quality, except if you use specifically the lossless options. And re-encoding losslessly doesn't make much sense, as usually, the size of the final MKV file is greater than the original M2TS file ! So, the question is : what amount of loss of quality can I accept ? I can't reply for you, but usually, I consider that it's mainly a false problem. Of course, if you compress extremely, the quality loss will also be extreme, and therefore much visible, but most peoples cannot see the difference with the original BD (without using special tools) when the default option (CRF 23) is used. The decrease of the file size is NOT really an evidence of a visible quality loss, and it depends largely of the images of the original movie. Trust your eyes, and do not imagine that you can see a difference because you think that a small size means bad quality.

That being said, you can easily modify the quality (and the size) of the encoding. As noted by tebasuna51, the CRF mode is recommended, because it adapts itself so that you will always obtain more or less the same quality, but the file size may vary, especially for old films with much noise. The CRF parameter can be used to increase the quality and the file size. The default value for x264 (CRF 23) gives good results for a very small file size, but you can decrease it to, say, 20 or even 15 to obtain a much better quality, but take in mind that the file size of the video stream can be doubled when you decrease the CRF value by approximately 3.

BTW, to encode in lossless mode, use CRF 0, but buy a big hard disc, as you will obtain a huge file size !

r0lZ
25th July 2019, 09:02
Dear r0lZ. First of all thank you for your program it's fantastic. I do have a question.

I use BD3D2MK3D to convert ripped 3D Blu-Rays to watch on the Ocolus Go and it works a treat. I'm not particularly tech-savvy...I download the ripped MKV and don't change any of the settings.

The files will vary in size and quality. For example -
Terminator 2 - 7.22GB - Great picture
Gravity - 3.72GB - decent picture
Bladerunner 2049 - 1.63GB - okay picture but more "screen door" effect

I just wondered if there was a simple reason why the files vary in size/quality?

Thanks.
Thanks for your kind words.

As explained by tebasuna51, when you use the CRF encoding mode, the quality doesn't vary much, but the file size can vary, due to the difficulty to compress the images of the original movie. A CGI film like an animated Pixar movie can be compressed extremely well, because the image is very clean and without artifacts. In the other hand, old movies with much noise are very difficult to compress, because each frame is different from the previous one. So, differences in file size are not unusual, and you should not worry about them.

BTW, many peoples think that a specific bitrate is important to encode correctly, and prefer to encode in 2-pass mode for that reason, but it's totally wrong. Specifying the bitrate (in ABR or even 2-pass modes) imposes a constraint that the encoder must obey, and therefore, the quality is ALWAYS less good than the encoding in CRF mode (when it gives finally approximately the same file size, of course). The ONLY interest of 2-pass mode is therefore to control precisely the size of the final MKV file. That may be important if you need to copy it on a physical media like a DVD, but you should always avoid that mode if you don't care of the final file size.

See also my previous reply, just above this one.

r0lZ
25th July 2019, 09:09
Hi,
I have a 4k OLED with a passive 3d filter that works with madVR set to "3D format: line alternative".

I'd like to convert from my 3d mvc file to an mkv file that is 3840x2160 in line alternative format so that I can play it on a player that doesn't know how to decode 3D at all and the TV will just play it like a regular 2160p file.

I tried following the directions below but I ended up with a 1920x1080 file.
Could anyone suggest how to get a 3840x2160 line alternative file?

Thanks!
Unfortunately, it's not possible, at least automatically with BD3D2MK3D (and honestly, I don't think that other software exist to do what you want). Although line alternative is effectively a 3D format that exists officially, it is almost never used, and therefore I don't think someone will implement it.

IMO, for you, the best solution would be to buy a player that can convert SBS or TAB movies to line alternate. Not sure if they are easy to find.

However, you have revived an old post I wrote for someone having a similar question. I don't remember if he has replied that the method works, but I encourage you to try it.

I can't test the method right now, but try this:

left = SelectEven(interleaved)
right = SelectOdd(interleaved)

# Build combined Row-interlaced image
Interleave(left, right).Weave()
This will (probably!) produce a line alternative 1920x2160 stream. To be verified!

BTW, I don't understand why you want a "3840x2160 line alternative file". In line alternative mode, the lines of the two images are stacked together, one at a time. Therefore, the height of the final image is doubled. But the width doesn't change, since there is no need to duplicate each pixel horizontally. So, IMO, the final format must be 1920x2160. If you really need a 3840x2160 frame, you must add a resize operation in the modified AVS script, like this:

left = SelectEven(interleaved).LanczosResize(3840,1080)
right = SelectOdd(interleaved).LanczosResize(3840,1080)

# Build combined Row-interlaced image
Interleave(left, right).Weave()
Please let me know if one of these methods worked for you. Thanks in advance!

r0lZ
25th July 2019, 09:40
Hi r0lZ,
Yes I confirm X placement in SRT 2 ASS conversion with the guide using {\pos(x,y)} works as expected! Thanks for this hint.
I am perfectly OK to wait for the SRT 2 ASS bug fix (X guide with margin method) and enhancements whatever time it takes to accomplish. Please take care and time to sort out all your private matters.
I have a beta to test. I think I've fixed the X placement bug and I have implemented the option to ignore the Y placement from the guide, and use the bottom margin instead. There is also the possibility to still use the guide for the vertical positions of the subtitles appearing in the upper half of the screen. I have not implemented the idea to add a certain amount of pixels to the Y position of the guide, as IMO, it doesn't make much sense. Either you want all subtitles properly aligned near the bottom of the screen, or you use the position from the guide because it is supposed to be the best placement according to the foreground objects in the scene. OK ?

You can download the SRTtoASS3D.tcl file here (http://download.videohelp.com/r0lZ/BD3D2AVS/SRTtoASS3D_v0.6.7z). Just replace the original file in the toolset folder with the file from the archive, and restart BD3D2MK3D. Please test it carefully, and let me know if it works correctly. If it's the case, it will be integrated in the next official version...

donpoku
25th July 2019, 10:35
Sorry again, for whatever reason, the forum do not send me the notifications for the new posts any more, hence my late replies.
When you re-encode a video file, there is always a loss in quality, except if you use specifically the lossless options. And re-encoding losslessly doesn't make much sense, as usually, the size of the final MKV file is greater than the original M2TS file ! So, the question is : what amount of loss of quality can I accept ? I can't reply for you, but usually, I consider that it's mainly a false problem. Of course, if you compress extremely, the quality loss will also be extreme, and therefore much visible, but most peoples cannot see the difference with the original BD (without using special tools) when the default option (CRF 23) is used. The decrease of the file size is NOT really an evidence of a visible quality loss, and it depends largely of the images of the original movie. Trust your eyes, and do not imagine that you can see a difference because you think that a small size means bad quality.

That being said, you can easily modify the quality (and the size) of the encoding. As noted by tebasuna51, the CRF mode is recommended, because it adapts itself so that you will always obtain more or less the same quality, but the file size may vary, especially for old films with much noise. The CRF parameter can be used to increase the quality and the file size. The default value for x264 (CRF 23) gives good results for a very small file size, but you can decrease it to, say, 20 or even 15 to obtain a much better quality, but take in mind that the file size of the video stream can be doubled when you decrease the CRF value by approximately 3.

BTW, to encode in lossless mode, use CRF 0, but buy a big hard disc, as you will obtain a huge file size !

Thank you for the response I'll give it a try. Bless.

mi3gai4rui4
25th July 2019, 15:29
Unfortunately, it's not possible, at least automatically with BD3D2MK3D (and honestly, I don't think that other software exist to do what you want).


I wouldn't mind editing the files output by BD3D2MKV3D, and I appreciate you trying to help.


BTW, I don't understand why you want a "3840x2160 line alternative file".

I was thinking I wanted to reproduce the output of madVR in line alternative format, which I believe is a 3840x2160 image. I suppose if the player respects the aspect ratio metadata then a 1920x2160 file should work, and will definitely be faster to encode and smaller on disk.

Using this code you suggested didn't work:

left = SelectEven(interleaved)
right = SelectOdd(interleaved)

# Build combined Row-interlaced image
Interleave(left, right).Weave()

I got an error saying the fields needed to be separated.
So I changed to:

left = SelectEven(interleaved).SeparateFields()
right = SelectOdd(interleaved).SeparateFields()

# Build combined Row-interlaced image
Interleave(left, right).Weave()


With this in MUX_3D_OPTIONS.json:

"--track-name",
"0:3D Row interlaced (x264 high CRF 23 preset superfast)",
"--stereo-mode",
"0:7",


This resulted in a 3840x1080 file.
Any thoughts on what needs to change to get a 1920x2160 file?

konikpolny
25th July 2019, 16:02
I have a beta to test. I think I've fixed the X placement bug and I have implemented the option to ignore the Y placement from the guide, and use the bottom margin instead. [...] Please test it carefully, and let me know if it works correctly.

Thanks r0lZ, for this quick update
I have done a quick test without using my 3D projector.
The guide's X placement for margin method moves the subtitles correctly but of the 2 (left+right) subtitle lines the right subtitle line has a very narrow margin and appears in the left view. As it has a very narrow margin the subtitle is spread from top to bottom word by word. This needs fixing.

As far as overriding Y guide with user bottom margin setting the results seem OK for both methods (with and without exception to the rule for subtitles appearing in the upper part of screen).

r0lZ
26th July 2019, 11:15
Any thoughts on what needs to change to get a 1920x2160 file?
Not sure. The problem is that SeparateFields() splits the image in two half.
I don't know if there is another way to force Interleave() to accept the full image as a single field. I'll have a look...

r0lZ
26th July 2019, 11:17
The guide's X placement for margin method moves the subtitles correctly but of the 2 (left+right) subtitle lines the right subtitle line has a very narrow margin and appears in the left view. As it has a very narrow margin the subtitle is spread from top to bottom word by word. This needs fixing.
OK, I guess it's only a stupid bug. I will fix it ASAP. Thanks for the beta testing!

r0lZ
26th July 2019, 12:33
OK, I guess it's only a stupid bug.
Indeed, that was a stupid bug. The right margin was computed as the position from the left border of the image. It is now correctly the number of pixels from the right side.

Sorry, currently, I don't have much time to test my code. Anyway, here is a new beta (http://download.videohelp.com/r0lZ/BD3D2AVS/SRTtoASS3D_v0.7.7z). Please test it, especially with meaningful depth values from a good 3D-Plane, as my test did not take the depth into account.

konikpolny
26th July 2019, 22:00
Anyway, here is a new beta. Please test it.

r0lZ,
Now the right view subtitles do appear on the right side, but the subtitles margins for it are still wrong and for example the subtitle one line "Is that understood?" correctly showing on the left side as one line, on the right view is stacked from top to bottom and displayed as:
Is
that
understood?
I think the marginL for the right subtitle is beyond the scope of the video size:
Half-SBS dimensions: 1920 x 1080
Dialogue: [....],3D,,314,961,304,,Is that understood?
Dialogue: [....],3D,,2223,962,304,,Is that understood?

Full-SBS dimensions: 3840 x 1080
Dialogue: [....],3D,,629,1923,304,,Is that understood?
Dialogue: [....],3D,,4445,1923,304,,Is that understood?

I would also suggest disabling and greying out the second Y option "except for subtitles in the top of the screen" if the first option "Ignore the guide for Y position" is not selected.

tebasuna51
27th July 2019, 00:01
Not sure. The problem is that SeparateFields() splits the image in two half.
I don't know if there is another way to force Interleave() to accept the full image as a single field. I'll have a look...

Maybe:

left = SelectEven(interleaved).AssumeFieldBased()
right = SelectOdd(interleaved).AssumeFieldBased()

# Build combined Row-interlaced image
Interleave(left, right).Weave()

r0lZ
27th July 2019, 14:03
Maybe:

left = SelectEven(interleaved).AssumeFieldBased()
right = SelectOdd(interleaved).AssumeFieldBased()

# Build combined Row-interlaced image
Interleave(left, right).Weave()
Yes, I guess it's correct. I forgot AssumeFieldBased(). Thanks for the suggestion.

r0lZ
27th July 2019, 14:06
I think the marginL for the right subtitle is beyond the scope of the video size:[...]

I would also suggest disabling and greying out the second Y option "except for subtitles in the top of the screen" if the first option "Ignore the guide for Y position" is not selected.
Done. Check this new beta (http://download.videohelp.com/r0lZ/BD3D2AVS/SRTtoASS3D_v0.8.7z). I think the X placement is now correct, but please check if the depth is also correct.

pyk123
28th July 2019, 02:00
Hi rolZ

I am very much grateful that you have made such a great program as someone who likes 3D very much.
I have a question for you.

How do I get 3dp files?
I tried many titles with MVCplanes2OFS..exe but failed.
How can I make 3dp files?

When I asked you this question a long time ago
You told me that I had a movie title problem
I have not been able to get all of the hundreds of titles I have in the meantime.


Every time I try, I always get this result.

please help!

#sample#

Command: "H:\BD3D2MK3D\toolset\MVCPlanes2OFS.exe" "00001.track_4114.mvc" "."


Searching 3D-Planes ...

Done

Searching and removing empty 3D-Planes...

Empty 3D-Plane #00 removed

Number of 3D-Planes in MVC stream : 1
Number of 3D-Planes written : 0
Number of frames : 0

Extraction took 43 seconds (00:00:43)
Extracted 0 3D-planes with 0 frames @ 0 fps.

Please note that the 3D depth values stored in the 3D-planes must be applied to the two views.
The total displacement between the two subtitles is therefore two times the depth value.
For that reason, BD3D2MK3D uses internally depths value multiplied by 2.
This allows the user to specify manually more precide odd values for the total displacement of the two subtitles.
The values stored in the <depth> tags of the temp 2D XML files are also multiplied by 2, for the same reason.

Source subtitle streams information:
- Eng PGS, 3D-plane: 1
- Eng PGS, 3D-plane: 2
- Eng PGS, 3D-plane: 3
- Eng PGS, 3D-plane: 4
- Ara PGS, 3D-plane: 5
- Bul PGS, 3D-plane: 6
- Zho PGS, 3D-plane: 7
- Zho PGS, 3D-plane: 8
- Zho PGS, 3D-plane: 9
- Hrv PGS, 3D-plane: 10
- Ces PGS, 3D-plane: 11
- Ell PGS, 3D-plane: 12
- Heb PGS, 3D-plane: 13
- Hun PGS, 3D-plane: 14
- Isl PGS, 3D-plane: 15
- Ind PGS, 3D-plane: 16
- Kor PGS, 3D-plane: 17
- Msa PGS, 3D-plane: 18
- Pol PGS, 3D-plane: 19
- Por PGS, 3D-plane: 20
- Por PGS, 3D-plane: 21
- Ron PGS, 3D-plane: 22
- Srp PGS, 3D-plane: 23
- Slk PGS, 3D-plane: 24
- Slv PGS, 3D-plane: 25
- Spa PGS, 3D-plane: 26
- Spa PGS, 3D-plane: 27
- Tha PGS, 3D-plane: 28
- Tur PGS, 3D-plane: 29
- Vie PGS, 3D-plane: 30



console message

Done with warnings!

* Warning: Subtitle track "00001.track_4608.Eng.2D.sup" is associated with the 3D-plane file 3D-Plane-01.ofs, but the 3D-Plane #1 doesn't exist or is empty.
There are no other 3D-planes to use. Using constant depth of 0 (+ additional depth of 0)!
The subtitles will appear on the surface of the screen (unless you have specified a non-zero additional depth).
* No forced captions in "00001.track_4608.Eng_forced.2D.sup". Stream skipped.
* Warning: Subtitle track "00001.track_4609.Eng.2D.sup" is associated with the 3D-plane file 3D-Plane-02.ofs, but the 3D-Plane #2 doesn't exist or is empty.
There are no other 3D-planes to use. Using constant depth of 0 (+ additional depth of 0)!
The subtitles will appear on the surface of the screen (unless you have specified a non-zero additional depth).
* No forced captions in "00001.track_4609.Eng_forced.2D.sup". Stream skipped.
* Warning: Subtitle track "00001.track_4610.Eng.2D.sup" is associated with the 3D-plane file 3D-Plane-03.ofs, but the 3D-Plane #3 doesn't exist or is empty.
There are no other 3D-planes to use. Using constant depth of 0 (+ additional depth of 0)!
The subtitles will appear on the surface of the screen (unless you have specified a non-zero additional depth).
* No forced captions in "00001.track_4610.Eng_forced.2D.sup". Stream skipped.
* Warning: Subtitle track "00001.track_4611.Eng.2D.sup" is associated with the 3D-plane file 3D-Plane-04.ofs, but the 3D-Plane #4 doesn't exist or is empty.
There are no other 3D-planes to use. Using constant depth of 0 (+ additional depth of 0)!
The subtitles will appear on the surface of the screen (unless you have specified a non-zero additional depth).
* No forced captions in "00001.track_4611.Eng_forced.2D.sup". Stream skipped.
* Warning: Subtitle track "00001.track_4612.Ara.2D.sup" is associated with the 3D-plane file 3D-Plane-05.ofs, but the 3D-Plane #5 doesn't exist or is empty.
There are no other 3D-planes to use. Using constant depth of 0 (+ additional depth of 0)!
The subtitles will appear on the surface of the screen (unless you have specified a non-zero additional depth).

tebasuna51
28th July 2019, 10:38
When I asked you this question a long time ago
You told me that I had a movie title problem
I have not been able to get all of the hundreds of titles I have in the meantime.

Every time I try, I always get this result.

...
Extraction took 43 seconds (00:00:43)
Extracted 0 3D-planes with 0 frames @ 0 fps.

MVCPlanes2OFS.exe seems run 43 sec but don't found 3D-planes.
If that happen in hundreds of titles maybe you have hundreds of movie title problems.
How do you obtain these movies?

r0lZ
28th July 2019, 12:40
Yes, MVCPlanes2OFS.exe works correctly only if the MVC stream contains the original 3D-Planes. Unfortunately, they are destroyed when the video is re-encoded, so you should always use it with an unmodified 3D BD (or an original 3D BD ripped with MakeMKV).

Remuxed 3D BDs (without re-encoding, for example to add the Atmos audio or new subtitle tracks) should still contain the 3D-Planes, but they are often badly assigned to the wrong subtitle streams, and therefore they give bad 3D depth values for a specific stream. But MVCPlanes2OFS should be able to retrieve the OFS planes from a remuxed 3D BD anyway.

Note also that many cheap Asian movies do not have 3D-Planes at all, or they have bad 3D-Planes with a single fixed depth value only.

Downloaded material is often badly re-encoded, or remuxed at best, and you should avoid it like the plague. Furthermore, it's a copyright infringement, prohibited by the Doom 9 rules.

konikpolny
28th July 2019, 20:23
Done. Check this new beta (http://download.videohelp.com/r0lZ/BD3D2AVS/SRTtoASS3D_v0.8.7z). I think the X placement is now correct, but please check if the depth is also correct.

r0lZ, all works like a charm. I did check the depth. Many thanks for this update :thanks:

xiai
29th July 2019, 03:01
when i encode with x265 10bit,There was a mistake.
can't read "bitrate": no such variable
can't read "bitrate": no such variable
while executing
"set x264args2d " --bitrate $bitrate --pass 1 --stats "${basename}_2D.stats" ^\n ""
("2-pass" arm line 2)
invoked from within
"switch $::x264mode {
"CRF" {
set x264args2d " --crf $::x264crf"
set x264info12d "CRF $::x264crf"
}
"CQ" {
set x264args2d " --qp $::x264..."
(procedure "GenerateAvs" line 2493)
invoked from within
"GenerateAvs"
invoked from within
".nbf5.gf.gen invoke "
invoked from within
".nbf5.gf.gen instate {pressed !disabled} { .nbf5.gf.gen state !pressed; .nbf5.gf.gen invoke } "
(command bound to event)

xiai
29th July 2019, 03:14
i tried 2 3dbds,the same error
http://i1.fuimg.com/681677/1feece4cb7c71e51.png

konikpolny
29th July 2019, 16:00
when i encode with x265 10bit,There was a mistake.

Hi Xiai,
I once had this error. To add a little bit of info about the problem: This happens on project creation and not during encoding. For me when I used the same 3DBD source on another PC the project created without any issues. I then went back to the original PC and after a restart I didn't have any problems. I also don't think this has anything to do with x265 project creation. Can you please try the above and if the issue persists try creating x264 project and say if the error still comes up?

xiai
29th July 2019, 17:24
Hi Xiai,
I once had this error. To add a little bit of info about the problem: This happens on project creation and not during encoding. For me when I used the same 3DBD source on another PC the project created without any issues. I then went back to the original PC and after a restart I didn't have any problems. I also don't think this has anything to do with x265 project creation. Can you please try the above and if the issue persists try creating x264 project and say if the error still comes up?

I tried. There was no problem on the other computer.

xiai
29th July 2019, 17:27
I want to encode with GPU, such as AMD VCE, What shall I do?
x265 encode with cpu is too slow

konikpolny
29th July 2019, 18:18
I want to encode with GPU, such as AMD VCE, What shall I do?
x265 encode with cpu is too slow

encoding x265 is in principle much much slower, but the last BD3D2MK3D v1.9 release uses exceptionally slow x265 version. So I suggest downloading the latest version from http://msystem.waw.pl/x265/ and replacing it (in the toolset directory). Choose "GCC 9.1 none" for download. You should notice some speed improvement unless the latest version again slowed down the encoding (in my last encodes I used a version from over a month ago).

r0lZ
31st July 2019, 10:24
when i encode with x265 10bit,There was a mistake.
Thanks for the feedback.

Can you tell me what settings you use ? I suppose it's 2-pass or ABR. Right ? But the screenshot in your second post shows CRF. I don't understand. In CRF mode, the bitrate is not specified, and it is (normally) never specified in the command line.

konikpolny, thanks for your additional info. Unfortunately, it is difficult for me to understand what's happening, as I have no way to reproduce the bug.

Just a suggestion. Are you sure you have not changed the mode immediately AFTER having clicked on the big button to generate the project ? In that case, it is possible that the settings of a bitrate mode interferes with the final (CRF) mode.

r0lZ
31st July 2019, 10:37
I want to encode with GPU, such as AMD VCE, What shall I do?
x265 encode with cpu is too slow
x264 and x265 are unable to use the GPU to speed the encoding up. According to the developers, GPU enabled encodings are always of inferior quality, and they have therefore decided to encode "normally", without the help of the GPU.

Personally, I encode with x264, and of course I have not noticed a decrease of the encoding speed. Anyway, I will release a new version of BD3D2MK3D soon, and I will include the latest version of the x265 encoder. I hope that it will be faster than the current version. Anyway, if you select the slow modes with x265, the encoding are indeed very slow. The placebo speed can take days to encode a short video. I suggest to stick with the default speed, medium.

@konikpolny: Of course, the new version will also include the fixed version of the SRT to ASS 3D converter. Thanks for your help and your numerous testings !

r0lZ
31st July 2019, 10:57
Can you tell me what settings you use ?
Perhaps I've found a possible culprit, but I need another info.
Can you select the x264 mode with the settings menu, and have a look at the last tab. Tell me what mode is selected there. Then, go back to the x265 encoding mode. Your settings should be restored.

Perhaps the bug is occurring only when the program generates the script to encode the 2D version of the movie. The 2D version can be encoded only with x264, and therefore, it is possible that the program mixes some settings from the 3D encoding with x265, and from the 2D encoding with x264. Since I do everything with x264, that could also explain why I have never encountered that bug.

konikpolny
31st July 2019, 11:04
Can you tell me what settings you use ? I suppose it's 2-pass or ABR. Right ? But the screenshot in your second post shows CRF. I don't understand. In CRF mode, the bitrate is not specified, and it is (normally) never specified in the command line.

konikpolny, thanks for your additional info. Unfortunately, it is difficult for me to understand what's happening, as I have no way to reproduce the bug.

I am absolutely sure i had the error when creating project with x265 CRF. Untouched and not meddled with. I even think I then tried doing it with x264 and the error was still all the same.
I may come back with more info next time I get the error.

r0lZ
31st July 2019, 16:57
OK, thanks. I will try to reproduce the bug. I have an idea, but I'm not sure...

r0lZ
1st August 2019, 11:03
when i encode with x265 10bit,There was a mistake.
I was right, and that bug was easy to reproduce.

The problem was due to the generation of the scripts necessary to encode the 2D version of the movie. (This feature is not widely used, but has been requested by some users, and it was relatively easy to implement, so I did it.)

For technical reasons, it is not possible to encode the 2D version with x265. Therefore, to generate the script, the program uses the settings of the x264 encoder, set in the last tab when the selected encoder is x264. You can, for example, set it to encode in 2-pass. Then, you change your mind, and you select the x265 HEVC encoder. The settings in the last tab change, and can be, for example, CRF 28. Then you launch the generation of the project. It is correctly generated for the 3D version, but the bitrate variable, not necessary when encoding in CRF mode, is not properly initialized. Since the x264 encoding in 2-pass mode requires the bitrate variable, the program crashes when it generates the _ENCODE_2D.cmd script.

Luckily, that bug had no impact on the 3D versions, and did not occur when the two encoding modes (for x264 and x265) were identical (CRF for example). Anyway, that bug is now fixed. I will release a new version soon...

xiai
2nd August 2019, 16:11
Thanks for the feedback.

Can you tell me what settings you use ? I suppose it's 2-pass or ABR. Right ? But the screenshot in your second post shows CRF. I don't understand. In CRF mode, the bitrate is not specified, and it is (normally) never specified in the command line.

konikpolny, thanks for your additional info. Unfortunately, it is difficult for me to understand what's happening, as I have no way to reproduce the bug.

Just a suggestion. Are you sure you have not changed the mode immediately AFTER having clicked on the big button to generate the project ? In that case, it is possible that the settings of a bitrate mode interferes with the final (CRF) mode.

My settings are already displayed on the picture.
x265 10bit crf 26 preset veryslow
I don't have this problem with another computer.

xiai
2nd August 2019, 16:14
I was right, and that bug was easy to reproduce.

The problem was due to the generation of the scripts necessary to encode the 2D version of the movie. (This feature is not widely used, but has been requested by some users, and it was relatively easy to implement, so I did it.)

For technical reasons, it is not possible to encode the 2D version with x265. Therefore, to generate the script, the program uses the settings of the x264 encoder, set in the last tab when the selected encoder is x264. You can, for example, set it to encode in 2-pass. Then, you change your mind, and you select the x265 HEVC encoder. The settings in the last tab change, and can be, for example, CRF 28. Then you launch the generation of the project. It is correctly generated for the 3D version, but the bitrate variable, not necessary when encoding in CRF mode, is not properly initialized. Since the x264 encoding in 2-pass mode requires the bitrate variable, the program crashes when it generates the _ENCODE_2D.cmd script.

Luckily, that bug had no impact on the 3D versions, and did not occur when the two encoding modes (for x264 and x265) were identical (CRF for example). Anyway, that bug is now fixed. I will release a new version soon...

ok,thanks!

xiai
4th August 2019, 04:14
I would also recommend introducing QSVEnc, VCEEnc and NVEnc, so that there are more choices.
https://github.com/rigaya

r0lZ
7th August 2019, 07:20
I would also recommend introducing QSVEnc, VCEEnc and NVEnc, so that there are more choices.
https://github.com/rigaya
Hum, sorry, but I don't think I'll do that. BD3D2MK3D is not a GUI for multiple encoders. Originally, it has been designed for x264 only. I have added x265 mainly because it was not too difficult to do it, because the command line is very similar to x264, but I don't want to add many other encoders, just for offering more choices. IMO, the best encoders are currently x264 and x265, and I'll stick with them, unless someone can prove me that a new encoder offers some things really important for BD3D2MK3D. Furthermore, honestly, I understand nothing related to QSVEnc and VCEEnc, as everything is written in Japanese.

tebasuna51
7th August 2019, 10:13
The big work of BD3D2MK3D is prepare all files (avs, subs, etc.) to do the encode with __ENCODE_3D.cmd

If a user want try with other encoder is easy replace the x264/x265 line in that file with the equivalent for other encoder.

I don't know QSVEnc or VCEEnc, with NVEnc I can make a equivalent command line encode except for --frame-packing 3 (basic for 3D output) but maybe any NVEnc expert can do it.

r0lZ
8th August 2019, 08:06
If I add a new encoder, it will certainly be NVEnc, as I suppose it is much faster than x264 or x265, for a slightly worse quality. But indeed, the lack of the equivalent of the --frame-packing argument is a problem.

r0lZ
8th August 2019, 08:44
As promised, here is the new version, with several important bugs fixed.

v1.10 (August 7, 2019)
- Fix: It was not possible to reply to the dialog appearing after a tsMuxeR demux error if the error message was too long.
- Fix: When the x264 settings in tab 5 were set to encode in 2-pass or ABR, and the encoding was made with x265 in CRF or CQ mode, the "bitrate" variable was not initialized, causing a crash.
- Fix: SRT to ASS 3D conversion: bad X placement when converting the subtitles to 3D with the margins option
- SRT to ASS 3D conversion: Added the possibility to provide a fixed Y placement when using a guide (optionally only for the subtitles in the lower half of the screen)
- Updated x264 to the latest version (0.158.2984)
- Updated x265 to the latest stable version (3.1.2+1)
- Updated Mkvtoolnix to the latest version (35.0.0 'All The Love In The World')

Thanks for the bug reports, guys !

Download: BD3D2MK3D.7z (http://download.videohelp.com/r0lZ/BD3D2AVS/BD3D2MK3D.7z)

tebasuna51
8th August 2019, 12:40
Thanks for de new version.

thxoptimizer
17th August 2019, 17:41
Hi,

I converted my first movie yesterday successfully (BD3D2MK32 version 1.9 + AviSynth 2.6.0)

Q1) I am just worried about these errors :
Done with errors!

* DTS-HD stream (track 3): bad frame detected at position00:25:56,928. Resync stream.
(...)
* DTS-HD stream (track 3): bad frame detected at position01:25:10,037. Resync stream.
* Warning: The AVC and MVC video streams do not have the same number of frames: 139855 and 139861. That means that the two streams are probably not synchronised properly, and that encoding this playlist to SBS or T&B may fail.
The script will be generated anyway.

But the outputfile seems normal so far (I didn't see the all movie though)

Q2 : if I understand correctly, "forced subtitles" are not very frequent.
If I just care about the usual subtitles, what if the best choice to avoid complications? Radio button of my language + "default" radio button?


Suggestion : why BD3D2MK32 is not able to keep my preferences on the output folders when it is restarted?

r0lZ
18th August 2019, 09:25
Welcome to the Doom9 forums, thxoptimizer !

Hi,

I converted my first movie yesterday successfully (BD3D2MK32 version 1.9 + AviSynth 2.6.0)

Q1) I am just worried about these errors :

Done with errors!

* DTS-HD stream (track 3): bad frame detected at position00:25:56,928. Resync stream.
(...)
* DTS-HD stream (track 3): bad frame detected at position01:25:10,037. Resync stream.
* Warning: The AVC and MVC video streams do not have the same number of frames: 139855 and 139861. That means that the two streams are probably not synchronised properly, and that encoding this playlist to SBS or T&B may fail.
The script will be generated anyway.


But the outputfile seems normal so far (I didn't see the all movie though)
Hum, bad thing. The first error (bad audio frame) can happen when there are several M2TS files in the MPLS, but if you see a lot of them, they indicate probably that your BD image is damaged.

As far as I know, the second error occurs only when there are severe errors in one or both video streams. That confirms probably that the ISO image is bad. The symptom is that the two views will be out of sync after a certain point. That can be a real torture for the brain ! But if you are extremely lucky, it's simply some frames missing in at the very end of one of the two video streams, and in that case (but in that case only), you don't have to worry. To verify, just play the very end of the movie in 3D, and see if both views are in sync. (It's easy to verify with the end credits sequence, when the text is moving up. Watch it without your 3D glasses. The text of the two views must appear "merged" at the same vertical position.)

If the problem is confirmed, try to re-rip the BD, perhaps with another method. If the problem persists, that means that your BD is damaged, and there is probably nothing to do.
Q2 : if I understand correctly, "forced subtitles" are not very frequent.
If I just care about the usual subtitles, what if the best choice to avoid complications? Radio button of my language + "default" radio button?
Indeed, forced subtitles (when they exist) are usually authored in their own separate stream. If there is only one subtitle stream in your language, I suggest to disable the option "Forced subtitles are authored in their own separate stream" and select the two streams in your language. If there are no forced subtitles in the main stream, BD3D2MK3D will display a warning at the end of the job, and the forced subtitle stream will simply be skipped.

If there are two or more streams in your language, try to determine what is what with the preview (use a good player like PotPlayer). The first stream is usually the main stream, but the second can be either the forced stream, or a special stream like directors comments or for hearing impaired.

If you are interested only in one subpic stream, it is sufficient to just select it. But if you select several streams, the Default radio-button can be used to force the subtitle to be the first available, and it sets also the "default" flag in the MKV header. That flag is supposed to instruct the player that it should enable that stream by default, but only a few players respect it. Anyway, it doesn't hurt to enable it.

Also, to "avoid complications", it might be a good idea to encode the subtitles on the video, with the "Hardcode subtitles" option in the last tab. The advantage is that you will see the subtitles with the correct depth, regardless of the player you use. The drawback is, of course, that you need to choose only one stream, and that it will be impossible to turn it off during playback. So, use that option preferably when you want to watch the movie in its original language and with the subtitles anyway.
Suggestion : why BD3D2MK32 is not able to keep my preferences on the output folders when it is restarted?
The output folder is saved with the content of the tabs (except of course the BD specific stuff) when you use Settings -> Save Tabs Settings Now. (It is saved also when you quit the program, if the option to save the tabs settings on exit is enabled.) That way, you can configure the important things (like the encoding settings or the output directory) only once, save the settings, and then, when you do another BD, modify one or another parameter for the current BD without affecting your default settings.

Note that the settings from the Settings menu (used less frequently) are saved immediately anyway.

Tenker
19th August 2019, 07:46
Thanks for de new version.


Unfortunately I get the error message
can't read "x264bitrate"
with the version.

can't read "x264bitrate": no such variable
can't read "x264bitrate": no such variable
while executing
"set bitrate $x264bitrate"
(procedure "GenerateAvs" line 2287)
invoked from within
"GenerateAvs"
invoked from within
".nbf5.gf.gen invoke "
invoked from within
".nbf5.gf.gen instate {pressed !disabled} { .nbf5.gf.gen state !pressed; .nbf5.gf.gen invoke } "
(command bound to event)

Under v1.9 no problems.
Tested on 2 PC with 2 images.

dm9656
19th August 2019, 10:21
Hi,

I did tests lately on my LG OLED E6 in order to check the differences or similarities between Full-SBS and Full-TAB.

I have always encoded in FTAB, as I had the same logic ("it seems logical"), so just never tried FSBS until now.

As I always encode in at least placebo/CRF15 quality with x264/8bit/BR compatible, I am quite confident the result is humanly indiscernable from the original BR (typically the resulting MKV file is nearly the same size as the original BR), and that my comparison tests are reliable. As a note, I do use "motion interpolation" option when watching in 3D in order to achieve the full immersive experience, but I don't think this messes up with the tests (high frame rate for 3D content really gives a much more dramatic improvement than for 2D content).

Results:
- image in FULL-TAB result is excellent, the 3D is crisp, with 100% certainty the 4K TV displays both full frames perfectly (e.g. alternate the 2x1080 lines over full 2160 height)
- image in FULL-SBS is ok but NOT as good: it feels blurry, less defined, much more like "H-TAB" than "F-SBS". I tried to see if there was anything related to filters etc. but after many trials and settings tweaking, I couldn't achieve the same quality as FTAB. Altough it would require capturing the TV output and analyze it line by line to understand exactly what is happening, I'm quite confident that what is displayed is in fact H-TAB and that the TV does not make use of all the original video data.

My 2 cents is that FTAB certainly allows for "simpler decoding" as you hinted, because the image being already encoded vertically, all the TV has to do is decode/split/interlace the lines "as is". In FSBS, there is much more work needed as lines have also to be moved around to arrange them vertically, and it is possible they just didn't care doing it for FSBS. Anyway, it might be a flaw with my particular TV model, but all in all, SBS seems a more complicated and risky option.

In conclusion: choosing FTAB as a standard for encoding 3D MKVs seems the best option for maximum quality output on all equipments (as long as there are no problems related to FTAB on other TVs, but I have not seen any reports about such problems).

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
19th August 2019, 12:04
In conclusion: choosing FTAB as a standard for encoding 3D MKVs seems the best option for maximum quality output on all equipments (as long as there are no problems related to FTAB on other TVs, but I have not seen any reports about such problems).
Thanks for the info. However, I'm not sure I agree with your conclusion. First, it should be noted that most relatively old 3D TVs (not UHD) do NOT support Full-TAB or Full-SBS. They require the half resolution, because their decoding buffers are just sufficient for 2D Full-HD. When they play a 3D movie, they have to handle two views at the same time, and therefore, they cannot do it in full resolution. Of course, that limitation doesn't exist on UHD TVs, because their buffers are twice as large as what is needed to decode Full-3D.

Also, I must admit that I don't understand why your TV shows the Full-SBS movies with less quality than Full-TAB. IMO, the two views must be cut BEFORE they are processed for the 3D display, and therefore, there is no reason to prefer one method over the other. But I trust your test. Your TV (and perhaps most or all LG TVs) has a problem with Full-TAB. That doesn't mean that the TVs made by other brands have the same problem. If would be nice to compare the two methods with, say, a Samsung UHD TV. I bet that both methods will give equivalent results.

Anyway, BD3D2MK3D offers all possibilities, so you are free to use what gives the best result with your equipment.

r0lZ
19th August 2019, 12:10
Thanks for de new version.

Unfortunately I get the error message
can't read "x264bitrate"
with the version.

Under v1.9 no problems.
Tested on 2 PC with 2 images.
Hum, strange. It's theoretically fixed.

Can you tell me exactly how you encode: x264 or x265 and with what mode (CRF, CQ, 2-pass or ABR) ? And if you encode with x265, please change the encoder and see what mode is selected for x264.

I will have a look anyway...

Tenker
19th August 2019, 13:04
Hum, strange. It's theoretically fixed.

Can you tell me exactly how you encode: x264 or x265 and with what mode (CRF, CQ, 2-pass or ABR) ? And if you encode with x265, please change the encoder and see what mode is selected for x264.

I will have a look anyway...

- h264 with x264
- FRIMSource
- ABR 15MBs

thxoptimizer
19th August 2019, 14:41
@r0lZ : thank you for you very complete explanation.

1st movie (before your answer) : I have checked on my TV (LG 55C6V) and...I haven't found how to active the subtiles...:stupid:
I forgot to check the end of the movie as you said, nevermind it was just a 1st test.

2nd movie (after your answer) : I have followed all your recommendations and the subtitles ar directly visible. Unfortunately, I think my TV doesn't like Full SBS because what I see is a 3D movie with very large horizontal black bars

For your information, usually I always watch my movies on physical support (Blu-Ray 3D), but I am just preparing when I will watch my movies on a headset because my next TV won't have 3D capability :(

r0lZ
19th August 2019, 15:01
Unfortunately, I think my TV doesn't like Full SBS because what I see is a 3D movie with very large horizontal black bars
This is a well known problem, due to the fact that the de-facto standard for 3D SBS or TAB is not very consistent, especially for Full-SBS or Full-TAB. The aspect ratio to use is not clearly specified. Some TVs require to set the aspect ratio of the combined view, and others require the aspect ratio of the final display (16:9), and some (like my Samsung) ignore totally the AR settings and disp[lay the movie in 16:9 full-screen anyway (and this is not a bad idea, because the SBS/TAB standard REQUIRES a 16:9 movie, with the black bars if necessary, so displaying it in 16:9 anyway makes sense.)

For a good result, you may have to change the AR settings with the menu Settings -> Full SBS/T&B aspect ratio. Note that there are two AR: the DAR set in the MKV header and the SAR in the video stream, so there is a total of 4 combinations. I suggest to encode a little clip several times just to verify what setting works for your TV. You can already exclude the default settings. :-(

Note also that there is no problem in Half-SBS/TAB.

thxoptimizer
19th August 2019, 16:41
Er...OK...this time I didn't understand everything (Full-TAB, AR, DAR) but I keep in mind what you suggest about the Settings -> Full SBS/T&B aspect ratio.

PS : I can't send you a private message : each time I write something and I click on "submit message", it's like it's working...but I don't see anything in "Sent item" so...I assume everything I wrote is lost...

sneaker_ger
19th August 2019, 17:53
Make sure "Save a copy of this message in your Sent Items folder" is ticked when you write a PM. You can activate this option by default in the Options of your CP (https://forum.doom9.org/profile.php?do=editoptions).

r0lZ
20th August 2019, 18:42
PS : I can't send you a private message : each time I write something and I click on "submit message", it's like it's working...but I don't see anything in "Sent item" so...I assume everything I wrote is lost...
I have received them, and replied. Maybe you have also to untick the "Receive Private Messages only from Contacts and Moderators" option ?

dm9656
20th August 2019, 22:09
Just a few words in reply

Thanks for the info. However, I'm not sure I agree with your conclusion. First, it should be noted that most relatively old 3D TVs (not UHD) do NOT support Full-TAB or Full-SBS. They require the half resolution, because their decoding buffers are just sufficient for 2D Full-HD. When they play a 3D movie, they have to handle two views at the same time, and therefore, they cannot do it in full resolution.

Yes, I should have mentionned my post did not apply to all TVs indeed.


Of course, that limitation doesn't exist on UHD TVs, because their buffers are twice as large as what is needed to decode Full-3D.

Agreed, FTAB/FSBS is mainly intended to get the best out of UHD TVs.


Also, I must admit that I don't understand why your TV shows the Full-SBS movies with less quality than Full-TAB. IMO, the two views must be cut BEFORE they are processed for the 3D display, and therefore, there is no reason to prefer one method over the other. But I trust your test. Your TV (and perhaps most or all LG TVs) has a problem with Full-TAB. That doesn't mean that the TVs made by other brands have the same problem. If would be nice to compare the two methods with, say, a Samsung UHD TV. I bet that both methods will give equivalent results.


Yes this is a bit strange and I just noticed this lately, however I have had that TV for nearly 3 years...
BTW "Your TV (and perhaps most or all LG TVs) has a problem with Full-TAB" ==> I guess you wanted to write "with Full-SBS".


Anyway, BD3D2MK3D offers all possibilities, so you are free to use what gives the best result with your equipment.

And this is where I give you my best thanks for the excellent work :)

dm9656
20th August 2019, 22:19
May I give my 2 cents about how I sort the things out of this SAR/DAR complexity when I encode in FTAB (for my LG UHD TV) ?

After the 3D encoding, I use MKVToolNix with the header editor, and edit the "Video display width/height" of the video stream with the target 1920/1080 values (usually they are set to same values as "Video pixel width/height" of 1920/2160).

Maybe I could set the parameters right in BD3D2MK3D that would do it for me without tweaking, but I don't remember ever succeeding with this, and this header tweaking gives me a 100% assurance that everything will play fine on the TV.

This is a well known problem, due to the fact that the de-facto standard for 3D SBS or TAB is not very consistent, especially for Full-SBS or Full-TAB. The aspect ratio to use is not clearly specified. Some TVs require to set the aspect ratio of the combined view, and others require the aspect ratio of the final display (16:9), and some (like my Samsung) ignore totally the AR settings and disp[lay the movie in 16:9 full-screen anyway (and this is not a bad idea, because the SBS/TAB standard REQUIRES a 16:9 movie, with the black bars if necessary, so displaying it in 16:9 anyway makes sense.)

For a good result, you may have to change the AR settings with the menu Settings -> Full SBS/T&B aspect ratio. Note that there are two AR: the DAR set in the MKV header and the SAR in the video stream, so there is a total of 4 combinations. I suggest to encode a little clip several times just to verify what setting works for your TV. You can already exclude the default settings. :-(

Note also that there is no problem in Half-SBS/TAB.

r0lZ
21st August 2019, 22:22
Maybe I could set the parameters right in BD3D2MK3D that would do it for me without tweaking, but I don't remember ever succeeding with this, ...
Well, just tick "Settings -> Full SBS/T&B Aspect Ratio -> Use 16:9 AR For Both (Not recommended)". That should put directly the right values for your TV in the MKV header.

Unfortunately, some TVs prefer to trust the SAR in the video stream, and AFAIK, you cannot change it without re-encoding.

sneaker_ger
22nd August 2019, 00:51
ffmpeg can change H.264 and HEVC SAR values without re-encoding.
https://www.ffmpeg.org/ffmpeg-bitstream-filters.html#h264_005fmetadata

r0lZ
23rd August 2019, 20:35
Thanks for the info. I did not know that. :-)

TVI
24th August 2019, 23:41
Thanks for your kind words.

As explained by tebasuna51, when you use the CRF encoding mode, the quality doesn't vary much, but the file size can vary, due to the difficulty to compress the images of the original movie. A CGI film like an animated Pixar movie can be compressed extremely well, because the image is very clean and without artifacts. In the other hand, old movies with much noise are very difficult to compress, because each frame is different from the previous one. So, differences in file size are not unusual, and you should not worry about them.

BTW, many peoples think that a specific bitrate is important to encode correctly, and prefer to encode in 2-pass mode for that reason, but it's totally wrong. Specifying the bitrate (in ABR or even 2-pass modes) imposes a constraint that the encoder must obey, and therefore, the quality is ALWAYS less good than the encoding in CRF mode (when it gives finally approximately the same file size, of course). The ONLY interest of 2-pass mode is therefore to control precisely the size of the final MKV file. That may be important if you need to copy it on a physical media like a DVD, but you should always avoid that mode if you don't care of the final file size.

See also my previous reply, just above this one.


Thank you very much for your helpful response (and tebasuna51).

Just one more query please. At some point during the majority of my 3D conversions there is a green flash and the 3D is thrown out of synch. It's is pretty random and can happen once or multiple times, and usually there will be another green flash and the 3D will return to normal.

Do you know why this happens? I wondered if it was something to do with checking the laptop during the conversion process?

Thank you!

sneaker_ger
25th August 2019, 15:09
Could be a decoding problem. Are you using hardware decoding? Try turning it off.

Giz..
25th August 2019, 18:02
Thanks for de new version.


Unfortunately I get the error message
can't read "x264bitrate"
with the version.



Under v1.9 no problems.
Tested on 2 PC with 2 images.

I too got this error, went back to 1.9. Also wondering if any testing done with AVISynth+ http://avs-plus.net/

r0lZ
27th August 2019, 18:00
Thank you very much for your helpful response (and tebasuna51).

Just one more query please. At some point during the majority of my 3D conversions there is a green flash and the 3D is thrown out of synch. It's is pretty random and can happen once or multiple times, and usually there will be another green flash and the 3D will return to normal.

Do you know why this happens? I wondered if it was something to do with checking the laptop during the conversion process?

Thank you!That may be caused by the laptop going to sleep. x264 (and probably also x265) do not like being interrupted.

Are you sure you launch __ENCODE_3D_LAUNCHER.cmd and not directly __ENCODE_3D.cmd ? Also, be sure to not set your laptop to sleep mode manually during an encoding.

Anyway, normally, you can have a look at the title bar of the command prompt window when you want to see the progress of the encoding. As long as you don't launch another heavy task at the same time, everything should be fine.

Try also to turn the hardware decoding off, as suggested by sneaker_ger.

Personally, I have never has that kind of problem.

r0lZ
27th August 2019, 18:03
I too got this error, went back to 1.9. Also wondering if any testing done with AVISynth+ http://avs-plus.net/
Sorry, I have not much time currently. I'll fix that bug as soon as possible...

No, I'm personally not really interested in the numerous forks of avisynth. I prefer to stick to the good old bug free version. But if anisynth+ has the same syntax, you can try it yourself, simply by modifying the file name in __ENCODE_3D.cmd.

tebasuna51
28th August 2019, 02:02
No, I'm personally not really interested in the numerous forks of avisynth. I prefer to stick to the good old bug free version. But if anisynth+ has the same syntax, you can try it yourself, simply by modifying the file name in __ENCODE_3D.cmd.

There are nothing to modify, I'm running Avs+ (32 and 64 versions installed) without problems.

Of course the 32 version is used with 32 bits plugins used in BD3D2MK3D.

I can make a test loading FRIMSource64.dll and encoding directly with x264_x64.exe, instead use the intermediate avs2yuv.exe, to see the speed change.

Encoding started 28/08/2019 1:56:10,66
"C:\Portable\Util\BD3D2MK3D\toolset\avs2yuv.exe" "__ENCODE_3D_MOVIE.avs" -frames 158712 -o - | "C:\Portable\Util\BD3D2MK3D\toolset\x264_x64.exe" --output-depth 8 --crf 23 --preset medium --sar 1:1 --range tv --colormatrix bt709 --frame-packing 3 --qpfile chapters_3D.qpfile --frames 158712 --fps 24000/1001 --output "00009_3D.264" --demuxer y4m --stdin y4m -
...
encoded 158712 frames, 42.01 fps, 3536.54 kb/s
Encoding finished 28/08/2019 2:59:09,86 -> 1:02:49,20

Encoding started 28/08/2019 3:03:34,12
"C:\Portable\Util\BD3D2MK3D\toolset\x264_x64.exe" --output-depth 8 --crf 23 --preset medium --sar 1:1 --range tv --colormatrix bt709 --frame-packing 3 --qpfile chapters_3D.qpfile --frames 158712 --fps 24000/1001 --output "00009_3D64.264" "__ENCODE_3D_MOVIE64.avs"
...
encoded 158712 frames, 49.59 fps, 3536.54 kb/s
Encoding finished 28/08/2019 3:56:55,87 -> 0:53:21,75
Can save 18% time with Avs+ 64 bits.

r0lZ
28th August 2019, 06:14
Interesting. Thanks for your test ! Maybe I'll implement some support for Avisynth+ 64-bit, but I have to verify first that all plugins necessary for BD3D2MK3D are available.

r0lZ
28th August 2019, 08:12
OK, I think the bug with the bitrate variable is now really fixed. Please confirm !

v1.11 (August 28, 2019)
- Fix: Hopefully definitively fixed the bug of the uninitialized bitrate variable
- Updated BDSup2Sub++.exe to the latest version (1.0.3) and modified the link to the BDSup2Sub++ home in the Help menu
- Updated the Mkvtoolnix exes to the latest version (37.0.0 'Leave It')

Download: BD3D2MK3D.7z (http://download.videohelp.com/r0lZ/BD3D2AVS/BD3D2MK3D.7z)

tebasuna51
28th August 2019, 13:45
Thanks for the new version.

All plugins (I think LoadHelper.dll is not used now, it is not needed at all) have 64 bits versions (all supported for Avs+):

DGMVCDecode.dll, libmfxsw.dll (http://rationalqm.us/mine.html)
FRIMSource.dll, libmfxsw.dll (https://forum.doom9.org/showthread.php?p=1650646#post1650646)
SupCore.dll, SupTitle.dll (http://avisynth.nl/index.php?title=SupTitle)
VSFilter.dll (https://github.com/pinterf/xy-VSFilter/releases) with a modern VSFilter.dll

Maybe you need these little tool from Groucho2004 to know if AviSynth 64 version is instaled, with both Avs+ (pool (https://forum.doom9.org/showthread.php?t=176505&highlight=Avisynth+version)):
AVSVersion32.exe
32 Bit: AviSynth+ 0.1 (r2772, MT, i386) (0.1.0.0)

AVSVersion64.exe
64 Bit: AviSynth+ 0.1 (r2772, MT, x86_64) (0.1.0.0)

r0lZ
29th August 2019, 08:42
Fine, thanks ! Indeed, it seems that the 64-bit version of Avisynth+ is stable. At least, it is used by a lot of peoples. I will therefore probably implement it, but that will take some time...

tebasuna51
30th August 2019, 00:51
... but that will take some time...

Of course, no problem.

r0lZ
1st September 2019, 13:08
OK, I did some tests with Avisynth+ 32-bit, and everything seems to work correctly, without any modification. So, I guess that using the 64-bit version will not be much more difficult.

tebasuna51
2nd September 2019, 11:35
The selecction of the Avs+ version to use is make by the program than call to AviSynth.

AVSVersion32.exe, avs2yuv.exe, x264_x86.exe, ... call to Avs+ 32 bits
AVSVersion64.exe, x264_x64.exe, ... call to Avs+ 64 bits

For instance the 'BD3D2MK3D-> Help -> AviSynth version' run the avs script "Test_Avisynth_Installation.avs" with LoadPlugin("VSFilter.dll")
Like my default avs player (VirtualDub2_64) is 64 bits I get the error:
"Cannot load a 32 bit DLL in 64 bit AviSynth..."

Changed to VSFilter64.dll work fine.

r0lZ
3rd September 2019, 08:00
I have understood that soon after having posted my (stupid) question, and I have immediately removed it, so I did not expect an answer. But thanks anyway.

Now, I wonder if I must keep the avs2yuv trick to encode with x264 or x265 64-bit, for the users who have installed only the classic Avisynth 2.6 32-bit, or if I can assume that the users who want to encode in 64-bit have already installed Avisynth+ 64-bit, or will accept to install it ?

In other words, I may replace the current option "Use 64-bit X264 with avs2yuv on 64-bit PC" with a "Force 32-bit encoding" that will be available only on 64-bit PC when a 64-bit version of Avisynth is installed. When this option is enabled, BD3D2MK3D will then generate the project with 32-bit tools only (Avisynth AND X264/X265, without avs2yuv). For me, that will be simpler to implement, as I will not have to mix 32 and 64-bit tools, but that will force the users of a 64-bit PC to install Avisynth+ 64-bit if they want a fast encoding. Since Avisynth+ seems well compatible with the classic Avisynth, I suppose that it's not a problem. What do you think ?

tebasuna51
3rd September 2019, 14:16
Well, the first question than BD3D2MK3D must know is if are running a W32 OS, then only Avs, x264, x265... 32 bits can be used.
AVSVersion32.exe can be used to know if AviSynth is installed, if not BD3D2MK3D can't work, if yes there are only a way to work.

If a OS W64 is running you can use AVSVersion64.exe to know if Avs 64 bits is installed.
If only Avs 32 is installed you can inform the user about the option of install Avs 64 but you need use avs2yuv with x264/x265.
If Avs 64 is installed you can generate all avs scripts with 64 plugins and not use avs2yuv.

I think the current option "Use 64-bit X264 with avs2yuv on 64-bit PC" is not necesary, always use the best option allowed, only inform than installing Avs+ 64 the encode is fast.

r0lZ
3rd September 2019, 17:06
Thanks. It's exactly what I have planned to do. But I wonder if I should add an option to force the usage of the 32-bit avisynth even when the 64-bit version is installed, in case of problems with avisynth+ x64 or with one of its plugins.

tebasuna51
4th September 2019, 01:29
Ok, is your choice.

r0lZ
4th September 2019, 17:18
I don't know QSVEnc or VCEEnc, with NVEnc I can make a equivalent command line encode except for --frame-packing 3 (basic for 3D output) but maybe any NVEnc expert can do it.
What binary do you use ? ffmpeg ? I must admit that I'm a bit lost. There are many web pages about NVEnc, but none with an exe to download.

Can you suggest a command line ? (It is a pity that the FramePacking option is missing, but it is missing for x265 too, so I suppose that it is not mandatory for most users.)

As I have almost finished to modify BD3D2MK3D to support AniSynth+, I'm looking for another thing to do. ;-)

tebasuna51
5th September 2019, 00:40
Here there are binary releases and some help: https://github.com/rigaya/NVEnc

r0lZ
5th September 2019, 08:48
OK, thanks. I have not been able to find any download link for the exe, but after some googling, I found this (https://onedrive.live.com/?id=6BDD4375AC8933C6%212293&cid=6BDD4375AC8933C6). So now I have the exe. But I don't think that my old Nvidia graphic card supports the NVEnc hardware acceleration. Only cuda. So, it will be difficult for me to test NVEnc. Furthermore, I have read often that the quality of the encoding is very bad. So, I'm not sure anymore that I want to implement it. But I will do some tests anyway. But first things first. I will release a beta with the support for Avisynth+ 64-bit immediately...

r0lZ
5th September 2019, 09:09
As promised, here is BD3D2MK3D with support for Avisynth+ 64-bit.

It seems to work fine, but since I have had to modify a lot of things, I may have introduced new bugs, or broken existing features, so this version is a beta. Please test it carefully. In case of problem, you can still download v1.11 here (http://download.videohelp.com/r0lZ/BD3D2AVS/BD3D2MK3D.7z).


v1.12beta2 (September 5, 2019)
- Support for AviSynth+ 32 and 64-bit. It is strongly recommended to install AviSynth+ 64-bit !
- Added the 64-bit version of the AviSynth filters necessary for the conversion to 3D (in toolset\plugins64bit)
- Replaced the old VSFilter 32-bit avisynth plugin with the new and much faster version from the xy-VSFilter Project
- DGMVCSource is now the default MVC decoder again because its 64-bit version is faster than FRIMSource
- Replaced Avs2YUV 0.24 (32-bit) with Avs2YUV 0.24bm2, and added Avs2YUV 64-bit 0.24bm2 (necessary to use AviSynth+ 64-bit with x265 64-bit)
- The Avisynth version is now detected with AVSVersion32/64.exe (Thanks tebasuna51!) and the Help -> Avisynth Version menu has been redesigned.

Download v1.12 beta 2: BD3D2MK3D_v1.12beta2.7z (http://download.videohelp.com/r0lZ/BD3D2AVS/BD3D2MK3D_v1.12beta2.7z)

Of course, to use it, it is strongly recommended to install AviSynth+ (https://github.com/pinterf/AviSynthPlus/releases) 64-bit. However, I would appreciate if someone can test this version before installing Avisynth+ , to check if I have not broken the support for the classic Avisynth 2.6. Also, I have been unable to check this version on a 32-bit PC, so if someone has an antique at home, I would be interested to know if BD3D2MK3D runs still without problem in a 32-bit-only environment.

Thanks in advance. If I don't have negative feedback in a week or so, I will release v1.12 officially.

tebasuna51
5th September 2019, 12:39
...So, it will be difficult for me to test NVEnc. Furthermore, I have read often that the quality of the encoding is very bad. So, I'm not sure anymore that I want to implement it...

I can't recommend the encoder, also my cheap nVidia GPU can't work.

I make any test with a powerfull GPU (in gamming PC of my son) and the quality is comparable with Fast presets x264 the is not so interesting for me.

As promised, here is BD3D2MK3D with support for Avisynth+ 64-bit...
Of course, to use it, it is strongly recommended to install AviSynth+ (http://avs-plus.net/) 64-bit.

Thanks for the new version.

Please install AVs+ from GitHub (https://github.com/pinterf/AviSynthPlus/releases) with last stable version r2772, or the last test version r2915 (https://forum.doom9.org/showthread.php?p=1883630#post1883630) in the official Avs+ thread in Doom9

However, I would appreciate if someone can test this version before installing Avisynth+ , to check if I have not broken the support for the classic Avisynth 2.6.

We can install also Avs+, and make easy changes between Avs version, with the Universal Avisynth Installer (https://forum.doom9.org/showthread.php?p=1720988#post1720988) from Groucho2004

r0lZ
5th September 2019, 21:43
Indeed, I don't think I'll implement NVEnc. Too much work for a bad result.
Please install AVs+ from GitHub (https://github.com/pinterf/AviSynthPlus/releases) with last stable version r2772, or the last test version r2915 (https://forum.doom9.org/showthread.php?p=1883630#post1883630) in the official Avs+ thread in Doom9
Why ? It seems that http://avs-plus.net/ is the official home of Avisynth+. It may not have the latest beta, but it should have the latest stable version.

Also, honestly, I hate downloading binaries from GitHub. It seems that they like to hide the download. And Avisynth+ is not an exception. I have been unable to find how to download the release for Windows, if it is present. Am I blind ?

tebasuna51
5th September 2019, 22:34
Why ? It seems that http://avs-plus.net/ is the official home of Avisynth+. It may not have the latest beta, but it should have the latest stable version.

avs-plus.net is the Home page of 'ultim' the first Avs+ developper, and the owner of the Doom9 thread https://forum.doom9.org/showthread.php?p=1643908

In the first post 'ultim' accept the 'pinterf' fork like next Avs+ developper, there are some other forks (Neo in pool and in Universal Avisynth Installer from Groucho2004) but 'pinterf' versions are accepted now like officials.

You can see also the wiki http://avisynth.nl/index.php/AviSynth+, where avs-plus.net is the original project but the pinterf is the latest relase.

Also, honestly, I hate downloading binaries from GitHub. It seems that they like to hide the download. And Avisynth+ is not an exception. I have been unable to find how to download the release for Windows, if it is present. Am I blind ?

If you scroll down the page until 'Assets 6' you have:

AviSynthPlus-MT-r2772-with-vc_redist.exe 24 MB (installer + M$ libraries)
AviSynthPlus-MT-r2772.exe 4.5 MB (installer)
AvisynthPlus-r2772-MT-filesonly.7z 3 MB
AvisynthPlus-r2772-MT-filesonly.zip 5.27 MB
Source code (zip)
Source code (tar.gz)

r0lZ
6th September 2019, 09:27
'pinterf' versions are accepted now like officials.
Yes, it's what I have understood after having discovered that there are several authors. All these forks are somewhat disturbing. I will change the URL for AviSynth+ in BD3D2MK3D.
If you scroll down the page until 'Assets 6' you have: [...]
So, it's official now. I am really blind ! :p

Thanks !

Sharc
7th September 2019, 16:16
Indeed, I don't think I'll implement NVEnc. Too much work for a bad result.

Your decision of course, but I found that rigaya's NVEncC constant quality mode (somehow equivalent to x264 CRF mode) produces quite good results with my Pascal GPU, and it is said to be even better with newer Turing GPUs.
So if you should have some spare time it may be worth to do your own testing.

r0lZ
8th September 2019, 08:56
The problem is that I don't have a compatible graphic card. And honestly, I don't want to buy a new one. It will therefore be difficult to test if my implementation works correctly. So, if I decide to implement it, I will need the help of someone. You ?

And you tell me that its constant quality is comparable to CRF. OK, but with what CRF value ? For x264, the default is CRF 23, but most users think that it's not sufficient, and use CRF 20 or even lower, down to CRF 16. NVEnc's quality can be compared to CRF 20, lower or higher ?

tebasuna51
8th September 2019, 12:42
@Sharc

I think than CRF ([-12-51, default 23.0] Constant Ratefactor. While qp targets a certain quantizer, and bitrate targets a certain filesize, crf targets a certain 'quality'.) is equivalent to rigaya's NVEncC (https://github.com/rigaya/NVEnc/blob/master/NVEncC_Options.en.md#--vbr-quality-float):

Constant quality mode can be used by "--vbrhq 0 --vbr-quality <float>".

--vbr-quality <float>

Set target quality when using VBR mode. (0.0-51.0, 0 = automatic)

Maybe you can do some test replacing the encoder in the "__ENCODE_3D.cmd"
For instance if you have:
"C:\Portable\Util\BD3D2MK3D\toolset\x264_x64.exe" --output-depth 8 ^
--crf 23 --preset medium ^
--sar 1:1 --range tv --colormatrix bt709 ^
--frame-packing 3 --qpfile chapters_3D.qpfile --frames 158712 --fps 24000/1001 ^
--output "00009_3D.264" "__ENCODE_3D_MOVIE.avs"

You can change it to
"C:\Portable\Util\BD3D2MK3D\toolset\NVEncC.exe" --output-depth 8 ^
--vbrhq 0 --vbr-quality 23 --bframes 3 --ref 3 --bref-mode each --lookahead 32 --weightp --aq --direct spatial ^
--sar 1:1 --colormatrix bt709 ^
--chapter chapters_3D_delay.ogm.txt --key-on-chapter --fps 24000/1001 ^
-i "__ENCODE_3D_MOVIE.avs" -o "00009_3D.264"
Replacing the path and filenames in bold by yours and the x264 parameters with NVEncC parameters:

--crf 23 maybe can be replaced with --vbrhq 0 --vbr-quality 23
--preset medium is, more or less, equivalent to --bframes 3 --ref 3 --bref-mode each --lookahead 32 --weightp --aq --direct spatial
--range tv seems the default with --fullrange can be equivalent to --range pc
--frame-packing 3 I don't kown the equivalence
--qpfile chapters_3D.qpfile can be replaced by --chapter chapters_3D_delay.ogm.txt --key-on-chapter
--frames 158712 all frames are always the default for NVEncC or x264/x265

Sharc
8th September 2019, 12:42
The problem is that I don't have a compatible graphic card. And honestly, I don't want to buy a new one. It will therefore be difficult to test if my implementation works correctly. So, if I decide to implement it, I will need the help of someone. You ?

And you tell me that its constant quality is comparable to CRF. OK, but with what CRF value ? For x264, the default is CRF 23, but most users think that it's not sufficient, and use CRF 20 or even lower, down to CRF 16. NVEnc's quality can be compared to CRF 20, lower or higher ?
My main point was that we should perhaps not be too much discouraged by the "poor quality" reputation of NVEnc alone. The poor reputation of NVEnc is often based on reports from earlier versions and older GPU's. For more recent comparison see for example here (https://forum.doom9.org/showpost.php?p=1881067&postcount=331).
Regarding the quality factor there is no 1:1 relation with x264's CRF, but the same holds for the CRF value between x264 and x265. One has to play with the settings.
I would agree that comparing at the same file size CPU x264/x265 still have the edge, but the say 5 to 10x encoding speed increase of NVEnc (depending on CPU/GPU) is appealing and may compensate the larger filesize for the personally accepted compromise on visual quality.
Anyway, my post was not meant as a feature request. If you should however decide to add NVEnc I would be willing to try it with my Pascal GTX 1050Ti which is - unfortunatley - not the most advanced.

Sharc
8th September 2019, 12:55
@Sharc

I think than CRF ([-12-51, default 23.0] Constant Ratefactor. While qp targets a certain quantizer, and bitrate targets a certain filesize, crf targets a certain 'quality'.) is equivalent to rigaya's NVEncC (https://github.com/rigaya/NVEnc/blob/master/NVEncC_Options.en.md#--vbr-quality-float):



Maybe you can do some test replacing the encoder in the "__ENCODE_3D.cmd"
For instance if you have:


You can change it to

Replacing the path and filenames in bold by yours and the x264 parameters with NVEncC parameters:

--crf 23 maybe can be replaced with --vbrhq 0 --vbr-quality 23
--preset medium is, more or less, equivalent to --bframes 3 --ref 3 --bref-mode each --lookahead 32 --weightp --aq --direct spatial
--range tv seems the default with --fullrange can be equivalent to --range pc
--frame-packing 3 I don't kown the equivalence
--qpfile chapters_3D.qpfile can be replaced by --chapter chapters_3D_delay.ogm.txt --key-on-chapter
--frames 158712 all frames are always the default for NVEncC or x264/x265
Yes, I did my constant quality encodes with rigaya's NVEnC according to his recommendation (but outside of BD3D2MK3D) and found it to be quite good. Thanks for your hints how to modify "__ENCODE_3D.cmd", so I can try when needed.

Edit:
My NVEncC settings:
--fps 23.976 --codec h264 --profile high --level 4.1 --sar 1:1 --lookahead 24 --vbrhq 0 --vbr-quality 24.00 --max-bitrate 40000 --aq --aq-strength 6 --gop-len 24 --ref 3 --nonrefp --bframes 3 --bref-mode disabled --mv-precision Q-pel --cabac --deblock --preset quality --colormatrix bt709 --bluray

tebasuna51
8th September 2019, 17:20
As promised, here is BD3D2MK3D with support for Avisynth+ 64-bit...
Work fine for me.

And yes DGMVCSource seems faster than FRIMSource, with the same sample than before:

encoded 158712 frames, 52.37 fps, 3536.54 kb/s
Encoding finished 08/09/2019 16:17:08,78 -> 50:32,33

And AVSVersion32/64.exe are from Groucho2004, not from me.

r0lZ
9th September 2019, 09:30
--frame-packing 3 I don't kown the equivalence
The frame-packing argument is not really necessary. It adds just a flag in the video headers that informs the player of the type of 3D. It is used by my Samsung TV to display the movie in 3D without the need of selecting the 3D mode manually with the remote. But other TVs or players use the stereo-mode of the MKV header or even an extension of the file name (such as "SBS") to do the same thing. So, the utility of the --frame-packing argument depends of your player. It is better, of course, to include it anyway, but if it is not present, the worse thing that can happen is that you will have to press a button on the remote when the movie begins.
--frames 158712 all frames are always the default for NVEncC or x264/x265
This argument is not mandatory either. It is used only by x264 and x265 to display the progress % in the title bar of the command prompt window when the encoding is in progress. You can therefore safely omit it, but an important info will be missing.

r0lZ
9th September 2019, 09:44
Anyway, my post was not meant as a feature request. If you should however decide to add NVEnc I would be willing to try it with my Pascal GTX 1050Ti which is - unfortunatley - not the most advanced.
OK, I can admit that a fast encoding can be a good thing, even if the quality is a bit less good. But for me, it will be difficult to check the arguments without the possibility to actually launch the encoding. It's my main concern. But if tebasuna51 or you can help me to build and check a few command lines (corresponding roughly to the different encoding methods of x264), and then test them, I can probably add NVEnc in BD3D2MK3D.

Another method would be to just add the possibility to encode with NVEnc, with just the simpler arguments automatically added (such as the --chapter and --key-on-chapter arguments) and a large text field where the user will have to type the other arguments, related to the encoding mode and quality, under his own responsibility. I can add two buttons to save and load these arguments, so that you can easily define several presets. For me, that will be much easier, as I will have nothing to test, and the user will have to do the hard work without any help. And if some of your presets are really good, I can perhaps add them in the BD3D2MK3D code later, as hardcoded presets for the novice users.
Is it OK for you ?

r0lZ
9th September 2019, 09:46
Work fine for me.

And yes DGMVCSource seems faster than FRIMSource, with the same sample than before:
Thanks for that confirmations.
And AVSVersion32/64.exe are from Groucho2004, not from me.
I know that, but you have pointed me to the right direction.

tebasuna51
9th September 2019, 10:43
...But if tebasuna51 or you can help me to build and check a few command lines (corresponding roughly to the different encoding methods of x264), and then test them, I can probably add NVEnc in BD3D2MK3D.

My cheap (and silent without fan's) GPU, GeForce GT 1030 can decode but not encode, check here (https://developer.nvidia.com/video-encode-decode-gpu-support-matrix) the ability of GPU's to do so, but maybe I can do some test with the GTX 1060 of my son.

Make test and change parameters is very easy editing your __ENCODE_3D.cmd file befor launch __ENCODE_3D_LAUNCHER.cmd, it is not necesary add nothing to BD3D2MK3D.

sneaker_ger
9th September 2019, 12:56
To do it "right" you would need to check for compatible hardware and its features. Features differ not only by hardware but also by codec. (Not that I suggest it must be done "right". Some basic integration with letting the user handle the rest is fine.)
https://github.com/rigaya/NVEnc/blob/master/NVEncC_Options.en.md#--check-device
https://github.com/rigaya/NVEnc/blob/master/NVEncC_Options.en.md#--check-hw-int
https://github.com/rigaya/NVEnc/blob/master/NVEncC_Options.en.md#--check-features-int

For me:
nvencc64 --check-device
DeviceId #0: GeForce GTX 1660 Ti

nvencc64 --check-hw
NVEncC (x64) 4.45 (r1169) by rigaya, Aug 19 2019 11:47:02 (VC 1916/Win/avx2)
[NVENC API v9.0, CUDA 10.1]
reader: raw, avi, avs, vpy, avhw [H.264/AVC, H.265/HEVC, MPEG2, VP8, VP9, VC-1,
MPEG1, MPEG4]
Loaded nvEncodeAPI64.dll.
InitCuda: device #0.

Checking Environment Info...
NVEncC (x64) 4.45 (r1169) by rigaya, Aug 19 2019 11:47:02 (VC 1916/Win/avx2)
OS Version Windows 7 x64 (7601)
CPU Intel Core i5-2500K @ 3.30GHz [TB: 3.70GHz] (4C/4T)
GPU #0: GeForce GTX 1660 Ti (431.60)
NVENC / CUDA NVENC API 9.0, CUDA 10.1, schedule mode: auto
cuInit: Success.
cuDeviceGetCount: Success.
cuDeviceGet: ID:0.
cuDeviceComputeCapability: Success: 7.5.
NVENC capabilities: OK.
using cuda schedule mode: auto.
cuCtxCreate: Success.
cuCtxPopCurrent: Success.
cuvidInit: Success.
cuvidCtxLockCreate: Success.
InitCuda: Success.
nvEncodeAPICreateInstance(APIVer=0x70020009): Success.
NvEncOpenEncodeSessionEx(device_type=NV_ENC_DEVICE_TYPE_CUDA): Success.
nvEncDestroyEncoder: success.
Closing perf monitor...
Avaliable Codec(s)
H.264/AVC
H.265/HEVC

nvencc64 --check-features
NVEncC (x64) 4.45 (r1169) by rigaya, Aug 19 2019 11:47:02 (VC 1916/Win/avx2)
[NVENC API v9.0, CUDA 10.1]
reader: raw, avi, avs, vpy, avhw [H.264/AVC, H.265/HEVC, MPEG2, VP8, VP9, VC-1,
MPEG1, MPEG4]

Environment Info
OS : Windows 7 x64 (7601)
CPU: Intel Core i5-2500K @ 3.30GHz [TB: 3.70GHz] (4C/4T)
RAM: Used 4099 MB, Total 16337 MB
GPU: #0: GeForce GTX 1660 Ti (1536 cores, 1875 MHz)[PCIe2x16][431.60]

List of available features.
Codec: H.264/AVC
Max Bframes 4
B Ref Mode yes
RC Modes 63
Field Encoding no
MonoChrome no
FMO no
Quater-Pel MV yes
B Direct Mode yes
CABAC yes
Adaptive Transform yes
Max Temporal Layers 0
Hierarchial P Frames no
Hierarchial B Frames no
Max Level 51
Min Level 1
4:4:4 yes
Max Width 4096
Max Height 4096
Dynamic Resolution Change yes
Dynamic Bitrate Change yes
Forced constant QP yes
Dynamic RC Mode Change no
Subframe Readback yes
Constrained Encoding yes
Intra Refresh yes
Custom VBV Bufsize yes
Dynamic Slice Mode yes
Ref Pic Invalidiation yes
PreProcess no
Async Encoding yes
Max MBs 65536
Lossless yes
SAO no
Me Only Mode yes
Lookahead yes
AQ (temporal) yes
Weighted Prediction yes
Max LTR Frames 8
10bit depth no

Codec: H.265/HEVC
Max Bframes 5
B Ref Mode yes
RC Modes 63
Field Encoding no
MonoChrome no
Quater-Pel MV yes
B Direct Mode no
Max Temporal Layers 0
Hierarchial P Frames no
Hierarchial B Frames no
Max Level 62
Min Level 1
4:4:4 yes
Max Width 8192
Max Height 8192
Dynamic Resolution Change yes
Dynamic Bitrate Change yes
Forced constant QP yes
Dynamic RC Mode Change no
Subframe Readback yes
Constrained Encoding no
Intra Refresh yes
Custom VBV Bufsize yes
Dynamic Slice Mode yes
Ref Pic Invalidiation yes
PreProcess no
Async Encoding yes
Max MBs 262144
Lossless yes
SAO yes
Me Only Mode yes
Lookahead yes
AQ (temporal) yes
Weighted Prediction yes
Max LTR Frames 7
10bit depth yes

Sharc
9th September 2019, 13:32
OK, I can admit that a fast encoding can be a good thing, even if the quality is a bit less good. But for me, it will be difficult to check the arguments without the possibility to actually launch the encoding. It's my main concern. But if tebasuna51 or you can help me to build and check a few command lines (corresponding roughly to the different encoding methods of x264), and then test them, I can probably add NVEnc in BD3D2MK3D.

Another method would be to just add the possibility to encode with NVEnc, with just the simpler arguments automatically added (such as the --chapter and --key-on-chapter arguments) and a large text field where the user will have to type the other arguments, related to the encoding mode and quality, under his own responsibility. I can add two buttons to save and load these arguments, so that you can easily define several presets. For me, that will be much easier, as I will have nothing to test, and the user will have to do the hard work without any help. And if some of your presets are really good, I can perhaps add them in the BD3D2MK3D code later, as hardcoded presets for the novice users.
Is it OK for you ?
Thanks for your goodwill and proposals. It would be certainly OK for me, but unless there is a broader demand don't do anything just for me. I can get along with manual modifications as per tebasuna' hints. I am afraid that you would risk to be flooded with questions from potential users who experience some problems with their HW/GPU or are otherwise dissatisfied. You may not be able to help as you can't replicate the issues with your HW. You may just open a can of worms and you wouldn't do a favour to yourself and to your great software.
Maybe time will tell whether there is a real or broader demand for NVEnc. Thanks again. :)

tebasuna51
9th September 2019, 16:06
Using my son PC:

nvencC64 --check-features
NVEncC (x64) 4.47 (r1188) by rigaya, Sep 1 2019 06:07:40 (VC 1916/Win/avx2)
[NVENC API v9.0, CUDA 10.1]
reader: raw, avi, avs, vpy, avhw [H.264/AVC, H.265/HEVC, MPEG2, VP8, VP9, VC-1, MPEG1, MPEG4]

Environment Info
OS : Windows 10 x64 (18362)
CPU: Intel Core i5-6400 @ 2.70GHz [TB: 3.09GHz] (4C/4T)
RAM: Used 2459 MB, Total 8119 MB
GPU: #0: GeForce GTX 1060 6GB (1280 cores, 1784 MHz)[PCIe3x16][436.15]

List of available features.
Codec: H.264/AVC
Max Bframes 4
B Ref Mode yes
RC Modes 63
...
10bit depth no

Codec: H.265/HEVC
Max Bframes 0
B Ref Mode no
...
10bit depth yes

Encoding the same sample:

"NVEncC64.exe" --output-depth 8 --vbrhq 0 --vbr-quality 23 --preset quality --bframes 3 --ref 3 --bref-mode each --lookahead 32 --weightp --aq --direct spatial --sar 1:1 --colormatrix bt709 --chapter chapters_3D_delay.ogm.txt --key-on-chapter --fps 24000/1001 -i "__ENCODE_3D_MOVIE.avs" -o "00009_3D.264"
weighted prediction with B frames unsupported.
NVEncC (x64) 4.47 (r1188) by rigaya, Sep 1 2019 06:07:40 (VC 1916/Win/avx2)
OS Version Windows 10 x64 (18362)
CPU Intel Core i5-6400 @ 2.70GHz [TB: 3.29GHz] (4C/4T)
GPU #0: GeForce GTX 1060 6GB (1280 cores, 1784 MHz)[PCIe3x16][436.15]
NVENC / CUDA NVENC API 9.0, CUDA 10.1, schedule mode: auto
Input Buffers CUDA, 44 frames
Input Info Avisynth+ 2.60(yv12)->nv12 [AVX2], 1920x1080, 24000/1001 fps
Vpp Filters copyHtoD
Output Info H.264/AVC high @ Level auto
1920x1080p 1:1 23.976fps (24000/1001fps)
Encoder Preset quality
Rate Control VBRHQ
Bitrate 0 kbps (Max: 24000 kbps)
Target Quality 23.00
Initial QP I:20 P:23 B:25
VBV buf size auto
Lookahead on, 32 frames, Adaptive I, B Insert
GOP length 240 frames
B frames 3 frames [ref mode: each]
Ref frames 3 frames, LTR: off
AQ on(spatial, strength auto)
Others mv:auto cabac deblock adapt-transform:auto bdirect:spatial
encoded 158712 frames, 71.31 fps, 8429.56 kbps, 6651.93 MB
encode time 0:37:05, CPU: 60.5%, GPU: 5.9%, VE: 24.6%, GPUClock: 1674MHz, VEClock: 1505MHz
frame type IDR 671
frame type I 671, total size 110.00 MB
frame type P 42468, total size 3410.40 MB
frame type B 115573, total size 3131.54 MB

Encoding finished 09/09/2019 15:25:54,18 -> 37:08,76

Of course is fast but not to much with parameters like x264 defaults
(with x264 default weightp is mode 2 and lookahead 40).

But the bitrate obtained is near double, maybe the crf equivalence is not the same number.

Sharc
9th September 2019, 16:57
Of course is fast but not to much with parameters like x264 defaults
(with x264 default weightp is mode 2 and lookahead 40).

But the bitrate obtained is near double, maybe the crf equivalence is not the same number.
Hmmm, I guess that the encoding speed is probably reduced (halved) by the resizing script (for 3D SBS arrangement).
I think the CRF equivalence is not the same. One has to experiment. How does your NVEncC encode look visually compared with CPU x264?

r0lZ
11th September 2019, 08:39
OK, since v1.12beta2 seems to work fine, here is the official release of v1.12.

Nothing has changed, except the version number, the URL to AviSynth+, and a small change in the dialog about the avs2yuv version (to take Avisynth 64-bit into account).

v1.12beta2 (September 5, 2019)
- Support for AviSynth+ 32 and 64-bit. It is strongly recommended to install AviSynth+ 64-bit !
- Added the 64-bit version of the AviSynth filters necessary for the conversion to 3D (in toolset\plugins64bit)
- Replaced the old VSFilter 32-bit avisynth plugin with the new and much faster version from the xy-VSFilter Project
- DGMVCSource is now the default MVC decoder again because its 64-bit version is faster than FRIMSource
- Replaced Avs2YUV 0.24 (32-bit) with Avs2YUV 0.24bm2, and added Avs2YUV 64-bit 0.24bm2 (necessary to use AviSynth+ 64-bit with x265 64-bit)
- The Avisynth version is now detected with AVSVersion32/64.exe (Thanks tebasuna51!) and the Help -> Avisynth Version menu has been redesigned.

v1.12 (September 11, 2019)
- Changed the URL to the AviSynth+ download location to https://github.com/pinterf/AviSynthPlus/releases

Download: BD3D2MK3D.7z (http://download.videohelp.com/r0lZ/BD3D2AVS/BD3D2MK3D.7z)

tebasuna51
11th September 2019, 10:40
Thanks r0lZ for the new final version.

About NVEnc I think than advanced users with powerfull GPU's can make tests for fastest encodes, but this thread in not the place to compare encoders.
Also x264/x265 can be tunned with many parameters to obtain more quality or fast encodes at user taste.

@Sharc
I don't see better quality (maybe there are some) with the NVEncC encode at double bitrate, BD3D2MK3D need the avs like this and maybe is not the recommended to compare encoders.

In my test with GTX 1060 6GB (275 € now in Amazon) the GPU usage was 25% and CPU 75%, maybe can be improved. But can't encode to HEVC with B frames (the GTX 1660 Ti from sneaker_ger can do it). I think than we need know the GPU to make the specific command line.

Maybe with a GeForce RTX 2080 Ti FTW3 (1400 €) a user want a return on their investment and use it to encode.
With my GT 1030 (70 €) I need use x264/x265.

r0lZ
11th September 2019, 11:21
Thanks r0lZ for the new final version.

About NVEnc I think than advanced users with powerfull GPU's can make tests for fastest encodes, but this thread in not the place to compare encoders.
Completely agree. I don't want to spend much time in testing various encoders. It's why I prefer to just add a way for the user to use any other encoder, without limitation. He will be alone for testing it, and I will have nothing to check or debug, except perhaps fix a bug in my code. And this thread will still be devoted to BD3D2MK3D only.

And thanks for the thanks. ;-)

r0lZ
16th September 2019, 11:26
As promised, here is BD3D2MK3D with the possibility to use any encoder, by providing yourself the command line to use. This feature should be used only if you know what you are doing. Novice users should continue to encode with x264 (or x265).

Use this possibility at your own risk. BD3D2MK3D simply copies the command YOU have defined to the encoding script (after having substituted some variables). It is therefore not responsible if something goes wrong. I will NOT provide any help for your custom command lines. If necessary, contact the support of your encoder.

Also, do NOT use this thread to post your custom commands, working or not. If you want to exchange your commands with other peoples, open a new thread, and if necessary, post a link here. Thanks !

Of course, I will fix any bug related to the custom encoder, if it is dependent of my code, but don't expect more.

v1.13 (September 16, 2019)
- Added the possibility to encode the 3D movie with any encoder by providing yourself the command line to use.

Download: BD3D2MK3D.7z (http://download.videohelp.com/r0lZ/BD3D2AVS/BD3D2MK3D.7z)

bottom
26th September 2019, 19:26
I would appreciate if someone can test this version before installing Avisynth+ , to check if I have not broken the support for the classic Avisynth 2.6.

Yep, seems to be broken:

Was using BD3D2MK3D from v0.7* till v1.11 without any issues;
after updating to latest v1.13 the 3D encoding script fails
because Avisynth was "not found" ...

=> I'm on Win10, 64bit, but have only installed Avisynth "classic" so far


ps
Does anyone know a Howto article
for the manual installation of Avisynth+?
(The executable installers tend to simply ignore and override any existing installations/settings)

tebasuna51
27th September 2019, 00:06
@bottom

The message: Avisynth was "not found" ... was before install Avisynth+?

Please run AVSMeter (https://forum.doom9.org/showthread.php?t=174797) avsinfo and put the output.

About manual installation of AviSynth read Universal Avisynth Installer (http://forum.doom9.org/showthread.php?t=172124)

bottom
27th September 2019, 07:07
@tebasuna51

just did what r0lZ asked for:
I've tried to use the new BD3D2MK3D version before installing Avisynth+

(The classic Avisynth is (still) properly installed
and BD3D2MK3D v1.11 working fine with it)

r0lZ
27th September 2019, 09:02
Indeed, the new version uses AVSVersion32.exe to check if avisynth 32-bit is installed. Previously, BD3D2MK3D did only a basic check to see if AviSynth.dll is present in the system32 or SysWOW64 directory. So, if the current check fails, it's probably due to a limitation or bug in AVSVersion32. It is used also by the About -> AviSynth Version menu to show the version number of the installed 32 and 64-bit AviSynth.

Can you open a Command Prompt window and launch AVSVersion32.exe, located in the BD3D2MK3D\toolset folder (you can simply drag and drop it from the BD3D2MK3D\toolset folder over the Command Prompt window and hit Enter). Then, copy and paste here the output of the command. Also, can you tell me if you have installed AviSynth classic with its installer, or manually ? In the second case, it is possible that it's the cause of the problem. Thanks!

In the meantime, I will uninstall AviSynth+ and re-install the classic version, to see if I can reproduce the problem.

r0lZ
27th September 2019, 09:09
ps
Does anyone know a Howto article
for the manual installation of Avisynth+?
(The executable installers tend to simply ignore and override any existing installations/settings)
IIRC, when you install it, the installer offers to select only one of the two versions (32 or 64-bit). I suppose that if you select only the 64-bit version, it will leave the classic version untouched.

It is not possible to install two different versions at the same time for the same CPU (32/64-bit), but if you want to be able to return easily to the clessic version AND you want to check also the 32-bit avisynth+, use the universal installer, as suggested by tebasuna51. (Honestly, I have not used it myself, so I can't guarantee that it works well.)

r0lZ
27th September 2019, 10:10
OK, I did some tests.

There was a little bug in my code, but that bug should not have any impact, except on some warning messages. When the 32 or 64-bit version of AviSynth is not installed, the message in the About -> AviSynth Version dialog was wrong. Instead of "AviSynth **-bit is not installed", the message was "This version of AviSynth **-bit is not supported by BD3D2MK3D. Use it at your own risk." And I suppose (but I have not tested) that the first warning dialog appearing on startup when no AviSynth at all is found was not shown. But anyway, that bug is not related to the problem you have reported. In the worst case, it was possible to generate a project without knowing that it cannot be launched. Of course, I have fixed that bug, but I don't think I'll release a new version just for that little problem. (The dialogs below have been generated after the bug fix.)

That being said, here is a description of my tests.

I have first uninstalled AviSynth+. The uninstaller has correctly restored my old AviSynth classic, and it has been correctly recognized by BD3D2MK3D.

Then, I have uninstalled AviSynth classic. No problem, but of course, BD3D2MK3D cannot work. However, the dialog telling that AviSynth is required was not shown at startup, due to the bug explained above.

Finally, I have re-installed the classic version. There is now only a warning in the status bar and the log window explaining that AviSynth+ 64-bit is recommended on a 64-bit system. And the About -> AviSynth Version menu shows this:

---------------------------
BD3D2MK3D
---------------------------
AviSynth 32 Bit: AviSynth 2.60, build:Mar 31 2015 [16:38:54] (2.6.0.6)
This is the last stable version of the "classic" AviSynth, not developed any more.
There is nothing to update.

AviSynth 64 Bit: n/a
AviSynth 64-bit is not installed.

Please note that AviSynth+ 64-bit is much faster than the currently installed version of AviSynth 32-bit. It is strongly recommended to install at least the 64-bit version of AviSynth+.

Visit download pages for AviSynth classic and AviSynth+ ?
---------------------------
Yes No
---------------------------

So, it seems that AVSVersion32.exe does its job correctly, and if it doesn't recognise your installation, it's probably because it has been installed manually and that something is missing or wrong. I suggest to re-install AviSynth classic with its installer, and everything should be fine.

Finally, I have installed AviSynth+ 64-bit ONLY, and as I suspected, the classic installation has not been modified:

---------------------------
BD3D2MK3D
---------------------------
AviSynth 32 Bit: AviSynth 2.60, build:Mar 31 2015 [16:38:54] (2.6.0.6)
This is the last stable version of the "classic" AviSynth, not developed any more.
There is nothing to update.

AviSynth 64 Bit: AviSynth+ 0.1 (r2772, MT, x86_64) (0.1.0.0)
AviSynth+ 64-bit is supported by BD3D2MK3D.

Visit download pages for AviSynth classic and AviSynth+ ?
---------------------------
Yes No
---------------------------


So, it seems that everything works fine. Please let me know if you find the origin of the problem. Perhaps your classic AviSynth.dll is not in Windows\SysWOW64 (where it should be installed on a 64-bit system) ?

tebasuna51
27th September 2019, 13:32
There was a little bug in my code, but that bug should not have any impact, except on some warning messages.

Confirmed but without operative problems.

So, it seems that AVSVersion32.exe does its job correctly, and if it doesn't recognise your installation, it's probably because it has been installed manually and that something is missing or wrong.

Yes, for that I request AVSMeter avsinfo, than can detect installation problems.

Install AviSynth (on W 64 bits) manually have two passes:

1) Copy avisynth.dll (and devil.dll) in the appropiate system folder
- the 64 bit version in %WINDIR%\System32
- the 32 bit version in %WINDIR%\SysWow64

2) Add/modify some windows registry keys.
to see the detail please read setavs.bat from Universal Avisynth Installer

If you run setavs.bat the installed versions are show and eleven options are presented. Here are the options and the AvsInfo32/64 output after executed each option:

Installed Avisynth version(s):

32 Bit: AviSynth+ 0.1 (r2772, MT, i386) (0.1.0.0)
64 Bit: AviSynth+ 0.1 (r2772, MT, x86_64) (0.1.0.0)

Select the Avisynth version you want to install (or uninstall):
setavs options AVSVersion32/64 output
-------------------------------------------------------- ------------------------------------------------------------------------
1 = Avisynth 2.5.8 (official release) 32 Bit: Avisynth 2.5.8.5
2 = Avisynth 2.6.0 (official release) 32 Bit: AviSynth 2.60, build:Mar 31 2015 [16:38:54] (2.6.0.6)
3 = Avisynth 2.6.0 (built with Intel C/C++ compiler) 32 Bit: AviSynth 2.60 (ICL10) (2.6.0.6)
4 = Avisynth 2.6.1 (Alpha) 32 Bit: AviSynth 2.61, build:May 17 2016 [16:06:18] VC2008Exp (2.6.1.0)
5 = Avisynth 2.6.0 (SEt's multi-threaded build) 32 Bit: AviSynth 2.60, build:Feb 20 2015 [03:16:45] (2.6.0.5)
6 = Avisynth+ 0.1.0 (x86, r2772) 32 Bit: AviSynth+ 0.1 (r2772, MT, i386) (0.1.0.0)
7 = Avisynth+ 0.1.0 (x64, r2772) 64 Bit: AviSynth+ 0.1 (r2772, MT, x86_64) (0.1.0.0)
8 = Avisynth Neo 0.1.0 (x86, r2822) 32 Bit: AviSynth Neo 0.1 (r2822, Neo, i386) (0.1.0.0)
9 = Avisynth Neo 0.1.0 (x64, r2822) 64 Bit: AviSynth Neo 0.1 (r2822, Neo, x86_64) (0.1.0.0)

10 = Uninstall Avisynth x86 32 Bit: n/a
11 = Uninstall Avisynth x64 64 Bit: n/a


All versions must run with BD3D2MK3D.

Note: the setavs.bat from Universal Avisynth Installer must be configured to define the autoload plugin directory of each version, but is not important for BD3D2MK3D because all plugins are loaded explicitely.

bottom
27th September 2019, 17:13
Thanks for the elaborate replies and the tips for AvisynthPlus!!!

Really don't want to complain, just wanted to inform about my experience …

Thus here is (hopefully) all the info you have requested (and more):

• First of all sorry, the orginal error I got is:
(...)
avs [error]: failed to load avisynth
x264 [error]: could not open input file `__ENCODE_3D_MOVIE.avs'

• Here's the AVS-script created by BD3D2MK3D v1.13, which is mentioned in the error above, maybe it's helpful:
(...)
#LoadPlugin("F:\Video\BD3D2MK3D\toolset\plugins64bit\FRIMSource.dll")
LoadPlugin("F:\Video\BD3D2MK3D\toolset\plugins64bit\DGMVCDecode.dll")

##LoadPlugin(F:\Video\BD3D2MK3D\toolset\plugins64bit\VSFilter.dll")
#LoadPlugin("F:\Video\BD3D2MK3D\toolset\plugins64bit\SupTitle.dll")

# Load the two video streams (197643 frames per stream)
#interleaved = FRIMSource("mvc", "00053.track_4113.264", "00053.track_4114.mvc", layout = "alt", num_frames = 197643, cache = 2, platform = "sw")
interleaved = DGMVCSource("00053.track_4113.264", "00053.track_4114.mvc", view = 0, frames = 197643, mode = "sw")
# Current base view: left eye.
# The views are in the common order: AVC stream = left view, MVC stream = right view.
left = SelectEven(interleaved)
right = SelectOdd(interleaved)

# Build Side-by-Side stream
StackHorizontal(HorizontalReduceBy2(Left), HorizontalReduceBy2(Right))
AssumeFPS("ntsc_film")

# Hardcode subtitles
##VobSub(".sub")
#SupTitle(".sup")

# Return the 3D clip.
Return(last)#.Info()


• The Avisynth info dialog of BD3D2MK3D v1.13 showed up exactly as r0lZ has noted. The version shown is the same as displayed by AVSVersion32 ...

• Here's the output of „AVSVersion32“:
C:\Windows\System32>F:\Video\BD3D2MK3D\toolset\AVSVersion32.exe
32 Bit: AviSynth 2.60, build:Sep 18 2013 [17:36:36] (2.6.0.4)

• My old Avisynth 2.6.0 was (I think) installed „manually“, which means:
Both a pre-build batch- and reg-file were executed
for which only the directory of the DLLs had to be entered manually …
(Maybe there was something wrong or missing with this process,
but didn't have any problems until v1.13.)


Give me a note if you want further details ...
... or otherwise just tell me to install Avisynth+

:)

tebasuna51
28th September 2019, 10:21
Thanks for the elaborate replies and the tips for AvisynthPlus!!!

My replies and soft recommended are valid for all AviSynth versions, not only Avs+

...
LoadPlugin("F:\Video\BD3D2MK3D\toolset\plugins64bit\DGMVCDecode.dll")
...
BD3D2MK3D think than you have a Avisynth 64 bits installed.

It's a bug, because BD3D2MK3D 1.13 make a .avs for 64 bits when Avs+64 is not installed.

I can reproduce the bug, with:
32 Bit: AviSynth 2.60, build:Mar 31 2015 [16:38:54] (2.6.0.6)
64 Bit: n/a

BD3D2MK3D 1.13 make a .avs loading plugins from plugins64bit folder and
a __ENCODE_3D.cmd with directly x264_x64.exe

r0lZ
28th September 2019, 11:09
Damn ! Of course. It's due to the bug I have reported previously. When BD3D2MK3D checks your versions of AviSynth, it doesn't understand correctly that no 64-bit version is installed. Although it "thinks" that you have an unsupported 64-bit version installed, it tries to use it anyway, and it loads the 64-bit plugins. Therefore, I was wrong when I wrote that the bug should have no impact on the creation of the project.

I will release a new version as soon as possible...

Thanks for pointing this out, tebasuna51 !

r0lZ
29th September 2019, 09:25
• First of all sorry, the orginal error I got is:
(...)
avs [error]: failed to load avisynth
x264 [error]: could not open input file `__ENCODE_3D_MOVIE.avs'

Yes, sorry for that. As explained above, the problem is that BD3D2MK3D thinks that you have a 64-bit version of AviSynth installed on your computer (although it doesn't recognise AviSynth+ 64-bit). Therefore, it generates the AVS script fo 64-bit, and that produces the error you got.

I will immediately release a new version without that bug. In the meantime, if you want to encode your project without regenerating it with the new version, you can install AviSynth+ 64-bit (and optionally also 32-bit). Then, relaunch __ENVODE_3D_LAUNCHER.cmd, and everything should work fine.

Thanks anyway for the bug report. You have found an important bug !

r0lZ
29th September 2019, 09:29
And here is the fix.

v1.14 (September 29, 2019)
- Fixed the bug introduced in v1.12: The AVS script was generated for AviSynth 64-bit when no 64-bit version of AviSynth was installed.

Download: BD3D2MK3D.7z (http://download.videohelp.com/r0lZ/BD3D2AVS/BD3D2MK3D.7z)

bottom
29th September 2019, 11:40
Thank you for the Quick-Fix!!!

... and it was mainly my fault for posting the wrong error message:
Avisynth was found, but couldn't be started / loaded correctly.

Thus I sent you all in the wrong direction ... sorry, again!

marsdust
5th October 2019, 21:12
With AviSynth+ installed can't seem to encode with x265 with v1.14. Selecting from menu still shows x264 options in the GUI? The generated job is x264 regardless also.

r0lZ
5th October 2019, 23:50
Damn ! You're right ! I'll fix that tomorrow...

r0lZ
6th October 2019, 07:32
OK, here is the fix. As always, that was a stupid bug ! Thanks for pointing it out, marsdust, and welcome to the Doom9 forums.


v1.15 (October 6, 2019)
- Important bug introduced in v1.12 fixed: The option of the Settings -> AVC/HEVC Encoder to encode in HEVC with x265 did not change the encoder.
- Renamed the __CUSTOM_* files generated when the user has defined a custom encoding command to _CUSTOM_* (with only a single leading "_") so that they appear in the directory after the regular files to encode with x264 or x265.

Download: BD3D2MK3D.7z (http://download.videohelp.com/r0lZ/BD3D2AVS/BD3D2MK3D.7z)

marsdust
6th October 2019, 13:16
That's fantastic. Just tested encoding x265 with Full SBS and working wonderfully. Though had to change the display width manually to 1920x1080 in MakeMKVToolNix but might be my TV not liking 3840x1080. Thanks again!

frank
6th October 2019, 15:30
And where you look your encodes? On PC only?
3D stereo is not certified for HEVC / x265.
Is there any TV or beamer that can show 3D SBS/TAB encoded in HEVC?

I only know Google Cardboard V2 apps use HEVC or V8 webm.

r0lZ
7th October 2019, 08:54
That's fantastic. Just tested encoding x265 with Full SBS and working wonderfully. Though had to change the display width manually to 1920x1080 in MakeMKVToolNix but might be my TV not liking 3840x1080. Thanks again!
Thanks for your enthusiasm !

You can change the aspect ratio to "16:9 for both" in Settings -> Full-SBS/T&B aspect ratio", so you don't have to modify manually the display width (another way to specify the AR). Some TVs (for example LG) require that value.

r0lZ
7th October 2019, 09:04
And where you look your encodes? On PC only?
3D stereo is not certified for HEVC / x265.
Is there any TV or beamer that can show 3D SBS/TAB encoded in HEVC?

I only know Google Cardboard V2 apps use HEVC or V8 webm.
I think you are partially right. It is true that a 3D movie is supposed to be encoded in AVC (as well as with other constraints like the 16:9 aspect ratio). Also, x265 has no --frame-packing argument, and that means that many TVs will not recognize automatically the 3D format of the movie, and you will have to use the 3D button of your remote when the playback starts. But I think that most UHD TVs support HEVC, for 2D and therefore also for 3D. I don't think they want to prohibit playing a 3D HEVC movie just because it's not the standard.

Of course, for a better compatibility and for the ease of use, x264 is the preferred encoder, and it is and will stay the default in BD3D2MK3D.

Anyway, your remark is interesting. Someone can confirm if his TV supports 3D HEVC, or not ?

marsdust
7th October 2019, 20:03
I'm backing up my 3D collection to NAS and save time in the long run not getting out my chair and flipping discs. Many are straight backups via MakeMKV and thus can use Framepacking (preferred) but take up a lot of space.

So just re-encode some of the titles that would not play that much to reduce space, get good compression results with x265 (tolerate 12fps encode times). So since already breaking a spec may as well go full SBS and take advantage of the efficiency of the encoder at 3840x1080 as not constrained by the shiny disc spec.

Plasma TV detects the 3D signal fine and so does the DLP Projector. So although the Framepacked version is better (40GB) on the projector (100ft) the 8GB Full SBS is 95% there. And 3D films are generally clean anyway. Half SBS is not as good on the Projector but appreciate smaller screens would not matter so much and x264 would be fine.

Using a Vero 4K+ (testing the Framepacked beta) and also a $25 x96 mini plays them fine also (the encodes, as x96 does not do Framepacked).

konikpolny
15th October 2019, 22:20
Hi r0lZ,
why does BD3D2MK3D create a project with 2 different files eg.
00098.track_4608.Eng.2D.sup and
00098.track_4608.Eng.sup
for the same 2D subtitles? I always thought they are identical but I noticed their filesize is different.

staina
16th October 2019, 08:55
With the help of tsMuxer I'm yourself created ISO files with main 3D movie and selected audio and subtitles streams and now I'm found out with the help of BD3D2MK3D that the some that's how created files have assigned other 3D-plane than original 3D Bluray.

I can apply these created ISO files in tsMuxer and set for subtitles streams correct 3D-plane and recreate new ISO files and or I have to for creation apply original 3D Bluray?

For example:

Original Bluray in BD3D2MK3D

1. subtitle stream ENG - 3D-Planes 1
2. subtitle stream JPN - 3D-Planes 6
3. subtitle stream TUR - 3D-Planes 2
4. subtitle stream RUS - 3D-Planes 3
5. subtitle stream POL - 3D-Planes 4

Original Bluray in tsMuxer

1. subtitle stream ENG - 3D-Planes 1
2. subtitle stream JPN - 3D-Planes 2
3. subtitle stream TUR - 3D-Planes 3
4. subtitle stream RUS - 3D-Planes 4
5. subtitle stream POL - 3D-Planes 5

Remux select subtitle stream 1,3,5

1. subtitle stream ENG - 3D-Planes 1
2. subtitle stream TUR - 3D-Planes 3
3. subtitle stream POL - 3D-Planes 5

Correct remux select subtitle stream 1,3,5

1. subtitle stream ENG - 3D-Planes 1
2. subtitle stream TUR - 3D-Planes 2
3. subtitle stream POL - 3D-Planes 4

Thank for answer Staina

r0lZ
16th October 2019, 09:58
Hi r0lZ,
why does BD3D2MK3D create a project with 2 different files eg.
00098.track_4608.Eng.2D.sup and
00098.track_4608.Eng.sup
for the same 2D subtitles? I always thought they are identical but I noticed their filesize is different.
The 2D stream must be converted to XML/PNG by BDSub2Sub before the conversion to 3D. Unfortunately, sometimes, BDSup2Sub creates bad PNG frames for some subtitles. (They are either completely transparent, or their size is 0x0 !). But I have noticed that converting the original subtitle stream from BD SUP to BD SUP has the effect of solving that issue. Therefore, to convert the stream to 3D, BD3D2MK3D begins by a (theoretically unnecessary) conversion to 2D and create the stream with the .2D.sup extension.

Also, sometimes a single subtitle is split in several identical parts in the original stream, and so close together that they appear as a single subtitle to the spectator (known as "multiple ODS"). BDSup2Sub has an option to concatenate these double subtitles together, to form a single subtitle. Therefore, unnecessary subtitles are removed during that first conversion to 2D.

For that reason, previously BD3D2MK3D muxed the converted stream in the final MKV, as it was theoretically free of unnecessary double subtitles and invisible black images. But I have noticed later that sometimes, BDSup2Sub misses some subtitles, and therefore the converted stream can be somewhat incomplete. Therefore, now, BD3D2MK3D muxes the original 2D stream (without the .2D extension) in the MKV, and uses the converted 2D stream for the conversion to 3D only.

It is also correct that the filesize changes when the stream is converted, even if you don't change the format. Of course, it's normal if BDSup2Sub has concatenated some double subtitles, but it seems that there is another bug here, as if you convert again the .2D.sub stream to SUB, you will notice again a filesize change. I'm not sure why, and it it's important, but now, I think that the less you convert is the better. Unfortunately, it is necessary to convert several times the original stream to convert it to 3D.

r0lZ
16th October 2019, 10:18
I can apply these created ISO files in tsMuxer and set for subtitles streams correct 3D-plane and recreate new ISO files and or I have to for creation apply original 3D Bluray?
I'm not sure I understand what you mean, and that question is related to tsMuxer and only indirectly to BD3D2MK3D, so IMO you should have posted your question in the tsMuxer forum. But here is my answer anyway.

I'm sure that you can use BD3D2MK3D to know the exact assignment of the 3D-streams, and I'm also sure that they are often wrong in tsMuxer. I don't know if using the correct assignments from BD3D2MK3D to remux the streams with tsMuxer is sufficient to solve the tsMuxer bug. I hope so, but I use tsMuxer only to demux things, and therefore I don't know its bug when it muxes.

Therefore, I suggest to do a test yourself. Remux a 3D BD that has the wrong 3D-Planes assignments in tsMuxer, but use the correct values from BD3D2MK3D. Then, use tsMuxer and BD3D2MK3D to compare the 3D-Planes list of the newly remuxed BD, and it they are again different, you will know that tsMuxer has the same bug when it muxes.

In that case, you may have to use its (bad) 3D-Planes assignments, and with some luck, the final remuxed BD will be correct. Honestly, I'm not sure, but I think that it may again store the 3D-Plane numbers in the MPLS without paying attention to the order of the streams, and if it does that, the demux bug will be undone by the remux bug ! Of course, if that works, you will have to remux the same number of subtitle streams, in the same order than in the original BD, and with the same 3D-Plane numbers.

konikpolny
16th October 2019, 21:31
... Therefore, now, BD3D2MK3D muxes the original 2D stream (without the .2D extension) in the MKV, and uses the converted 2D stream for the conversion to 3D only.


OK, thanks r0lZ,
so I understand that it's the regular, not the 2D one, is best for OCR conversion to text.

r0lZ
16th October 2019, 23:07
so I understand that it's the regular, not the 2D one, is best for OCR conversion to text.
If you don't care about double subtitles, probably yes.

staina
17th October 2019, 10:21
I'm not sure I understand what you mean, and that question is related to tsMuxer and only indirectly to BD3D2MK3D, so IMO you should have posted your question in the tsMuxer forum. But here is my answer anyway.

I'm sure that you can use BD3D2MK3D to know the exact assignment of the 3D-streams, and I'm also sure that they are often wrong in tsMuxer. I don't know if using the correct assignments from BD3D2MK3D to remux the streams with tsMuxer is sufficient to solve the tsMuxer bug. I hope so, but I use tsMuxer only to demux things, and therefore I don't know its bug when it muxes.

Therefore, I suggest to do a test yourself. Remux a 3D BD that has the wrong 3D-Planes assignments in tsMuxer, but use the correct values from BD3D2MK3D. Then, use tsMuxer and BD3D2MK3D to compare the 3D-Planes list of the newly remuxed BD, and it they are again different, you will know that tsMuxer has the same bug when it muxes.

In that case, you may have to use its (bad) 3D-Planes assignments, and with some luck, the final remuxed BD will be correct. Honestly, I'm not sure, but I think that it may again store the 3D-Plane numbers in the MPLS without paying attention to the order of the streams, and if it does that, the demux bug will be undone by the remux bug ! Of course, if that works, you will have to remux the same number of subtitle streams, in the same order than in the original BD, and with the same 3D-Plane numbers.

Change 3D-plane in tsMuxer does work, Shall I tested.

What I don't know is that a if can use already remuxovaný ISO file with main function in that is only several subtitles streams and me here change 3D-plane to to those that this remux does not contain, but in original him contained. Or I have to always use original Bluray, because after remux with at 3D-plane, that is not used clear all data e.g . about depth display subtitles.

Where there are saved data to single 3D-plane? Is that a video stream, CLPI file or MPLS file.

r0lZ
18th October 2019, 10:19
Where there are saved data to single 3D-plane? Is that a video stream, CLPI file or MPLS file.
Again, it is difficult to understand your English. If I understand correctly, you want to know where are the original 3D-Planes.

The 3D-Planes (officially called Offset Sequences, or OFS) are in the MVC video stream (the "dependent stream" specific to the 3D movies). You can extract the OFS files from the MVC stream with, for example, MVCPlanes2OFS.exe, included with BD3D2MK3D, but as far as I know, there is currently no way to attach new 3D-Planes to the MVC stream, or to edit them easily.

If you remux the video without re-encoding it (for example to simply add a new audio or subtitle stream), the 3D-Planes are preserved, and if their numbers are assigned correctly to the right subtitle streams (in the MPLS) by the remuxer, then everything should be fine. But if you re-encode the video, the 3D-Planes are lost. That means that the reencoded 3D-BD25 usually found on the internet have lost the depth of their subtitles.

r0lZ
21st October 2019, 11:59
Someone has noticed that BD3D2MK3D is unable to start when AVSVersion**.exe crashes due to a bad installation of Avisynth. I have added some safeguards to avoid this problem. Now, if AVSVersion crashes, BD3D2MK3D assumes that the 32 or 64 bit version of Avisynth that has caused the crash is not installed, and issues an error message, but it should now be able to start. (Difficult to check, as my Avisynths are properly installed.)

There is also a new tool to modify the Y positions of all subtitles of a stream, useful when you import an external stream to align it with the original subtitles and minimize the risk of subtitles entering in foreground objects. It can also be used if you want to move a subtitle stream without 3D depth in the horizontal black bar of a movie shot in cinemascope.

v1.16 (October 21, 2019)
- Workaround for a crash of AVSVersion**.exe when Avisynth is not properly installed that prevented BD3D2MK3D to start.
- Added Subtitle Tools -> Move XML/PNG Subtitles Vertically, to allow you to easily move your subtitles in the black bar of a Cinemascope movie or align them with another subtitle stream.

Download: BD3D2MK3D.7z (http://download.videohelp.com/r0lZ/BD3D2AVS/BD3D2MK3D.7z)

Groucho2004
21st October 2019, 12:17
Someone has noticed that BD3D2MK3D is unable to start when AVSVersion**.exe crashes due to a bad installation of Avisynth.Define "crashes". Is there any error message?

TVI
22nd October 2019, 08:37
Hello,

I wonder if somebody could assist me with a problem.

I am trying to convert a 3D Blu Ray using BD3D2MK3D (The Adventures of Tin Tin). The MKV file plays fine without any issues but when I convert it to SBS using BD3D2MK3D the video/audio is slightly out of synch. I've converted quite a few 3D blu rays and this is the first time I've ever had this problem.

Any help would be most appreciated!

Thanks.

r0lZ
22nd October 2019, 11:05
Define "crashes". Is there any error message?
No, not directly. BD3D2MK3D prints this in its log:
32 Bit: Avisynth 2.5.8.5 child killed: unknown signal.

Since the error message begins with "32 Bit: Avisynth" and this happens before BD3D2MK3D has had a chance to open its main window, I'm sure it's when BD3D2MK3D verifies if at least one version of Avisynth is installed with AVSVersion.

The new version catches now the call to AVSVersion, and when it crashes, it issues a warning telling that Avisynth is not properly installed, then it continues normally.

The original error has been reported here (https://forum.videohelp.com/threads/394592-BD3D2MK3D-v1-15?highlight=BD3D2MK3D), but without much information.

r0lZ
22nd October 2019, 11:33
Hello,

I wonder if somebody could assist me with a problem.

I am trying to convert a 3D Blu Ray using BD3D2MK3D (The Adventures of Tin Tin). The MKV file plays fine without any issues but when I convert it to SBS using BD3D2MK3D the video/audio is slightly out of synch. I've converted quite a few 3D blu rays and this is the first time I've ever had this problem.

Any help would be most appreciated!

Thanks.
Hum, strange. I have converted Tintin without problem, and I have never seen a report for this kind of problem, for any movie.

Have you used the option "Add X seconds of black at the beginning of the video" in the last tab ? Personally, I use it almost always without problem, but if you did it, you may have to retry without that option.

Also, can you verify if there is a delay in the original MKV (as produced by MakeMKV) with MediaInfo ? Usually, I don't use MakeMKV to convert my movies, and it is possible that a delay in the original MKV is not correctly taken into account by BD3D2MK3D. (I will try here anyway.)

If your stream has a delay, or if you can figure out the duration of the offset yourself, you can fix it manually by editing the __MUX_3D_OPTIONS.json file. In the Audio stream(s) section, change the line just after the --sync line with 0:500, where the number in red is the offset to apply, in milliseconds. (Positive numbers mean move the audio later.) Then, launch __MUX_3D.cmd to remux the file (without re-encoding of course).

Sorry, I can't help much more.

TVI
22nd October 2019, 12:36
Hum, strange. I have converted Tintin without problem, and I have never seen a report for this kind of problem, for any movie.

Have you used the option "Add X seconds of black at the beginning of the video" in the last tab ? Personally, I use it almost always without problem, but if you did it, you may have to retry without that option.

Also, can you verify if there is a delay in the original MKV (as produced by MakeMKV) with MediaInfo ? Usually, I don't use MakeMKV to convert my movies, and it is possible that a delay in the original MKV is not correctly taken into account by BD3D2MK3D. (I will try here anyway.)

If your stream has a delay, or if you can figure out the duration of the offset yourself, you can fix it manually by editing the __MUX_3D_OPTIONS.json file. In the Audio stream(s) section, change the line just after the --sync line with 0:500, where the number in red is the offset to apply, in milliseconds. (Positive numbers mean move the audio later.) Then, launch __MUX_3D.cmd to remux the file (without re-encoding of course).

Sorry, I can't help much more.


Fantastic, thanks r0lZ.

I'll have a tinker and let you know how I get on.

r0lZ
22nd October 2019, 15:20
Fantastic, thanks r0lZ.

I'll have a tinker and let you know how I get on.
Just verified, and indeed, there is something that doesn't work well when the audio delays are retrieved from a MKV file. It's due to slight changes in the output of MkvInfo. I have already fixed the bug, and the next version should work as intended, but I need some time to fix another bug.

Anyway, there is something strange. Normally, there is no audio delay in an original BD, or it is very short (5ms or so, not enough to be noticeable). So, I still wonder why you have that problem. Can you confirm that there is an audio delay with MediaInfo ? If it detects one, then that will confirm that the culprit is the bug I have just fixed.

tebasuna51
22nd October 2019, 22:52
No, not directly. BD3D2MK3D prints this in its log:
32 Bit: Avisynth 2.5.8.5 child killed: unknown signal.
Avisynth 2.5.8.5 is a old but valid version.
There are a problem with AVSVersion32.exe?
For me work fine:

AVSVersion32
32 Bit: Avisynth 2.5.8.5

There are a new Avs+ version (https://forum.doom9.org/showthread.php?p=1888102#post1888102), with:
AVSVersion32
32 Bit: AviSynth+ 3.4 (r2923, 3.4, i386) (3.4.0.0)
AVSVersion64
64 Bit: AviSynth+ 3.4 (r2923, 3.4, x86_64) (3.4.0.0)

r0lZ
22nd October 2019, 23:21
Avisynth 2.5.8.5 is a old but valid version.
There are a problem with AVSVersion32.exe?

I don't think it's a problem with Avisynth 2.4.8.5, but I suspect that it is not installed correctly. Not sure why, but anyway, AVSVersion crashes, and prevents BD3D2MK3D to start, or even display an error message. As I wrote above, I have modified the code so that that will not happen any more, but when AVSVersion crashes, BD23D2MK3D will assume that the 32 or 64 bit version is not installed, and issue an error message.

I think it is better to re-install Avisynth, and it's probably the perfect occasion to switch to Avisynth+. Basically, it's what the next version of BD3D2MK3D will suggest. I will release it tomorrow...

r0lZ
23rd October 2019, 08:59
Minor update, with mainly the update of the x265 and mkvtoolnix exes, and the fix for the audio delays when opening a MKV file made with MakeMKV with audio delays (rare).

v1.17 (October 23, 2019)
- Fixed the bug of the audio delays not taken into account when using a MKV file make with MkvMerge as input.
- Added some definitions specific to UHD BD so that the option to show the 2D content the BD works with an UHD BD.
- Updated x265 to the latest stable version (v3.2+5)
- Updated Mkvtoolnix to the latest version (v38.0.0 'The Silent Type')

Download: BD3D2MK3D.7z (http://download.videohelp.com/r0lZ/BD3D2AVS/BD3D2MK3D.7z)

TVI
23rd October 2019, 21:03
Minor update, with mainly the update of the x265 and mkvtoolnix exes, and the fix for the audio delays when opening a MKV file made with MakeMKV with audio delays (rare).

Download: BD3D2MK3D.7z (http://download.videohelp.com/r0lZ/BD3D2AVS/BD3D2MK3D.7z)

Thanks r0lz I'll have another go at converting Tin Tin with this update.

So you know, Mediainfo did confirm a 1s 1ms "delay relative to video" on the MakeMKV file.

r0lZ
24th October 2019, 08:00
So you know, Mediainfo did confirm a 1s 1ms "delay relative to video" on the MakeMKV file.
OK, that confirms my impression. I'm sure the fix will solve that problem.

staina
24th October 2019, 09:19
Again, it is difficult to understand your English. If I understand correctly, you want to know where are the original 3D-Planes.

The 3D-Planes (officially called Offset Sequences, or OFS) are in the MVC video stream (the "dependent stream" specific to the 3D movies). You can extract the OFS files from the MVC stream with, for example, MVCPlanes2OFS.exe, included with BD3D2MK3D, but as far as I know, there is currently no way to attach new 3D-Planes to the MVC stream, or to edit them easily.

If you remux the video without re-encoding it (for example to simply add a new audio or subtitle stream), the 3D-Planes are preserved, and if their numbers are assigned correctly to the right subtitle streams (in the MPLS) by the remuxer, then everything should be fine. But if you re-encode the video, the 3D-Planes are lost. That means that the reencoded 3D-BD25 usually found on the internet have lost the depth of their subtitles.

English is not OKs sorry.

If then is do nothing but remux (no encode) so 3D - plane stay keep all and you unused for subtitles streams in MVC stream. If isn't executed reencode video streams (H.264 and MVC) are all 3D - plane from original 3D Bluray anytime usable.

Thank you Staina

r0lZ
25th October 2019, 09:52
Sorry. I can't understand. I can only repeat:

The 3D-planes are in the MVC stream. If you remux the video, all of them are preserved. If you re-encode the video, they are lost. A 3D-Plane doesn't need to be used by a subtitle stream to exist in the MVC stream (but of course, it's usually the case in original BDs). Several different subtitle streams can use the same 3D-Plane (although it's not frequent in commercial 3DBDs). So, if you remove some subtitle streams, their 3D-Streams will probably be unused, but they are still present in the original MVC video stream. And if you want to mux a new subtitle stream with the original video, you can use any existing 3D-plane, even if it is also used by another subtitle stream.

For an external subtitle stream, I suggest to use the 3D-Plane that is defined originally for the language that is the most similar to the language of your additional stream (with the size of the subtitles in the two streams as similar as possible) to minimize the risk of collisions with the foreground objects.

tarrega
29th October 2019, 19:24
Hey Everyone,
when I execute BD3D2MK3D.exe on my Windows 10 Home PC the Console opens with the message:

Error sourcing /Tcl/work/BD3D2MK3D/src/BD3D2MK3D.tcl: C:\WINDOWS
The system cannot find the path specified.
() 1 %

I used BD3d2MK3D successfully last year, back then a GUI started where I could load a mkv file.
I do not understand this error message. A google search for that
file name (BD3D2MK3D.tcl) gives 0 results. I also don't find that file on my system.

I assume it has something to do with Avisynth but I don't know that program.

I have the latest Version 1.17.
I have Avisynth+ v2772 (64bit) installed.
I have Avisynth 2.58 installed.

Any help would be very much appreciated.

r0lZ
30th October 2019, 11:38
Welcome to the Doom9 forums, tarrega

The error you have is very strange. It seems that it is caused by a missing file, probably located in the Windows directory. Where is Windows located in your system ? Usually, it's in C:\windows, and BD3D2MK3D uses the environment variable %WINDIR% to discover it. Maybe there is something wrong here.

Please open a command prompt window and type this:
echo "%WINDIR%"
On most systems, it replies this:
"C:\Windows"
Let me know what it has replied for you.

Also, the only thing that BD3D2MK3D searches now in the Windows directory is if .NET v4 or greater is installed (as it's necessary to hardcode the subtitles on the video). So, please open this directory in the File Explorer:
C:\Windows\Microsoft.NET\Framework\
And let me know if there is at least one folder beginning with "v4." And if it's not the case, please install Microsoft .NET V4 (https://dotnet.microsoft.com/download/dotnet-framework) (currently, v4.8 is the latest version).

Also, in the big white window where the error message is shown, after the prompt () 1 %, type this:
IsNetV4Installed
Normally, you should see "true" if .NET v4 is already installed, or "false" otherwise. But if that command produces the error message you have noticed, that will confirm my suspicion that it's the .NET checking function that is the culprit, and I should be able to fix the bug.

Also, be sure to use the latest version of BD3D2MK3D (v1.17). I have recently fixed another bug that can also explain the problem.

tarrega
30th October 2019, 15:20
Hi r0lZ,
thanks for the reply.
1.) echo "%WINDIR%" returns "C:\Windows"
2.) In "C:\Windows\Microsoft.NET\Framework" there is a folder "v4.0.30319"
3.) IsNetV4Installed: Error sourcing /Tcl/work/BD3D2MK3D/src/BD3D2MK3D.tcl: C:\WINDOWS
The system cannot find the path specified.
() 1 % IsNetV4Installed
C:\WINDOWS
The system cannot find the path specified.
(BD3D2MK3D) 2 %
4.) I used version 1.17

So it is the .NET checking function?

r0lZ
31st October 2019, 10:42
So it is the .NET checking function?
It seems yes, but I don't understand why. I have exactly the same configuration, and the function works correctly here. I supposed that the function crashes on you due to some differences with the "normal" windows installation, but it's not the case, and I'm puzzled.

Anyway, I will try to modify it, and I'll contact you by PM to give you a beta to test. Perhaps I will not be able to discover that .NET v4 is indeed installed, but at least the program should start. In the worst case, BD3D2MK3D will not let you hardcode the subtitles on the video (option in last tab). Do you need it ?

Please be patient. I have a RV right now, but I'll do the fix as soon as possible...

tarrega
31st October 2019, 15:12
Anyway, I will try to modify it, and I'll contact you by PM to give you a beta to test. Perhaps I will not be able to discover that .NET v4 is indeed installed, but at least the program should start. In the worst case, BD3D2MK3D will not let you hardcode the subtitles on the video (option in last tab). Do you need it ?

Please be patient. I have a RV right now, but I'll do the fix as soon as possible...

No I don't need it. Thank you for your work I'll be patient :).

mi3gai4rui4
3rd November 2019, 20:49
Just getting back to trying to get a 1920x2160 interleaved video.

tebasuna51's suggestion:

Maybe:

left = SelectEven(interleaved).AssumeFieldBased()
right = SelectOdd(interleaved).AssumeFieldBased()

# Build combined Row-interlaced image
Interleave(left, right).Weave()

It did produce a 1920x2160 video with the correct aspect ratio.
MPC-HC + madVR seem to play it back correctly, but the left and right eyes seem to swap back and forth rapidly (not sure if every frame). If I pause at different arbitrary points, sometimes left eye is on top, sometimes right eye.

Any ideas as to how to fix that?

Thanks in advance :-)

thxoptimizer
6th November 2019, 11:41
Hi,

In the last version, I don't see any BD3D2MK3D.cfg file ==> "BD3D2MK3D/BD3D2MK3D.cfg": no such file or directory

Thanks

von Suppé
6th November 2019, 12:15
Hi r0lZ,


For the sake of your tool, I don't know if tsMuxer can have certain issues with demuxing BD iso's. I never encountered them, for 3D BD anyways.

This (de)muxer tool is rather dated, and you know filler56789 is busy with it in his tsMuxer Open Source thread.

Don't know if you were already aware of it, but as for purely demuxing, maybe a thought to look into this thread?: https://forum.doom9.org/showthread.php?t=177053

r0lZ
7th November 2019, 00:09
In the last version, I don't see any BD3D2MK3D.cfg file ==> "BD3D2MK3D/BD3D2MK3D.cfg": no such file or directory
Well, I have just tested without the cfg file, and the program works perfectly. The cfg file is created when BD3D2MK3D is used for the first time, and doesn't issue an error message if the file doesn't exist. It has never been released with the program itself.

Have you installed BD3D2MK3D in a directory where you have full write access ? The CFG file is normally written in the installation directory. When exactly do you see the error message ?

thxoptimizer
7th November 2019, 07:44
https://nsa40.casimages.com/img/2019/11/07/19110707462094060.jpg

r0lZ
7th November 2019, 11:09
OK, I think I know why it fails. It's probably due to the accented character in the path ("vidéos"). I have already encountered a similar problem. Try to move the entire BD3D2MK3D folder elsewhere, or rename vidéos to videos, and I guess that everything will be fine.
In the meantime, I'll do some tests to see if I can fix that annoyance here...

[EDIT] I did the test here with exactly the same installation folder as you, and I have no problem. It's not the accented character that causes the problem. I'm puzzled.

Try to download again the program, and re-install it. Perhaps in another folder anyway. Who knows ?

thxoptimizer
7th November 2019, 22:22
:thanks: even if you tried something similar to my case, the cause was probably because of the name of the path (I would also say the accent).

The software is now located at A:\3D_MKV and everything is OK

r0lZ
7th November 2019, 23:21
OK, thanks for the confirmation. Can I know if you have a French edition of Windows 10 ? That could also explain the issue. My native language is also French, but I prefer to work with Windows in English, and it's probably the only difference with your case.

thxoptimizer
10th November 2019, 11:46
Can I know if you have a French edition of Windows 10 ?
Yes, Windows10 in French.

videoh
14th November 2019, 20:10
BD3D2MK3D is in violation of the licensing terms for DGMVCSource. BD3D2MK3D is not licensed to use DGMVCSource. Please correct this immediately by removing it from your distribution.

r0lZ
14th November 2019, 23:48
BD3D2MK3D is in violation of the licensing terms for DGMVCSource. BD3D2MK3D is not licensed to use DGMVCSource. Please correct this immediately by removing it from your distribution.
The explanation of this message can be found here (https://forum.videohelp.com/threads/392807-Converting-2D-PGS-subtitles-to-3D-HalfSBS-PGS-subtitles/page2#post2564674).

videoh
15th November 2019, 00:33
Your explanation is irrelevant. You are violating my license and I demand that you remove my software. I do not grant you permission to use it. I will re-post this notification and demand after every post you ever make until you remove my software from your distribution.

You have FRIM. You do not need to rip me off.

confessor
17th November 2019, 13:28
Hello. What could be the problem?
Encoding movie in 3D
Movie: m
Encoding started 17.11.2019 16:27:15,36

H:\mkv\temp\m\00000>"H:\Downloads\BD3D2MK3D\BD3D2MK3D\toolset\x264_x64.exe" --output-depth 8 --crf 23 --preset slower --bluray-compat --profile high --level 4.1 --open-gop --keyint 24 --slices 4 --colormatrix bt709 --colorprim bt709 --transfer bt709 --b-pyramid strict --vbv-bufsize 30000 --vbv-maxrate 40000 --aud --sar 1:1 --range tv --colormatrix bt709 --frame-packing 3 --qpfile chapters_3D.qpfile --frames 203743 --fps 24000/1001 --output "00000_3D.264" "__ENCODE_3D_MOVIE.avs"
avs [error]: `__ENCODE_3D_MOVIE.avs' didn't return a video clip
x264 [error]: could not open input file `__ENCODE_3D_MOVIE.avs'
Encoding finished 17.11.2019 16:27:15,42

H:\mkv\temp\m\00000>"H:\Downloads\BD3D2MK3D\BD3D2MK3D\toolset\mkvmerge.exe" @__MUX_3D_OPTIONS.json | "H:\Downloads\BD3D2MK3D\BD3D2MK3D\toolset\tee.exe" "00000_3D.mkvmerge.log"
mkvmerge v38.0.0 ('The Silent Type') 32-bit
Error: The type of file '00000_3D.264' could not be recognized.
Sorry if discussed earlier.

r0lZ
17th November 2019, 23:29
Welcome to the Doom9 forums, confessor.

Well, I don't know what could be the cause of the problem, but obviously the anisynth script doesn't work as it should. Please copy here the content of the __ENCODE_3D_MOVIE.avs file. With that info, I hope I'll be able to help...

confessor
18th November 2019, 14:41
Thanks in advance.

# to convert "I:\BDMV\PLAYLIST\00000.mpls"
# (referencing the M2TS/SSIF files 00000)
# to 3D Side-by-Side.
# Movie title: m
#
# Source MPLS information: Blu-ray 3D.
# MPLS file: 00000.mpls
# Video : Und AVC, 1080p, 23.976 fps, left-eye
# Video : Und MVC, 1080p, 23.976 fps, right-eye (32 3D-Planes)
# Audio : Rus DTS, Multi-channel, 48 Khz
# Subtitle: PGS, 3D-plane: undefined
#LoadPlugin("H:\Downloads\BD3D2MK3D\BD3D2MK3D\toolset\plugins64bit\FRIMSource.dll")
LoadPlugin("H:\Downloads\BD3D2MK3D\BD3D2MK3D\toolset\plugins64bit\DGMVCDecode.dll")

##LoadPlugin(H:\Downloads\BD3D2MK3D\BD3D2MK3D\toolset\plugins64bit\VSFilter.dll")
#LoadPlugin("H:\Downloads\BD3D2MK3D\BD3D2MK3D\toolset\plugins64bit\SupTitle.dll")

# Load the two video streams (203743 frames per stream)
#interleaved = FRIMSource("mvc", "00000.track_4113.264", "00000.track_4114.mvc", layout = "alt", num_frames = 203743, cache = 2, platform = "")
interleaved = DGMVCSource("00000.track_4113.264", "00000.track_4114.mvc", view = 0, frames = 203743, mode = "auto")
# Current base view: left eye.
# The views are in the common order: AVC stream = left view, MVC stream = right view.
left = SelectEven(interleaved)
right = SelectOdd(interleaved)

# Hardcode subtitles
##left = VobSub(left, "subtitle_to_hardcode_left.sub")
##right = VobSub(right, "subtitle_to_hardcode_right.sub")
#left = SupTitle(left, "subtitle_to_hardcode_left.sup")
#right = SupTitle(right, "subtitle_to_hardcode_right.sup")

# Build Side-by-Side stream
StackHorizontal(Left, Right)
AssumeFPS("ntsc_film")

# Return the 3D clip.
Return(last)#.Info()

r0lZ
19th November 2019, 10:47
Hum, it seems that the script is correct.

Anyway, try to remove the last line, with Return(last)#.Info(). In this case, it is useless. Then relaunch the encoding. I doubt that that will resolve the problem, but who know ?

Also, please verify that Avisynth is installed correctly. Use Help -> Avisynth version. You should see a dialog offering to visit the download pages the the two avisynth supported by BD3D2MK3D. Click on that dialog to be sure that it is active, and press Control-C on your keyboard, to copy its content to the clipboard. Paste it here.
Perhaps you could also try to re-install Avisynth+ anyway. Honestly, other than that, I don't see any reason for the error you have reported.

von Suppé
19th November 2019, 12:09
Also, please verify that Avisynth is installed correctly.
Hi r0lZ,

I recently installed AviSynth+. Can it be that there are (backward) compatibility issues as to the older Avisynth versions being used by other programs?
For example, after launching BDRebuilder, I got a "warning" that Avisynth was not installed and had to reinstall Avisynth 2.60 before being able to continue.
BTW by doing that, I would not know if I maybe have scr*wed up the + version?

Sharc
19th November 2019, 12:39
Just a sidenote:
I am using Groucho's Avisynth Installer (https://forum.doom9.org/showthread.php?p=1720988#post1720988) to switch between avisynth versions easily, e.g. switch back and forth between avisynth 2.6.0 (for BD RB) and avisynth+ for other purpose. You may want to try it.

r0lZ
19th November 2019, 13:49
Yes, that might be a good idea. Personally, I have never noticed problems with the new Avisynth+, and all 32-bit plugins I use are compatible (at least all plugins used by BD3D2MK3D). But I cannot be sure that a problem cannot occur with other plugins.

Also, note that it is possible to install only the 64-bit version of Avisynth+ (just untick the 32-bit version in the GUI of the official installer), and your original installation of Avisynth 2.6 will not be modified. BD3D2MK3D uses preferably Avisynth+ 64-bit when it is available, and old 32-bit only programs will continue to use the classic Avisynth 32-bit.
(If you have installed both versions of Avisynth+ with its official installer, and you kept the option to keep the old "classic" files and plugins, you can just uninstall + to restore the classic version, and then install + again, but this time, be sure to untick the 32-bit option. Not sure if that works with Groucho's installer.)

r0lZ
19th November 2019, 13:58
Hello. What could be the problem?
I have just updated the x264 exes to the latest version, and for whatever reason, my antivirus software (Bitdefender free) has quarantined several files from the toolset folder. I have added a new check when BD3D2MK3D starts to ensure that all required files are present in the toolset, but the new version will be available only in a week or so. I don't think the problem you are facing can be caused by false positive virus detections, but it's possible. So, verify the quarantine of your antivirus software, and restore any exe pertaining to BD3D2MK3D if necessary (or re-install BD3D2MK3D completely), then relaunch the __ENCODE_3D_LAUNCHER.cmd file of your project. Please let me know if it's sufficient to solve the problem.

von Suppé
20th November 2019, 10:29
I am using Groucho's Avisynth Installer (https://forum.doom9.org/showthread.php?p=1720988#post1720988)...
You may want to try it.

I just tried. Installing the 64bit + version next to the 32 bit v2.60 seemed to go fine. However after firing up BD3D2MK3D, I got a warning that Avisynth + wasn't installed correctly.

...note that it is possible to install only the 64-bit version of Avisynth+ (just untick the 32-bit version in the GUI of the official installer)...

This did the trick. Things are fine again.

Thanks guys.

Groucho2004
20th November 2019, 12:21
Not sure if that works with Groucho's installer.You can install any combination of 32 bit / 64 bit Avisynth.

r0lZ
20th November 2019, 12:33
I know. But I'm was not sure it can restore the original classic version after having installed another 32-bit version, if you decide to uninstall it. The official installer can, but I have not used your installer, so I can't confirm that it backs the original installation up when it overwrites it. Is it the case ?

Groucho2004
20th November 2019, 12:43
I know. But I'm was not sure it can restore the original classic version after having installed another 32-bit version, if you decide to uninstall it. The official installer can, but I have not used your installer, so I can't confirm that it backs the original installation up when it overwrites it. Is it the case ?The Universal Installer has no backup function. It just installs the available versions from its repository. You can however customise the various versions in the repo since each has its own plugin directory and you can specify custom plugin directories (this only works with AVS+).

Mix and match is not recommended - either use the official installer or the Universal Installer.

confessor
20th November 2019, 15:24
Hi r0lZ.

No, this does not solve the problem. I also have Bitdefender and I noticed that it worked the first time you started your program. After that, I added the entire BD3D2MK3D folder to the antivirus exclusions. All program tools are in place.
P.S.
_ENCODE_2D_LAUNCHER.cmd starts and does its job, unlike __ENCODE_3D_LAUNCHER.cmd. Maybe this will lead you to some thoughts. :)

r0lZ
21st November 2019, 12:41
P.S.
_ENCODE_2D_LAUNCHER.cmd starts and does its job, unlike __ENCODE_3D_LAUNCHER.cmd. Maybe this will lead you to some thoughts. :)
Well, the 2D encoding doesn't require avisynth. It re-encodes directly the main view with x264. So, your finding confirms only that it's the avisynth script used to convert the two views to SBS that doesn't work well.
Have you tried to install or re-install Avisynth+ 64-bit ? Maybe there is something wrong with your installation.

confessor
21st November 2019, 17:32
Have you tried to install or re-install Avisynth+ 64-bit ?
Yes, I tried. It does not help.

tebasuna51
21st November 2019, 20:27
confessor I recommend the Groucho tool:

AVSMeter (https://forum.doom9.org/showthread.php?p=1814761#post1814761) avsinfo

to check problems in AviSynth installation.

Groucho2004
21st November 2019, 20:34
confessor I recommend the Groucho tool:

AVSMeter (https://forum.doom9.org/showthread.php?p=1814761#post1814761) avsinfo

to check problems in AviSynth installation.Alternatively, for people who prefer GUIs - Avisynth Info Tool (https://forum.doom9.org/showthread.php?t=176079)

von Suppé
21st November 2019, 21:50
Alternatively, for people who prefer GUIs - Avisynth Info Tool (https://forum.doom9.org/showthread.php?t=176079)
Thanks for this link, Groucho :)

r0lZ
22nd November 2019, 11:25
Yes, I tried. It does not help.
Damn! I'm puzzled.

Please try this. Download AVSmeter and copy AVSMeter64.exe from the archive to your project folder (in the directory containing all files generated by BD3D2MK3D).

Then, use Notepad or any text editor to modify the __ENCODE_3D.cmd file, and add the blue lines below:


@echo off
set path=path\to\BD3D2MK3D\toolset\plugins64bit;%path%
echo Encoding movie in 3D
echo Movie: movie title

echo %path%
D:\Desktop2\AVSMeter\AVSMeter64.exe __ENCODE_3D_MOVIE.avs
pause
exit

echo Encoding started %date% %time%
@echo on
[...]

Save and double-click it to launch the encoding. You should see rapidly the "Press any key to continue . . ." prompt. Do NOT press a key. Just copy whatever you see in the command prompt window and paste it here. I hope that will give me sufficient information to locate the problem.

(BTW, to copy something from the command prompt window, you may have to right-click it and select "Mark" from the popup menu, then press Control-A to select everything and press enter to copy it to the clipboard.)

r0lZ
22nd November 2019, 11:37
Also, if you have an Intel CPU, please try this:
Edit __ENCODE_3D_MOVIE.avs and change the mode parameter of the DGMVCSource command from "auto" to "sw", like this:

interleaved = DGMVCSource("00000.track_4113.264", "00000.track_4114.mvc", view = 0, frames = 203743, mode = "sw")

Relaunch the encoding (of course, after having removed the blue lines from the __ENCODE_3D.cmd file).
Does it work ?

If it works, that means that the libmfxhw32.dll file installed with your Intel drivers doesn't work. Try to update the intel drivers to the latest version. Or you can just change Settings -> MVC Decoder -> Hardware Acceleration from Auto to Disabled. The encoding will be slightly slower, but anyway, the speed gain is minimal.

confessor
22nd November 2019, 16:28
echo %path%
D:\Desktop2\AVSMeter\AVSMeter64.exe __ENCODE_3D_MOVIE.avs
pause
Here I need to specify my path to the AVSMeter64.exe file?

r0lZ, tebasuna51, Groucho2004
thanks for trying to help. :)

r0lZ
23rd November 2019, 11:05
Oops, no sorry. Since AVSMeter64.exe is in the project directory, you don't need to specify any path. I have copied the script I've used here, and I forgot to remove the path (in yellow in your post). So, just add this, and it should work:

echo %path%
AVSMeter64.exe __ENCODE_3D_MOVIE.avs
pause
exit

confessor
23rd November 2019, 11:34
So, just add this, and it should work
AVSMeter 2.9.7 (x64), 2012-2019, Groucho2004
AviSynth+ 0.1 (r2772, MT, x86_64) (0.1.0.0)

Script did not return a video clip:
H:\mkv\temp\m\00000\__ENCODE_3D_MOVIE.avs
Для продолжения нажмите любую клавишу . . .

Or you can just change Settings -> MVC Decoder -> Hardware Acceleration from Auto to Disabled.
Before writing here, I tried to find the answer myself and found this message http://forum.doom9.net/showthread.php?p=1879725#post1879725
I tried these recommendations, but this did not lead to a positive result.

Groucho2004
23rd November 2019, 20:10
AVSMeter 2.9.7 (x64), 2012-2019, Groucho2004
AviSynth+ 0.1 (r2772, MT, x86_64) (0.1.0.0)

Script did not return a video clip:
H:\mkv\temp\m\00000\__ENCODE_3D_MOVIE.avs
Для продолжения нажмите любую клавишу . . .


Before writing here, I tried to find the answer myself and found this message http://forum.doom9.net/showthread.php?p=1879725#post1879725
I tried these recommendations, but this did not lead to a positive result.
Post the complete script ("__ENCODE_3D_MOVIE.avs").

confessor
23rd November 2019, 22:07
Sorry. I thought that you need to make sure that the Avisynth+ is installed correctly and polled by the program. Here is the full report.

Encoding movie in 3D
Movie: m
H:\Downloads\BD3D2MK3D\BD3D2MK3D\toolset\plugins64bit;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Users\confessor\AppData\Local\Microsoft\WindowsApps;

AVSMeter 2.9.7 (x64), 2012-2019, Groucho2004
AviSynth+ 0.1 (r2772, MT, x86_64) (0.1.0.0)

Script did not return a video clip:
H:\mkv\temp\m\00000\__ENCODE_3D_MOVIE.avs
Для продолжения нажмите любую клавишу . . .

r0lZ
24th November 2019, 00:51
Post the complete script ("__ENCODE_3D_MOVIE.avs").
Confessor has posted it here (https://forum.doom9.org/showthread.php?p=1890669#post1890669). It's exactly the usual script generated by BD3D2MK3D. Nothing abnormal. So, it must be an installation problem, but what ?

r0lZ
24th November 2019, 10:13
Sorry. I thought that you need to make sure that the Avisynth+ is installed correctly and polled by the program. Here is the full report.
Yes, it's what I am trying to do, but I want to verify also if the necessary avisynth plugins are available.

Have you tried to replace "auto" with "sw", as explained here (https://forum.doom9.org/showpost.php?p=1891049&postcount=1771) ? Since you have Intel directories in your PATH variable, I guess you have an Intel CPU that supports theoretically the hardware acceleration. But the library provided with the Intel drivers may fail. It's why I would like to know if the software mode works.

Also, after having changed auto to sw, please try this. Edit __ENCODE_3D.cmd and add the toolset folder to the %PATH% environment variable in the second line, like this:

set path=H:\Downloads\BD3D2MK3D\BD3D2MK3D\toolset;H:\Downloads\BD3D2MK3D\BD3D2MK3D\toolset\plugins64bit;%path%

Does that work ?

confessor
24th November 2019, 12:02
Have you tried to replace "auto" with "sw", as explained here (https://forum.doom9.org/showpost.php?p=1891049&postcount=1771) ?

Edit __ENCODE_3D.cmd and add the toolset folder to the %PATH% environment variable in the second line, like this:

set path=H:\Downloads\BD3D2MK3D\BD3D2MK3D\toolset;H:\Downloads\BD3D2MK3D\BD3D2MK3D\toolset\plugins64bit;%path%

Does that work ?
No, no change - the same error (The type of file '00000_3D.264' could not be recognized). :(

r0lZ
25th November 2019, 07:27
And what about the software mode explained here (https://forum.doom9.org/showpost.php?p=1891049&postcount=1771) ?

confessor
25th November 2019, 14:39
And what about the software mode explained here (https://forum.doom9.org/showpost.php?p=1891049&postcount=1771) ?
Without results.

thxoptimizer
6th December 2019, 17:53
Hello r0lZ,

I have a serious problem with my Angry Birds ISO (which worked perfectly fine when I played it as a disc !!!!EDIT!!! I just checked in 2D to read on my computer and in fact there is a glitch at this time).

1st conversion 12/08 (so I don't remember with which version of BD3D2MK3D but the version at this moment).
Everything is fine at the beginning...after a while I notice something strange when there is some motion (when I look with VLC, it seems that the right frame is coming before the left frame)
And around 52'01 ==> doesn't work at all
https://nsa40.casimages.com/img/2019/12/06/mini_191206055528799947.jpg (https://www.casimages.com/i/191206055528799947.jpg.html)


2nd conversion today = 06/12 (v1.17 +AviSynthPlus-r1576).
Same symptoms and also not usable after 52'01 (even if after the image is completely black istead of pixelised)
https://nsa40.casimages.com/img/2019/12/06/mini_191206055528529445.jpg (https://www.casimages.com/i/191206055528529445.jpg.html)

Of course I had some errors in the b1st step (before launching __ENCODE_3D_LAUNCHER.cmd) :
https://nsa40.casimages.com/img/2019/12/06/mini_191206055527600238.jpg (https://www.casimages.com/i/191206055527600238.jpg.html)

I can provide you logs if it helps.
Thanks.

PS : it's the 1st time I watch a complete movie since I discovered your software but I tried to convert another one successfully

EDIT : after writing all this, in fact maybe you can't do anything...except if you find a way that a simple glitch in the original movie does not impact all the end of the conversion?

r0lZ
7th December 2019, 10:52
EDIT : after writing all this, in fact maybe you can't do anything...except if you find a way that a simple glitch in the original movie does not impact all the end of the conversion?
Correct. Unfortunately, there is nothing that can be used to guess how many frames are missing, and therefore, the missing frames are simply skipped. Since during the glitch, there is a big chance that more frames are damaged for the left edge than for the right eye, or the opposite, the synchronisation of the two views (and probably also of the audio streams) cannot be maintained.
Sorry, but you need a good source to process it with BD3D2MK3D.

BTW, perhaps you could try to decrypt the BD with MakeMKV. Perhaps it will be smart enough to remove an equal number of frames in the two video streams, but honestly, I don't think so.

seplant
17th December 2019, 03:31
A little help please. I am able to run BD3D2MK3D and create the required TEMP files. I have AviSynthPlus 3.4.0 installed on my 64-bit laptop, and I have run AVSInfoTool to verify the installation, but I get the following when I try to run the _ENCODE_3D.cmd file:

----------------------------------------------

Encoding movie in 3D
Movie: Justice League 3D
Encoding started Mon 12/16/2019 21:22:34.69

N:\Blu-ray\3D\Temp\Justice League 3D\MKV3D>"C:\Users\Scott\Downloads\BD3D2MK3D\toolset\x264_x64.exe" --output-depth 8 --crf 23 --preset medium --sar 1:1 --range tv --colormatrix bt709 --frame-packing 3 --qpfile chapters_3D.qpfile --frames 172690 --fps 24000/1001 --output "MKV3D_3D.264" "__ENCODE_3D_MOVIE.avs"

Return on error: error code -1, pipeline_decode.cpp 91


Return on error: error code -1, pipeline_decode.cpp 531

avs [error]: DGMVCSource: cannot open the source file or Intel Media SDK init failed
(__ENCODE_3D_MOVIE.avs, line 22)
x264 [error]: could not open input file `__ENCODE_3D_MOVIE.avs'
Encoding finished Mon 12/16/2019 21:22:40.41

N:\Blu-ray\3D\Temp\Justice League 3D\MKV3D>"C:\Users\Scott\Downloads\BD3D2MK3D\toolset\mkvmerge.exe" @__MUX_3D_OPTIONS.json | "C:\Users\Scott\Downloads\BD3D2MK3D\toolset\tee.exe" "MKV3D_3D.mkvmerge.log"
mkvmerge v38.0.0 ('The Silent Type') 32-bit
Error: The type of file 'MKV3D_3D.264' could not be recognized.

Press any key to continue . . .

----------------------------------------------

Any recommendations would be much appreciated.

r0lZ
17th December 2019, 20:59
Any recommendations would be much appreciated.
Try to change the MVC decoder with Settings -> MVC Decoder -> Use FRIMSource and disable the hardware acceleration with Settings -> MVC Decoder -> Hardware Acceleration -> Disabled.

seplant
19th December 2019, 12:27
Try to change the MVC decoder with Settings -> MVC Decoder -> Use FRIMSource and disable the hardware acceleration with Settings -> MVC Decoder -> Hardware Acceleration -> Disabled.

This worked! Thanks!!!