Log in

View Full Version : Guide to convert BD 3D to 3D Left+Right Stereoscopic and Anaglyph


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 37 38 39 40 41 42 43 44 45 46

Nico8583
17th December 2013, 00:23
The Haali Media Splitter (http://haali.su/mkv/) may be necessary too, I don't know exactly.

It was the solution for me, with Haali Media Splitter it's working !
Thanks to all for your help ;)

Thalyn
17th December 2013, 03:18
I think we're going to need a new solution soon. I've come across my first disc which flat-out refuses to transcode properly with the existing tools: The Croods 3D (region B).

No matter what I try, I cannot get the MCV frame to decode properly regardless of what version of ssifSource, DirectShowMVCSource or CoreAVCDecoder I use. There's always periodic errors towards the left of the frame though they're inconsistent with exact timing and appearance. Now, to be fair, I can't put this down entirely to the decoders - it's possible it just isn't extracting from the disc properly (MakeMKV v1.8.7) but I have no way to check that without a decoder of some sort (and I don't have the space at present to do a YUV decode with FRIM).

I have, however, tried extracting it with two different drives and confirmed that the original BluRay stream plays correctly through PowerDVD. The original is fine and both drives produced the same results.

Fortunately the error shows up very quickly (during the first 10 seconds) and will also show when using VirtualDub to check my script. Unfortunately I don't know how to use that information to my advantage as I haven't really done any programming since the downfall of Borland's Turbo Pascal.

HWK
17th December 2013, 03:28
I think we're going to need a new solution soon. I've come across my first disc which flat-out refuses to transcode properly with the existing tools: The Croods 3D (region B).

No matter what I try, I cannot get the MCV frame to decode properly regardless of what version of ssifSource, DirectShowMVCSource or CoreAVCDecoder I use. There's always periodic errors towards the left of the frame though they're inconsistent with exact timing and appearance. Now, to be fair, I can't put this down entirely to the decoders - it's possible it just isn't extracting from the disc properly (MakeMKV v1.8.7) but I have no way to check that without a decoder of some sort (and I don't have the space at present to do a YUV decode with FRIM).

I have, however, tried extracting it with two different drives and confirmed that the original BluRay stream plays correctly through PowerDVD. The original is fine and both drives produced the same results.

Fortunately the error shows up very quickly (during the first 10 seconds) and will also show when using VirtualDub to check my script. Unfortunately I don't know how to use that information to my advantage as I haven't really done any programming since the downfall of Borland's Turbo Pascal.

I will conduct test and will let you know, test also include YUV extraction.

It might take few days for results to appear.

Thalyn
17th December 2013, 07:17
Much appreciated, HWK. Hopefully you can find something I couldn't.

r0lZ
17th December 2013, 10:08
There's always periodic errors towards the left of the frame though they're inconsistent with exact timing and appearance.
It's exactly the description of the CoreAVCDecoder bug, already discussed here (http://forum.doom9.org/showthread.php?p=1646880#post1646880). Unfortunately, as far as I know, all versions of the decoder have that bug. According to Nico8583 (http://forum.doom9.org/showthread.php?p=1656012#post1656012), the BioMVC decoder works fine and doesn't hav that bug. Now, I hope we will be able to integrate it in our process. I have already made some tests, but without success so far. Nico8583, have you tried?

Thalyn
17th December 2013, 13:24
Well bugger me. I read that post when it was new, but completely forgot about it.

Grabbed BioMVC to have a play around with it. It seems to be based on H264StereoSource, which would explain why it's slower. I wonder if it also suffers from the same issue with the last 80 or so frames...?

*ed: Well, the last 80 frames are of only minor consequence when the few that do render are green and it crashes. Hindsight I shouldn't have expected any differently as H264StereoSource hasn't worked for most of my DreamWorks titles.

Nico8583
17th December 2013, 18:50
It's exactly the description of the CoreAVCDecoder bug, already discussed here (http://forum.doom9.org/showthread.php?p=1646880#post1646880). Unfortunately, as far as I know, all versions of the decoder have that bug. According to Nico8583 (http://forum.doom9.org/showthread.php?p=1656012#post1656012), the BioMVC decoder works fine and doesn't hav that bug. Now, I hope we will be able to integrate it in our process. I have already made some tests, but without success so far. Nico8583, have you tried?
I'm trying to encode with BioMVC and TotalCode Pro, encoding starts but after a random time it crash. I don't know why, I've upgrade my RAM to 8Go without success, I've made changes with my cooling without success too. Perhaps a config problem with BioMVC.set ? I don't understand all settings in this file...

r0lZ
17th December 2013, 19:06
Hum, damn! It seems that all decoders are somewhat buggy. I guess the Intel decoder is our last resort. Is it possible to compile it as an avisynth plugin?

Nico8583
17th December 2013, 19:53
Hum, damn! It seems that all decoders are somewhat buggy. I guess the Intel decoder is our last resort. Is it possible to compile it as an avisynth plugin?
I've talked with Frencher, Intel decoder made artefacts on Ice Age 3 or similar like DirectShowMVCSource :(
What is your problem with BioMVC ?

frencher
17th December 2013, 21:08
Hum, damn! It seems that all decoders are somewhat buggy. I guess the Intel decoder is our last resort. Is it possible to compile it as an avisynth plugin?

The advantage of Intel MVC codec is that the source code is available and open so for me it is more than feasible only faudrai it that someone may be interested motivated and fix some small bog

r0lZ
18th December 2013, 07:45
What is your problem with BioMVC ?
This:
..., encoding starts but after a random time it crash.
Also, currently, I don't know how to use it from an avisynth script.

Nico8583
18th December 2013, 12:51
I've launched a new encode with 2 pass, currently is at 40% of the first pass and no problem, perhaps problem comes at second pass :confused:

Edit : 50% of the first pass and allways OK...

Edit 2 : 60% and allways OK...

Edit 1 : First pass is finished and immediately when second pass starts the app crash... so I've relaunched with one pass and encoding works, I don't know why :confused:

Nico8583
18th December 2013, 22:23
I've tested with NetBlender 3D Demo and same problem, after the first pass and when second pass starts, app crash but if I do a one pass encoding, no problem...

r0lZ
18th December 2013, 22:53
I remember I have had a similar problem with 2-pass encoding. IIRC, it was due to the number of frames to encode. Try to specift --frames N in the command line, and see if it crashes.

Nico8583
18th December 2013, 23:14
Thanks for the information but I can't specify frames number in TotalCode Pro :-/

HWK
19th December 2013, 01:43
I think we're going to need a new solution soon. I've come across my first disc which flat-out refuses to transcode properly with the existing tools: The Croods 3D (region B).

No matter what I try, I cannot get the MCV frame to decode properly regardless of what version of ssifSource, DirectShowMVCSource or CoreAVCDecoder I use. There's always periodic errors towards the left of the frame though they're inconsistent with exact timing and appearance. Now, to be fair, I can't put this down entirely to the decoders - it's possible it just isn't extracting from the disc properly (MakeMKV v1.8.7) but I have no way to check that without a decoder of some sort (and I don't have the space at present to do a YUV decode with FRIM).

I have, however, tried extracting it with two different drives and confirmed that the original BluRay stream plays correctly through PowerDVD. The original is fine and both drives produced the same results.

Fortunately the error shows up very quickly (during the first 10 seconds) and will also show when using VirtualDub to check my script. Unfortunately I don't know how to use that information to my advantage as I haven't really done any programming since the downfall of Borland's Turbo Pascal.

I will conduct test and will let you know, test also include YUV extraction.

It might take few days for results to appear.

I ran test and confirm your findings about ability to decode dependent view causes problems, similar to if you had video and you sliced it into small blocks.

Good news is FRIMDECODE doesn't have this issue when decoding, but YUV file are quite large.

Thalyn
19th December 2013, 06:29
Well, that's good news about FRIM. Now we just need a better way to use it without an intermediate YUV file.

I've tried using pipes but I don't quite understand how they work. I'm telling FRIMDecode to output the right frame to \\.\pipe\right.yuv and then getting my AVISynth script to read the right frame back from the same, but that gives an error with FRIM and AVISynth declares that the file doesn't exist. I have a feeling that might be more my fault on borking the command line than the programs' fault, though.

Perhaps, though, this is something FRIM's author can look into for us. If he can convert the decoder into an AVISynth plugin it'll solve the issue. Will put the question to him - no harm in asking, after all.

Nico8583
19th December 2013, 09:36
I have left encoding terminates and app crash at the end, so I don't know what to do :(

r0lZ
19th December 2013, 10:36
I've tried using pipes but I don't quite understand how they work.Unfortunately, under Windows, the named pipes must be created with a call to a system function before they can be used. So, the receiving exe must create the pipe and open it for reading. Then, the emitting program can theoretically write to the pipe. Of course, it should not need to seek, or otherwise try to verify if the file exists or can be overwritten, or it will probably fail. As you can see, there are many limitations.

I have here a little tool "NamedPipe.exe", that can open a named pipe, and redirect the data written to that pipe to stdout. It's sufficient to send the output of a progran that needs to write to a real file to the standard input of another program, but it's not sufficient for us. We need to redirect two streams at the same time. Anyway, if you are interested, I have found NamedPipe.exe in a thread here at the D9 forums, but I can't find that thread now. But if you search for NamedPipe.exe, you will find several threads on the subject, including threads on how to redirect a MVC stream.

Perhaps, though, this is something FRIM's author can look into for us. If he can convert the decoder into an AVISynth plugin it'll solve the issue. Will put the question to him - no harm in asking, after all.Excellent idea. An avisynth plugin would be great, or, if it's too much work, it should be easier to modify the decoder to accept to write to named pipes. If it's possible, we'll end up with something similar to the first method used here, with ldecod and named pipes. It's not perfect, but that works.

Anyway, please tell us when you will have posted a request in the FRIM thread. I'll post also, to second your request...

[EDIT] Found the thread with the NamedPipe.exe post. It is here (http://forum.doom9.org/showthread.php?p=1226337#post1226337).

r0lZ
19th December 2013, 20:12
I have left encoding terminates and app crash at the end, so I don't know what to do :(There is a problem with the number of frames similar to what I have encountered already, posted today in the Simple X264 Launcher (http://forum.doom9.org/showthread.php?p=1658443#post1658443). As you can see, the 2nd pass crashes due to a bad number of frames. It's why BD3D2MK3D adds some blank frames at the end of the movie, but doesn't calculate them. Unfortunately, I don't know how to fix it for TotalRecode. I can only suggest to encode in one-pass mode. (IMO, the best quality is archived in CRF mode. 2-pass encoding gives less good results, and is useless, unless you really need to control the final file size precisely.)

Nico8583
19th December 2013, 21:19
There is a problem with the number of frames similar to what I have encountered already, posted today in the Simple X264 Launcher (http://forum.doom9.org/showthread.php?p=1658443#post1658443). As you can see, the 2nd pass crashes due to a bad number of frames. It's why BD3D2MK3D adds some blank frames at the end of the movie, but doesn't calculate them. Unfortunately, I don't know how to fix it for TotalRecode. I can only suggest to encode in one-pass mode. (IMO, the best quality is archived in CRF mode. 2-pass encoding gives less good results, and is useless, unless you really need to control the final file size precisely.)
Thanks for the info but I have tried in 1-pass mode without success :(
But for me 2-pass is the best choice because I made a BD25 output.

HWK
19th December 2013, 21:31
Nico8583, Are you using totalcode professional to create BD25 disc.
I have done couple of them and didn't run into crash. However I am using Totalcode Studio instead, but I am thinking it should still work if I post how I extract video streams.

Nico8583
19th December 2013, 22:36
Nico8583, Are you using totalcode professional to create BD25 disc.
I have done couple of them and didn't run into crash. However I am using Totalcode Studio instead, but I am thinking it should still work if I post how I extract video streams.
Yes I'm using Professional version 3.6.3. Could you explain me what do you use, what script do you use and how do you do ?
With DirectShowMVCSource it works for me, but not with BioMVC. Thanks !

Nico8583
19th December 2013, 22:38
Does anyone have tried MVCSource.dll from BDtoAVCHD soft ? AVS script generates by soft looks like this :

LoadPlugin("C:\Program Files (x86)\BDtoAVCHD\MVCsource\MVCsource.dll")

Interleaved = MVCsource("C:\TEMP\TEXAS CHAINSAW 3D 3DSBS.job_0.avc.h264", "C:\TEMP\TEXAS CHAINSAW 3D 3DSBS.job_0.mvc.h264", 132769, 2)

Right = SelectOdd(Interleaved)
Left = SelectEven(interleaved)
return StackHorizontal(HorizontalReduceBy2(Left), HorizontalReduceBy2(Right))

And if anyone knows how to return left or right only I'm interested :-)

Sharc
19th December 2013, 23:29
Does anyone have tried MVCSource.dll from BDtoAVCHD soft ? AVS script generates by soft looks like this :

Interesting... it works here.
Also works as decoder/source filter for FRIMEncode.

Can it decode .ssif directly?

r0lZ
20th December 2013, 00:25
Interesting... it works here.
Do you mean that it works without the decoding errors near the borders of the other decoders? Have you tested with The Croods or a similar BD known to have that problem?

Can it decode .ssif directly?
Interesting question. It is more rapid to encode directly from the BD ISO. But if the BD must be demuxed, it's not really important. We have to demux the audio and subs anyway.

Sharc
20th December 2013, 00:48
And if anyone knows how to return left or right only I'm interested :-)
It looks like the last parameter controls the view:
0 = base
1 = dependent
2 = interleaved

Example for base view only:
Interleaved = MVCsource("c:\.....\base.264", "c:\.......\dependent.mvc",1000, 0)
return interleaved

Sharc
20th December 2013, 00:51
Do you mean that it works without the decoding errors near the borders of the other decoders? Have you tested with The Croods or a similar BD known to have that problem?

No, I did not test any of these problematic files. I don't have The Croods.

[Edit:]
I tried another problematic file. Unfortunately the glitches near the borders do still exist :(

HWK
20th December 2013, 01:04
Yes I'm using Professional version 3.6.3. Could you explain me what do you use, what script do you use and how do you do ?
With DirectShowMVCSource it works for me, but not with BioMVC. Thanks !

Can your program accept avi file, What I do is generate base and dependent avi files and use them together to encode. This method always work for me and 2 pass shouldn't be problem with this.

I also use lossless compression to minimize space needed to store movie, yet retain every benefit.

Thalyn
20th December 2013, 08:01
Excellent idea. An avisynth plugin would be great, or, if it's too much work, it should be easier to modify the decoder to accept to write to named pipes. If it's possible, we'll end up with something similar to the first method used here, with ldecod and named pipes. It's not perfect, but that works.

Anyway, please tell us when you will have posted a request in the FRIM thread. I'll post also, to second your request...
Well, I posted the request the yesterday. Turns out, though, I'm hardly the first to have that idea - Nico8583 already queried about it a week before I did, with Frencher and JDobbs already expressing interest in response. Perhaps that's good news, though, since that's an extra week Videofan3D has had to mull over the idea?

I feel like I'm living a few weeks in the past after having double-posted about the same thing twice now.

Will take a look into that NamedPipe program, though. If it works it's a decent stop-gap solution.

Sharc
20th December 2013, 08:10
I feel like I'm living a few weeks in the past after having double-posted about the same thing twice now.
....

No worry, it often adds to the motivation if a request or wish comes from several sources.

Parhaps you have seen the MVCsource.dll discussion few posts before this one. MVCSource.dll is a plugin for avisynth. There is always hope........

Nico8583
20th December 2013, 09:20
Can your program accept avi file, What I do is generate base and dependent avi files and use them together to encode. This method always work for me and 2 pass shouldn't be problem with this.

I also use lossless compression to minimize space needed to store movie, yet retain every benefit.

TotalCode Pro accepts Avisynth scripts, so I use 1 avs for left and 1 avs for right.
What do you do to generate base and dependent avi files ? With this method, do you need a lot of free space ?

Nico8583
20th December 2013, 09:21
No, I did not test any of these problematic files. I don't have The Croods.

[Edit:]
I tried another problematic file. Unfortunately the glitches near the borders do still exist :(

Thanks for your response about left and right view.
What file have you tried ?
I'll try to test Croods and Ice Age 3 today.

Sharc
20th December 2013, 09:40
Thanks for your response about left and right view.
What file have you tried ?
I'll try to test Croods and Ice Age 3 today.
It's a Trailer to "Panama".

r0lZ
20th December 2013, 10:34
[Edit:]
I tried another problematic file. Unfortunately the glitches near the borders do still exist :(
Damn! That means that that decoder is useless for us, since it is not better than the current solutions.

So, currently, afaik, only FRIM or the Intel decoder can decode properly the MVC streams. But currently, they can only write to huge files, and, to be useable, they should be converted to an avisynth filter, or at least support named pipes. Is it correct, or does other solutions exist?

Will take a look into that NamedPipe program, though. If it works it's a decent stop-gap solution.NamedPipe.exe is probably not sufficient. Its purpose is to convert the output of a program and inject it as stdin in another program. That means that the second program must accept to take its input from stdin, and that it requires only a single input. It's probably not the case for what we want to do.

Theoretically, it is possible to write a simple exe to open one or several named pipes, and exit immediately. Then, two different programs running as independent processes can use the opened pipes to communicate. But the two programs must accept to read or write to an already existing file handle. It's relatively rare. I did a test, and it works, for example, with two Command Prompt and redirections from/to named pipes, but I haven't been able to force tsMuxeR to accept to write its demuxed AVC and MVC streams to the pipes. In conclusion, if it is easy to write the program to open the pipes, it's not sufficient, as we need also to use pipe-aware programs.

Sharc
20th December 2013, 11:10
Damn! That means that that decoder is useless for us, since it is not better than the current solutions.

Nico8583 wants to do more tests for better proof.
Are we really sure about the root cause of the glitches?
(decoder, avisynth plugin, or player using its own decoder, or even alltogether)?
I think we can exclude tsMuxeR.
The fact that FRIMDecode avoids the glitches indeed points towards the plugin / decoder causing the problem.

Nico8583
20th December 2013, 11:36
Yes, I would like to confirm that glitches are presents on all movies.
And plugin / decoder causes the problem :) because BioMVC doesn't produce glitches.

Sharc
20th December 2013, 12:55
Yes, I would like to confirm that glitches are presents on all movies.
And plugin / decoder causes the problem :) because BioMVC doesn't produce glitches.
By "all movies" do you mean the known problematic ones (IceAge 3, The Croods), or did you test more?

Nico8583
20th December 2013, 13:32
By "all movies" do you mean the known problematic ones (IceAge 3, The Croods), or did you test more?
First I'll try Ice Age 3 and Croods ;)

r0lZ
20th December 2013, 14:54
I can add to the list of "problematic BDs" How to train your dragon, Paranorman, Toy Story 2 and The Pirates! in an Adventure with Scientists! (aka The Pirates! Band of Misfits! in USA). All of them exhibits the problem, in the left and right borders, or in the bottom border of the MVC view. Some movies have the problem very often, and some very rarely. Many BDs do not have the problem at all. I guess that the decoder cannot process correctly the MVC streams encoded with a specific parameter. I have tried to play the Avisynth script directly with many different players and with AvsPmod, and the problem occurs always at the same places, so I'm confident we can exclude a player bug. It must be a decoder bug or limitation.

Nico8583
20th December 2013, 17:50
I have made a first test on Ice Age 3 and MVCSource.dll and I've don't seen any artefact at the right of right view.
r0lz could you test also ? Or frencher ?

Edit : I'm trying to encode NetBlender BD 3D Demo with TotalCode Pro and 2-pass encoding and it seems to work with MVCSource.dll. Encode finished with success !

Edit 2 : If anyone test, could you tell if you see a difference between DirectShowMVCSource and MVCSource colors ? For me, DirectShowMVCSource colors looks more washed than MVCSource.

frencher
20th December 2013, 23:08
Does anyone have tried MVCSource.dll from BDtoAVCHD soft ? AVS script generates by soft looks like this :



And if anyone knows how to return left or right only I'm interested :-)

Hi i have tested from BDtoAVCHD and your code
result:
avs [error]: MVCsource: Can't init decoder session
(C:\TEMP\WW 3 (2001) 3DSBS.job_0.avs, line 3)
x264 [error]: could not open input file `C:\TEMP\WW 3 (2001) 3DSBS.job_0.avs'

HWK
20th December 2013, 23:11
TotalCode Pro accepts Avisynth scripts, so I use 1 avs for left and 1 avs for right.
What do you do to generate base and dependent avi files ? With this method, do you need a lot of free space ?

I use virtual dub and extract one side footage at a time and compress with lossless codec. You must close before opening another avs script or else it will not work properly.

Avatar which has run 2:41:41 was 198 GB, instead of 1188 GB if it was uncompressed.

Nico8583
20th December 2013, 23:13
Hi i have tested from BDtoAVCHD and your code
result:
avs [error]: MVCsource: Can't init decoder session
(C:\TEMP\WW 3 (2001) 3DSBS.job_0.avs, line 3)
x264 [error]: could not open input file `C:\TEMP\WW 3 (2001) 3DSBS.job_0.avs'
Can you copy your script ? And what files do you use ?

Nico8583
20th December 2013, 23:14
I use virtual dub and extract one side footage at a time and compress with lossless codec.

Avatar which has run 2:41:41 was 198 GB, instead of 1188 GB if it was uncompressed.
So you compress with lossless codec then you encode into AVC/MVC with TotalCode ? What codec do you use ? Could you explain a little more your procedure plz ? :)

HWK
20th December 2013, 23:16
So you compress with lossless codec then you encode into AVC/MVC with TotalCode ? What codec do you use ? Could you explain a little more your procedure plz ? :)

Would guide work for you? Also do you use BD-RB, if so I need to know?

Nico8583
20th December 2013, 23:25
Yes I use BD-RB for 2D movie, and for the guide I don't understand :confused:

HWK
20th December 2013, 23:27
Yes I use BD-RB for 2D movie, and for the guide I don't understand :confused:

I have written guide before which if user follow it will be able to complete blu-ray encoding.

It talks about extraction, calculate overhead and rebuild etc. I can post that one or modify to better suit your requirement.

frencher
20th December 2013, 23:30
Can you copy your script ? And what files do you use ?

LoadPlugin("C:\Program Files (x86)\BDtoAVCHD\MVCsource\MVCsource.dll")

Interleaved = MVCsource("C:\TEMP\ICE.job_0.avc.h264", "C:\TEMP\ICE.job_0.mvc.h264", 135266, -2) - is for Order MVC/AVC ?

Right = SelectOdd(Interleaved)
Left = SelectEven(interleaved)

return StackHorizontal(HorizontalReduceBy2(Left), HorizontalReduceBy2(Right))

"C:\Program Files (x86)\BDtoAVCHD\x264\x264.exe" --preset "superfast" --tune "film" --bluray-compat --level "4.1" --vbv-bufsize 24000 --vbv-maxrate 24000 --bitrate 10717 --stats "C:\TEMP\ICE.job_0.stats" --keyint 24 --open-gop --slices 4 --frame-packing 3 --qpfile "C:\TEMP\ICE.job_0.qpfile" --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 --pass 1 -o NUL "C:\TEMP\ICE.job_0.avs"

avs [error]: MVCsource: Can't init decoder session
(C:\TEMP\ICE.job_0.avs, line 3)
x264 [error]: could not open input file `C:\TEMP\ICE.job_0.avs'

Nico8583
20th December 2013, 23:34
I have written guide before which if user follow it will be able to complete blu-ray encoding.

It talks about extraction, calculate overhead and rebuild etc. I can post that one or modify to better suit your requirement.
It would be perfect if you could add MVC and virtual dub procedure ;-) thanks a lot !