Log in

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


Pages : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 [31] 32 33 34 35 36

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.