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

r0lZ
1st May 2013, 06:19
Should be AVC & MVC streams. MVCCombine is made to combine them, not to combine 2 AVC streams.

jdobbs
1st May 2013, 14:29
Should be AVC & MVC streams. MVCCombine is made to combine them, not to combine 2 AVC streams. That makes sense. I thought I might be missing something.

Nico8583
1st May 2013, 20:14
I have tried Intel SDK 2013, "sample_decode" works to convert H264 file created by MVCCombine to YUV420 and "sample_encode" works to convert YUV420 to MVC but space color is not good (Intel SDK 2013 uses NV12 with final file instead of YUV420). I think it needs to be recompiled with few modifications...
I have tried to compile a new version but it doesn't work with Visual C++ 2005 or Visual Studio 2012 Pro...

Neisklar
2nd May 2013, 11:46
Another (for me important) Off-Topic question:

Does anyone has access to the exetools forum? Please PM me.

Anyone?

Directly from demuxed left.h264 & right.h264 files With this cdmline
MVCCombine.exe -l "left.h264" -r "right.h264" -v -nt -o .\Out-Combined-MVC.h264

Sorry, i meant, when exactly did it happen? (e.g: Right at the start, after x frames, at the end, ... and was something printen in the console already)

When you talk about the left and right h.264 streams, are they actually fully playable independent streams -- or is this just the two PIDs for the primary AVC video and the MVC extensions that have been demuxed from the original SSIF file(s)?

Yes that are the two 3D streams (mostly eac3to) demuxed from the two(!) TS interleaved in the SSIF disc-blockwise.
The base AVC stream (aka the "left-eye") is a fully independent and playable .h264 stream. The MVC Part needs the base stream to be decoded.

I have tried to compile a new version but it doesn't work with Visual C++ 2005 or Visual Studio 2012 Pro...

Sorry but i can't help you there, C(++) is not my language

frencher
2nd May 2013, 20:14
Another (for me important) Off-Topic question:
Does anyone has access to the exetools forum? Please PM me.

Anyone?

Sorry not for me, i dont know http://forum.exetools.com


MVCCombine.exe -l "left.h264" -r "right.h264" -v -nt -o .\Out-Combined-MVC.h264
Sorry, i meant, when exactly did it happen? (e.g: Right at the start, after x frames, at the end, ... and was something printen in the console already)

From the beginning, does not start

I have tried to compile a new version but it doesn't work with Visual C++ 2005 or Visual Studio 2012 Pro...
I use MMB and AutoIt

r0lZ
3rd May 2013, 10:20
Not sure if this matters at this point, but I thought I'd just post a note for those who have had ssifSource2() add duplicated frames at the end of a stream. It also applies to DirectshowMVCSource() when it seems to freeze at 99% during encode. I guess for a playlist that is made of a single SSIF it's no big deal -- but it causes sync issues when you are encoding/combining multiple SSIF files.

It appears to be a buffering/EOF issue, and that's why it goes away when you combine the files using "copy /b". So I did a little testing, and it also seems to be corrected if you write some zeroed packets to the end of the file, encode, and then truncate the SSIF back to its original length.
[...]

It appears that the duplicate frame problem is very annoying when the movie is encoded in 2-pass mode, as the number of frames returned by any method to count them before the actual encoding is unpredictable. That happens also when encoding from a MVCCombined.m2ts file.

With BD3D2MK3D, it is important to know the number of frames when the scripts files (and mainly _ENCODE.cmd) are generated, as without the --frames argument in the x264 command, x264 is unable to display its progress.

With several 2-pass tests made by MaistroX, the number of frames stored in _ENCODE.cmd is often wrong. Actually, it is usually too high by one frame or two. As a consequence, the first pass encodes less frames than what it is supposed to encode according to the --frames argument. During the first pass, it's not really a problem. But x264 doesn't like to have less frames in the stats file than what it expects during the second pass, and fails usually with an error message similar to this: "error: wrote only 3085668 of 3110400 bytes". When that happens, it is not possible to mux the resulting h264 stream with MkvMerge.

I wonder if it is sufficient to add a few black frames at the end of the AVS script, with something like this:

return(last + BlankClip(last, 100))

Then, when the number of frames of the AVS script are evaluated, it is simple to subtract that 100 frames to get the approximately correct number of frames to encode and use with the --frames x264 argument.
That method cannot be applied when the MPLS is made of several SSIF files (except on the last one), but it should be OK when encoding from a MVCCombined.m2ts file.

However, I wonder if the problem of the duplicated frames appears really ONLY at the end of the video. If there is, for example, a duplicated frame somewhere in the middle of the video during the first pass, but not during the second pass, the content of the x264 stats file will be wrong, and the solution cannot work correctly.

jdobbs, can you confirm that the buffering problem can happen only at the end of the file (at least when no seek is made during the encoding)?

Neisklar, are you sure that the number of frames returned by MVCCombine.exe is correct? I suppose so, but perhaps there are already dupes in the output file?

If it appears that the trick works correctly, I will probably modify BD3D2MK3D to always use MVCCombine and DirectShowMVCSource. However, with that method, it will not be possible to encode in anaglyph mode. It's a pity, so I don't want to do it if the solution of the 100 additional frames in the AVS script doesn't work perfectly.

Nico8583
3rd May 2013, 12:46
Cedvano informs me that a sample_multi_transcode exists in Intel SDK 2013.
It takes in input a MVCCombine file and can output a MVC file but it is combined (only 1 file). So is it possible to decombine a MVC file ?

frencher
3rd May 2013, 13:12
It appears that the duplicate frame problem is very annoying when the movie is encoded in 2-pass mode, as the number of frames returned by any method to count them before the actual encoding is unpredictable. That happens also when encoding from a MVCCombined.m2ts file.

With BD3D2MK3D, it is important to know the number of frames when the scripts files (and mainly _ENCODE.cmd) are generated, as without the --frames argument in the x264 command, x264 is unable to display its progress.

With several 2-pass tests made by MaistroX, the number of frames stored in _ENCODE.cmd is often wrong. Actually, it is usually too high by one frame or two. As a consequence, the first pass encodes less frames than what it is supposed to encode according to the --frames argument. During the first pass, it's not really a problem. But x264 doesn't like to have less frames in the stats file than what it expects during the second pass, and fails usually with an error message similar to this: "error: wrote only 3085668 of 3110400 bytes". When that happens, it is not possible to mux the resulting h264 stream with MkvMerge.

I wonder if it is sufficient to add a few black frames at the end of the AVS script, with something like this:

return(last + BlankClip(last, 100))

Then, when the number of frames of the AVS script are evaluated, it is simple to subtract that 100 frames to get the approximately correct number of frames to encode and use with the --frames x264 argument.
That method cannot be applied when the MPLS is made of several SSIF files (except on the last one), but it should be OK when encoding from a MVCCombined.m2ts file.

However, I wonder if the problem of the duplicated frames appears really ONLY at the end of the video. If there is, for example, a duplicated frame somewhere in the middle of the video during the first pass, but not during the second pass, the content of the x264 stats file will be wrong, and the solution cannot work correctly.

jdobbs, can you confirm that the buffering problem can happen only at the end of the file (at least when no seek is made during the encoding)?

Neisklar, are you sure that the number of frames returned by MVCCombine.exe is correct? I suppose so, but perhaps there are already dupes in the output file?

If it appears that the trick works correctly, I will probably modify BD3D2MK3D to always use MVCCombine and DirectShowMVCSource. However, with that method, it will not be possible to encode in anaglyph mode. It's a pity, so I don't want to do it if the solution of the 100 additional frames in the AVS script doesn't work perfectly.

I use the method "x264" 2 pass in all my tests and I've never needed to add duplicate frames because DirectShowMVCSources returns directly the exact image of a combined or ssif, mpls file number.
(From MVC Player Free)

http://i42.tinypic.com/35hdxlg.png

Neisklar
3rd May 2013, 13:13
Sorry not for me, i dont know http://forum.exetools.com

I meant sonewone with an account, so he can download me some little "trial-extending-tool" for a software;-)

Neisklar, are you sure that the number of frames returned by MVCCombine.exe is correct? I suppose so, but perhaps there are already dupes in the output file?

Nope not at all, i count frames by counting how many AUD NALUs (Access Unit Delimiter NALUs) i discover. As far as i know the frames in the bistream are seperated by them. If that is always the case, i can't tell you, but at least it worked for all BD3Ds do far:). There shouldn't be any dupes coming from eac3to or mvccombine. If there are dupes, then they are already on the BD3D.

However, with that method, it will not be possible to encode in anaglyph mode.

I have seen somewhere an anaglyph code for Avisynth. Have a look here:
http://www.pantarheon.org/AviSynth3DToolbox/

Cedvano informs me that a sample_multi_transcode exists in Intel SDK 2013.
It takes in input a MVCCombine file and can output a MVC file but it is combined (only 1 file). So is it possible to decombine a MVC file ?

I think that sample is for transcoding between different video codecs aka VC1 to H.264 or so.
Decombining a MVC stream should be possible, but i don't know what is that good for.

Nico8583
3rd May 2013, 13:26
I think that sample is for transcoding between different video codecs aka VC1 to H.264 or so.
Decombining a MVC stream should be possible, but i don't know what is that good for.

I've tried transcode MVC to MVC, when I compare original left stream and transcoded left stream, quality seems to be not very good...

r0lZ
3rd May 2013, 15:18
Nope not at all, i count frames by counting how many AUD NALUs (Access Unit Delimiter NALUs) i discover. As far as i know the frames in the bistream are seperated by them. If that is always the case, i can't tell you, but at least it worked for all BD3Ds do far:). There shouldn't be any dupes coming from eac3to or mvccombine. If there are dupes, then they are already on the BD3D.
Yes, that makes sense. I suppose MVCCombine processes the input files directly, since it doesn't need to decode or render them. I just wanted to be sure that MVCCombine does not rely on some DirectShow filters to work, since it seems that DirectShow is the culprit.

BTW, can we hope a new version of MVCCombine with the possibility to output to a pipe (to pipe tsMuxeR)?

jdobbs
3rd May 2013, 16:21
Does anyone know who modified DirectshowSource into DirectshowMVCSource? I know it was made specifically to work with CoreAVCDecoder.dll (which is a Directshow filter according to the notes). I just wonder if it could be changed to reference the Intel SDK MVC filter (mvc_dec_filter.dll) that is freeware (or at least can be distributed freely). Together they would be a completely free solution.

I guess another option would be to install the Intel filter somehow (I personally don't know how you do that) and use DirectshowSource()?

frencher
4th May 2013, 01:41
"MVC Player Free v0.0.1.5" In my signature... :rolleyes:

Extract and run directly MVC Player Free.exe or play associated file with MVC Player Free.exe
# Major fix: Output x264 compatibility with auto switchable 3D TV (works with my SAMSUNG 6500)
# Added: Switchable x264 "Slow First Pass" in 2 pass mode for increase quality
# Some fixes

frencher
4th May 2013, 01:56
Does anyone know who modified DirectshowSource into DirectshowMVCSource? I know it was made specifically to work with CoreAVCDecoder.dll (which is a Directshow filter according to the notes). I just wonder if it could be changed to reference the Intel SDK MVC filter (mvc_dec_filter.dll) that is freeware (or at least can be distributed freely). Together they would be a completely free solution.

I guess another option would be to install the Intel filter somehow (I personally don't know how you do that) and use DirectshowSource()?

Neisklar for "MVCCombine" and "DirecShowMVCSource.dll" ;) and nice idea :)

Yes, that makes sense. I suppose MVCCombine processes the input files directly, since it doesn't need to decode or render them. I just wanted to be sure that MVCCombine does not rely on some DirectShow filters to work, since it seems that DirectShow is the culprit.

BTW, can we hope a new version of MVCCombine with the possibility to output to a pipe (to pipe tsMuxeR)?

Very nice idea :)

Nico8583
4th May 2013, 12:19
I have a little question. If I :
- Demux left.h264 and right.h264 with eac3to
- Combine left and right with MVCCombine
- Mux combine result with TsMuxer to M2TS
- Decode with DirectShowMVCSource (is it possible to decode M2TS ?)
Is this solution better to avoid DirectShowMVCSource error, duplicate frames and other "bug" ?

r0lZ
4th May 2013, 12:34
I don't think the duplicate frames bug is completely avoided, but if you encode with x264 and you specify the --frames argument (with the number of frames reported by MVCCombine or tsMuxeR), the output should be OK. Anyway, the MVCCombine method avoids the problem of duplicate frames in the middle of the movie, when the MPLS is made of several SSIF files. Some dupes at the end of the movie are not really important.
(is it possible to decode M2TS ?)
Yes, but you cannot use the "stf" parameter to specify the 3D mode, you have to decode the left and right streams independently, and combine them with StackVertical or StackHorizontal, to create TB or SBS, like this:

LoadPlugin("D:\BD3D2MK3D\toolset\stereoplayer.exe\DirectShowMVCSource.dll")
left = DirectShowMVCSource("combinedMVC.m2ts", decodeleft=true).AssumeFPS("ntsc_film")
right = DirectShowMVCSource("combinedMVC.m2ts", decodeleft=false).AssumeFPS("ntsc_film")
last = StackHorizontal(left, right)
BilinearResize(1920, 1080)

Note that that method works most of the time, but currently, there is an access violation bug with some combined m2ts files. I've PMed Neisklar about this problem.

Nico8583
4th May 2013, 12:39
Thanks for your response.
I would like to try to convert left and right stream to AVI uncompressed (with VirtualDub for example, I can open an AviSynth file and convert it to AVI uncompressed).

frencher
4th May 2013, 16:23
I don't think the duplicate frames bug is completely avoided, but if you encode with x264 and you specify the --frames argument (with the number of frames reported by MVCCombine or tsMuxeR), the output should be OK. Anyway, the MVCCombine method avoids the problem of duplicate frames in the middle of the movie, when the MPLS is made of several SSIF files. Some dupes at the end of the movie are not really important.

Yes, but you cannot use the "stf" parameter to specify the 3D mode, you have to decode the left and right streams independently, and combine them with StackVertical or StackHorizontal, to create TB or SBS, like this:

LoadPlugin("D:\BD3D2MK3D\toolset\stereoplayer.exe\DirectShowMVCSource.dll")
left = DirectShowMVCSource("combinedMVC.m2ts", decodeleft=true).AssumeFPS("ntsc_film")
right = DirectShowMVCSource("combinedMVC.m2ts", decodeleft=false).AssumeFPS("ntsc_film")
last = StackHorizontal(left, right)
BilinearResize(1920, 1080)


Note that that method works most of the time, but currently, there is an access violation bug with some combined m2ts files. I've PMed Neisklar about this problem.

Work with my 111 m2ts combined files look at your PM with "MVC Player Free" AVS

LoadPlugin ("F:\Temp Recode\CombineMVC\MVC Player\MVCtoAVI.exe\DirectShowMVCSource.dll")

# Start AVS for CombinedMVC

File = "N:\OK\AVC + MVC - Le Royaume de Ga'Hoole - la légende des gardiens - frames 139293, 10 chapters.mts"
Left = DirectShowMVCSource(File,decodeleft=TRUE)
Right = DirectShowMVCSource(File)
Video = StackHorizontal(Left,Right)

# End AVS for CombinedMVC

Video = Video.BilinearResize(1920,1080)
Video = Video.ConvertToYV12()
Return Video

"MVC Player Free" in progress... here pass 1 done, pass 2 in progress with correct fps :cool:
http://i40.tinypic.com/245as2c.png

r0lZ
4th May 2013, 16:59
Frencher, I said that the method works most of the time (presque toujours). But the bug happens also, apparently without reason.

[EDIT] I see that you use the MVCtoAVI filters. I use the stereoscopic player ones. That might be the cause of the problem. I don't know.

frencher
4th May 2013, 19:27
Frencher, I said that the method works most of the time (presque toujours). But the bug happens also, apparently without reason.

[EDIT] I see that you use the MVCtoAVI filters. I use the stereoscopic player ones. That might be the cause of the problem. I don't know.

What is the name of the movie in question that I test.
Takes the dll that I use ;)

frencher
5th May 2013, 01:39
An alternative to ldecod can use if specified Direct 3D v9, direct 3D v11 with lightning speed.
It just requires that the source is combined with MVCCombine.
This is now possible with a free version as specified by jdobbs and Nico8583 :)

Usage: sample_decode_x86.exe mpeg2|h264|vc1|mvc|jpeg -i InputBitstream -o Output YUVFile
Options:
[-hw] - use platform specific SDK implementation, if not specified software implementation is used
[-d3d] - work with d3d9 surfaces
[-d3d11] - work with d3d11 surfaces
[-r] - render decoded data in a separate window
[-wall w h n m f t] - same as -r, and positioned rendering window in a particular cell on specific monitor
w - number of columns of video windows on selected monitor
h - number of rows of video windows on selected monitor
n(0,.,w*h-1) - order of video window in table that will be rendered
m(0,1..) - monitor id
f - rendering framerate
t(0/1) - enable/disable window's title
[-low_latency] - configures decoder for low latency mode (supported only for H.264 and JPEG codec)
[-calc_latency] - calculates latency during decoding and prints log (supported only for H.264 and JPEG codec)
[-jpeg_rotate n] - rotate jpeg frame n degrees
n(90,180,270) - number of degrees

Features:
Press 1 to toggle fullscreen rendering on/off


F:\Temp Recode\Decode Intel SDK MVC>sample_decode_x64.exe mvc -i MVCCombined.264 -o output
Intel(R) Media SDK Decoding Sample Version 4.0.553.52283


Input video AVC
Output format YUV420
Resolution 1920x1088
Crop X,Y,W,H 0,0,0,0
Frame rate 23.98
Memory type system
MediaSDK impl sw
MediaSDK version 1.6

Decoding started
Frame number: 363

The output is:
output_0.yuv
output_1.yuv

Package of my tests: Decoder Intel SDK MVC (http://ul.to/ngu03j5o) The x86 version does not started on my pc, I have windows 7 x64

We talk here, here to look interesting for people who speak English (http://forum.doom9.org/showthread.php?p=1571747) (mvc_dec_filter.dll)

slavanap
5th May 2013, 15:15
Hello guys.
I finally got a little free time and wonder to figure out what happened here. As far as I know, it is possible to use Intel SDK with MVC Combine tool. I can program that out if I get to know how MVCCombine works.
Moreover I figure out the solution, how to count frames with CoreAVC precisely, if it still matters.

And about duplicated frames: it happens when decoding process takes too long time to decode one frame (60 seconds). It doesn't matter how long your tool will process that frame, just the frame request timeout from CoreAVC codec set to 60 seconds. If it happens once, then all next frames will be marked as duplicated.
Back to subject of blu-ray corrupted disks, the disk reading time may be more than 60 seconds, that's why duplicated frames appears in that case.

ADDED:
plan to fix issues with siffSource soon.

jdobbs
5th May 2013, 15:40
Hello guys.
I finally got a little free time and wonder to figure out what happened here. As far as I know, it is possible to use Intel SDK with MVC Combine tool. I can program that out if I get to know how MVCCombine works.
Moreover I figure out the solution, how to count frames with CoreAVC precisely, if it still matters.

And about duplicated frames: it happens when decoding process takes too long time to decode one frame (60 seconds). It doesn't matter how long your tool will process that frame, just the frame request timeout from CoreAVC codec set to 60 seconds. If it happens once, then all next frames will be marked as duplicated.
Back to subject of blu-ray corrupted disks, the disk reading time may be more than 60 seconds, that's why duplicated frames appears in that case.

ADDED:
plan to fix issues with siffSource soon.If you look at the associated playitem in the MPLS it will give you the IN time and OUT time in 1/45,000s of a second clock ticks (it's actually the PTS/2 to make it fit in 32 bits). If you take (OUT-IN) and the frame-rate it will give you the exact number of frames every time.

r0lZ
5th May 2013, 15:44
@slavanap: It might be a good idea to join the Intel SDK and MVCCombine to form an unified tool. Good idea. I suppose you can work with Neisklar on that project.

I don't think I need another method to count the frames, as if I use MVCCombine in the forthcoming versions, I will know it. But your method might be interesting anyway.

I don't think the dupe problem is caused by a timeout, as I encode usually from a mounted ISO, and I have never seen the decoding of a frame take more than 1 second or so. But thanks for the info.

frencher
5th May 2013, 18:17
@jdobbs
We must work together and each proposal is good to take and meditate progress in reading and re-encoding of 3D BD.
Your experience gives us the intel SDK MVC and thank you for this interresement.

vj950
6th May 2013, 00:09
It matters for BD-RB, because I'd have to make some major changes for 3D support of I need to combine before encoding.

Big fan of BD-RB. Have you figured out how to create "linked" ISO file for ssif, right and left m2ts without doubling the file size? (As you know, the VSO burning engine of DVDFab does that, but I haven't had any success using it standalone).

frencher
6th May 2013, 00:20
Big fan of BD-RB. Have you figured out how to create "linked" ISO file for ssif, right and left m2ts without doubling the file size? #As you know, the VSO burning engine of DVDFab does that, but I haven't had any success using it standalone#.

The project is under discussion with Nico8583

:goodpost: The update of ultimate demo package with CMD and sourcecode for convert MVC combined 3D Video x86 & x64 with SSE support etc... (http://ul.to/wlfydwje) :logfile:
MVC to MVC and MVC>YUV>MVC from Intel MEDIA SDK 2013

Nico8583
6th May 2013, 21:44
I would like to use MVCCombine but I'm lost in the differents versions and parameters. What is the actual and functionnal version ? Thanks :)

frencher
6th May 2013, 22:54
I would like to use MVCCombine but I'm lost in the differents versions and parameters. What is the actual and functionnal version ? Thanks :)

v0.6 with eac3to and pipe ;)
eac3to.exe P:\BDMV\PLAYLIST\00001.mpls 2: \\.\pipe\left.h264 3: \\.\pipe\right.h264 | MVCCombine.exe -nt -v -p -o Out-Combined-MVC.h264

Small question:
I solved several crash using a subdirectory in the pipe such as this example:
eac3to.exe P:\BDMV\PLAYLIST\00001.mpls 2: \\.\pipe\MVCCombine\left.h264 3: \\.\pipe\MVCCombine\right.h264 | MVCCombine.exe -nt -v -p -o \\.\pipe\MVCCombine\Out-Combined-MVC.h264
Other software packages use the file pipe which can cause conflicts

Neisklar
8th May 2013, 18:09
Does anyone know who modified DirectshowSource into DirectshowMVCSource? I know it was made specifically to work with CoreAVCDecoder.dll (which is a Directshow filter according to the notes). I just wonder if it could be changed to reference the Intel SDK MVC filter (mvc_dec_filter.dll) that is freeware (or at least can be distributed freely). Together they would be a completely free solution.

I guess another option would be to install the Intel filter somehow (I personally don't know how you do that) and use DirectshowSource()?

I did both.
The Avisynth Plugin is somehow hacked together, i'm really a bad c(++) coder, and doing complicated things in there, i would like to avoid. But the source is there, so i hope someone with more skills in c(++) can do it. Basically the DirectShowMVCSource builds a Directshow Graph loading the decoders 'by hand' and connecting them 'by hand' (since ther also is some obscurity protection systemin the Core Decoder). The original DirectShowSource just opens the file and let DirectShow itself try to figure out need filters and connects them.
DirectShowSource can BTW working with an Graph created in GraphEdit. So install the IntelSDK, the filters should be registered and build a graph. Just leave one end/pin "open". Open that with DirectShowSource and it should work.


Yes, but you cannot use the "stf" parameter to specify the 3D mode, you have to decode the left and right streams independently, and combine them with StackVertical or StackHorizontal


The stf.dll comes from Peter Wimmer who did the StereoPlayer. He also changed the compiler and interfaces of that filter in a later version, so we are stuck at a particular version. I'm still not sure if this is a bug in the stf.dll or in the coreavcdecoder which caused that it's not working when decoding a combined file. Maybe we could get Peter to release the source, or at least release a dokumentation to use it externally.

One more possibility is that someone writes an DirectShow-Filter itself which can to that stacking. (Or include it in the DSMVCS Filter) For that i'm lacking the skills.

Big fan of BD-RB. Have you figured out how to create "linked" ISO file for ssif, right and left m2ts without doubling the file size? (As you know, the VSO burning engine of DVDFab does that, but I haven't had any success using it standalone).

You definatly need an burning programm that supports that stuff. It is also later important how that interleaving is exactly done.


eac3to.exe P:\BDMV\PLAYLIST\00001.mpls 2: \\.\pipe\MVCCombine\left.h264 3: \\.\pipe\MVCCombine\right.h264 | MVCCombine.exe -nt -v -p -o \\.\pipe\MVCCombine\Out-Combined-MVC.h264
Other software packages use the file pipe which can cause conflicts

And that worked??? Since for now the pipe names are hardcoded in the combiner;-)


But seeing and working on one great (free) tool(chain) is somewhat i proposed also a while ago (if i remember correctly even utilizing the Intel SDK).
For that we need imho:
* BluRay Demuxer capable of MPLS files. I for myself can't write that piece of code from sratch using the BD Spec, thats a heavy task. Matthias isn't going to release the source of eac3to for various reasons i understand. Maybe we could convince him to at lease give the demuxer code out (he's afaik also coding in delphi) or include the combiner code.
* Decoder
* All the glue stuff like colorspace convertors, muxers and so on.

jdobbs
8th May 2013, 19:18
I can do a freeware CLI demuxer that is capable of supporting MPLS and pulling from M2TS or SSIF easy enough. I already have code that does all that in BD-RB, I'd just have to reuse it. I assume you want to pull the combined AVC core and MVC extensions together, or put them into separate files?

Is the source code for DirectshowMVCSource available? I haven't see it anywhere.

Neisklar
8th May 2013, 20:04
I can do a freeware CLI demuxer that is capable of supporting MPLS and pulling from M2TS or SSIF easy enough. I already have code that does all that in BD-RB, I'd just have to reuse it. I assume you want to pull the combined AVC core and MVC extensions together, or put them into separate files?


Yes, i would like to have one nice tool which extracts one combined bitstream. The mvccombine.exe was mainly coded to support seamless branching movies, as eac3to only extracts separate streams. Having (even C) code i could look or just borrow is a big plus, so i could code in delphi;-)

BTW there isn't any magic in the combine process, i just interleave the NALUs from both streams.
I read all NALUs until i encouter the next NALU_TYPE_VDRD(24) or NALU_TYPE_AUD(9), (the AUD one normally on the main view VDRD on the dependent view). Those are the begin-marker of the next frame. Then i interleave the NALUs the following way:
AUD (throw the VDRD away),
SPS and SUB_SPS from left, SPS and SUB_SPS from right (normally left only SPS, right SUB_SPS)
left PPS, right PPS,
left SEI, right SEI,
all the other left NALUs, then all right NALUs

If i have seen it correctly MakeMKV when doing 3D stuff just first puts all left NALUs of one frame, then all right NALUs of that frame. (Of course taking care of AUF and VDRD)
Is the source code for DirectshowMVCSource available? I haven't see it anywhere.

The source should be in the published packages, and please excuse the bad coding
http://www.share-online.biz/download.php?id=I3CQBCDMI5

Nico8583
8th May 2013, 21:18
One of importants points is to get a muxer like TsMuxer with 3D support. I don't know if it's easily possible or not but it will be necessary. With a MVC transcoder (MVC to MVC) it will be perfect :-) )
Thanks to all coders of differents tools !!

r0lZ
8th May 2013, 23:02
I'm not sure I understand the interest of a new CLI tool to "just" demux the AVC and MVC streams and combine them. Currently, eac3to + mvccombine can do that, and it is also possible to demux the necessary audio and subtitle streams (and the chapters) during the same operation. IMO, the only thing that is still missing is the possibility to mux the combined stream directly to M2TS, but that can probably be done easily with a new possibility to pipe the output of MVCCombine to tsMuxer.

I agree that a new tool to read the MPLS and output directly to M2TS will be more rapid and elegant, but without the possibility to demux the other streams as well, the process will require a second pass with eac3to, and that will ruin its advantage. IMO, to have a real gain, the whole process should be combined with the AVC and MVC decoding and integrated in an Avisynth plugin, so that it will be possible to read the MPLS directly from the AVS script and encode to SBS or T&B directly. That's much more difficult, I suppose.

frencher
8th May 2013, 23:10
And that worked ??? Since for now the pipe names are hardcoded in the combiner ;-)

Yes somes crash without specific path ;)
If other coder use \\.\pipe\left.h264 or \\.\pipe\right.h264

My old dosen't work without pipe subfolder ex: \\.\pipe\WFS\3D_L.yuv & \\.\pipe\WFS\3D_R.yuv
LoadPlugin("ffms2.dll")
LoadPlugin("RawSource.dll")

FFIndex("left.mkv", cachefile="left.index", indexmask=0, demuxer="lavf")

left = FFVideoSource("left.mkv", cachefile="left.index", seekmode=0).AssumeFPS(24000,1001).ConvertToYV12()

#left = RawSource("\\.\pipe\WFS\3D_L.yuv", 1920, 1080, "I420").assumefps(24000,1001)
right = RawSource("\\.\pipe\WFS\3D_R.yuv", 1920, 1080, "I420").assumefps(24000,1001)

Video = stackhorizontal(left, right)
#Video = Trim(Video,0,196204)
Video = BicubicResize(Video,1920,1080)

return Video

If i have seen it correctly MakeMKV when doing 3D stuff just first puts all left NALUs of one frame, then all right NALUs of that frame. (Of course taking care of AUF and VDRD)
If MVCCombine in the next realease export to mkv or/and m2ts yeah !!!! :D

excuse the bad coding
http://www.share-online.biz/download.php?id=I3CQBCDMI5

I do not think what you say.
Without you... "MVC PLayer Free" and "BD3D2MK3D" doesn't exist !!!

I can do a freeware CLI demuxer that is capable of supporting MPLS and pulling from M2TS or SSIF easy enough. I already have code that does all that in BD-RB, I'd just have to reuse it. I assume you want to pull the combined AVC core and MVC extensions together, or put them into separate files?.

"MVC PLayer Free" and "BD3D2MK3D" Already work for/with MVCCombiner, but why not another version

Neisklar
12th May 2013, 20:10
Update of MVCCombine:
http://www.share-online.biz/download.php?id=BDSX8PMM2B8

NOTE: The parameters have slightly changed:

-l <left> -r <right> -o <out>
-pi use INPUT pipes
When using pipes you could specify the pipename with -l and/or -r
which results in pipes named \\.\pipe\<name>
If no <name>s given it defaults to left.h264 and right.h264
-po use OUTPUT pipe
Same rules for naming as input pipes. Defaults to combined.h264
-v Debug output
-ml to get multiline progress
-ano Alternate NALU ordering
-nt No thread throttle (WILL eat CPU!!!)


We have input and output pipes. The pipe-using processes must use at the win-api level CreateFile for opening and not the old deprecated OpenFile call.
Pipes can be named and have a good and resonable default name. All Output Messages should be prefixed with MVCC:

So using the defaults and piping all through
MVCCombine -pi -po
Using \\.\pipe\left.h264 as MainView, \\.\pipe\right.h264 as MVC Stream, \\.\pipe\combined.h264 as Output pipe.
with -l, -r, -o you can in pipe mode also specify the part after \\.\pipe\

Important: Due to the nature of pipes seeking is not possible. So if the outpipe-reading programm tries to seek it may crash or have unexpected results.
The end of an pipe/a closed pipe is something a little different then a normal File-EOF, so there may also some weird results.

Have fun and happy crashing;-)

EDIT:

Do we have some free(1) and NON GPL(2) source for simple ts or m2ts muxing?
If yes i will recode it in delphi and add it. After that i will try to convince Matthias to include it in eac3to. (Thats why (1) and (2))

frencher
12th May 2013, 21:06
Very nice update and thank you, i test tomorrow ;)

If yes i will recode it in delphi and add it. After that i will try to convince Matthias to include it in eac3to. (Thats why (1) and (2))

Very good idea ;)

r0lZ
12th May 2013, 22:26
Great! Thanks!

jdobbs
12th May 2013, 23:49
Do we have some free(1) and NON GPL(2) source for simple ts or m2ts muxing?
If yes i will recode it in delphi and add it. After that i will try to convince Matthias to include it in eac3to. (Thats why (1) and (2)) You could get some information from looking at the code for TsRemux. I'm not sure if it is GPL or not.

[Edit] Just looked, it is GPL.

r0lZ
13th May 2013, 10:32
MVCCombine -pi -po

Aargh! It seems that tsMuxer doesn't like \\.\pipe\combined.h264 as input. It replies: The system cannot find the file specified.

I'll try with TsRemux, but I don't know it well, and I'm not sure it will be possible to call it from CLI.

frencher
13th May 2013, 10:43
MVCCombine -pi -po

Aargh! It seems that tsMuxer doesn't like \\.\pipe\combined.h264 as input. It replies: The system cannot find the file specified.

I'll try with TsRemux, but I don't know it well, and I'm not sure it will be possible to call it from CLI.

Same...
The problem is meta file of tsMuxeR, don't accept pipe :(
PS: -pi -po = pipo lol :D

MaistroX
13th May 2013, 15:17
I cross my fingers for this to find itself a solution! :)


Regards MaistroX

Nico8583
14th May 2013, 21:51
I have a question. When I use this command :
eac3to.exe F:\ 2: \\.\pipe\left.h264 3: \\.\pipe\right.h264 | MVCCombine.exe -nt -v -p -o Out-Combined-MVC.h264
Is it possible to extract another stream in this command ? For example :
eac3to.exe F:\ 2: \\.\pipe\left.h264 3: \\.\pipe\right.h264 | MVCCombine.exe -nt -v -p -o Out-Combined-MVC.h264 4:Audio.ac3 5:Subtitle.sup ... ?
Thanks !

r0lZ
14th May 2013, 23:05
Yes, but your syntax is not correct. All arguments for the eac3to command should be specified before the | character, and all args for the MVCCombine command after :
eac3to.exe F:\ 2: \\.\pipe\left.h264 3: \\.\pipe\right.h264 4: Audio.ac3 5: Subtitle.sup ... | MVCCombine.exe -nt -v -p -o Out-Combined-MVC.h264

Note also that joining the two commands with | is not an ideal method. When you do that, you send the messages of eac3to to MVCCombine, that has nothing to do with them, and you can't read them. You should preferably create two totally independent processes (in 2 command prompt windows), and type each command in its own window. Note that you must start the MVCCombine command first :
Command prompt 1:
MVCCombine.exe -nt -v -p -o Out-Combined-MVC.h264
Command prompt 2:
eac3to.exe F:\ 2: \\.\pipe\left.h264 3: \\.\pipe\right.h264 4: Audio.ac3 5: Subtitle.sup ...
You can now watch the progress of each command in its window.

Basically, it's what the next version of BD3D2MK3D will do.

Nico8583
14th May 2013, 23:20
Thanks for infos, I will try this :-)

frencher
15th May 2013, 07:25
I have a question. When I use this command :
eac3to.exe F:\ 2: \\.\pipe\left.h264 3: \\.\pipe\right.h264 | MVCCombine.exe -nt -v -p -o Out-Combined-MVC.h264
Is it possible to extract another stream in this command ? For example :
eac3to.exe F:\ 2: \\.\pipe\left.h264 3: \\.\pipe\right.h264 | MVCCombine.exe -nt -v -p -o Out-Combined-MVC.h264 4:Audio.ac3 5:Subtitle.sup ... ?
Thanks !

In progress ;)
http://i43.tinypic.com/a4msfr.png

Cedvano
15th May 2013, 16:46
The project is under discussion with Nico8583

:goodpost: The ultimate demo package with CMD and sourcecode for convert MVC combined 3D Video (http://ul.to/79si0tz2) :logfile:
MVC to MVC and MVC>YUV>MVC from Intel MEDIA SDK 2013

But YUV take up much space. 500Gb for 1 movie and for the left eye only. :scared:

It would be best MVC to MVC like BD.

and combined MVC doesn't work with BD specifications.

frencher
15th May 2013, 20:20
But YUV take up much space. 500Gb for 1 movie and for the left eye only. :scared:

It would be best MVC to MVC like BD.

and combined MVC doesn't work with BD specifications.

Please, post your cmd line

vanden
22nd May 2013, 14:54
Stereoscopic Player Version History
Version 2.0.6 (May 5, 2013)

Added antialiasing to the image border in Oculus Rift mode.
Added Playback|Jump Backwards|Last Position command.
Added support for single-PID MVC MPEG transport streams.
Added -ir command line parameter to set the input orientation.
Added the following OLE Automation commands:
GetWindowBorderVisible
SetWindowBorderVisible
GetMenuVisible
SetMenuVisible
GetToolbarVisible
SetToolbarVisible
GetSwapLeftRight
SetSwapLeftRight
StepForwards
StepBackwards
Replay
GetEffectControlSerialOutputEnabled
SetEffectControlSerialOutputEnabled
GetEffectControlUDPOutputEnabled
SetEffectControlUDPOutputEnabled
GetEffectControlDMXOutputEnabled
SetEffectControlDMXOutputEnabled
GetEffectControlCommandExecutionEnabled
SetEffectControlCommandExecutionEnabled
Added DMX device sharing between multiple processes.
Changed: Updated MPEG splitter.
Changed: Updated AVC/MVC decoder.
Fixed Orientation dropdown list in the Video Properties dialog.
Fixed crash when cancelling renaming of library items.


it works with raw stream of combinemvc (without the -ano option) mux in m2ts with tsMuxeR.
but does not work with raw stream of combinemvc mux to mkv with mkvmerge ...
and do not work with MakeMKV files (remux in m2ts with tsMuxeR).

Neisklar
23rd May 2013, 20:53
Stereoscopic Player Version History
Version 2.0.6 (May 5, 2013)

Changed: Updated MPEG splitter.
Changed: Updated AVC/MVC decoder.

New Splitter and most of all new MVC Decoder!!!

Anyone had a try?

I'm still busy doing educational stuff, so had'nt the time for that.
Maybe the new Decoder even works with the old STF.dll in single stream MVC-mode.
Sadly the new stf.dll is not usable (without some documentation by Peter) since the interface changed.