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
30th April 2012, 14:58
I'm currently writing a GUI to generate the AVS file automatically from any MPLS file. It works already fine. It can retrieve the number of frames without having to demux, including when the MPLS references several M2TS files. (I use xport.exe for that purpose, as it is fast and doesn't require to demux anything just to count the frames, but eac3to is used if the user wants to demux an audio stream as well.)

The GUI shows the available stereoscopic MPLS files and the information about the streams they contain. There are options to convert to side by side or top/bottom, and to select the resize filter. You can also preview the MPLS or any of the referenced M2TS file with your preferred player.

I would like to add an option to hardcode a subtitle stream as well, but I have two problems.

1. I need a tool to convert the BD SUP format to IDX/SUB, similar to BDSup2Sub but that can be driven from the command line.

Anyone knows a CLI program to convert SUP to SUB? Or is it possible to do it with BDSup2Sub? (As far as I know, BDSup2Sub has no command line arguments.) Or do you know an avisynth filter similar to VobSub but that works with SUP?

2. Currently, I know how to demux the subtitle stream associated with the first video stream (usually the left eye), but I haven't found a way to demux the stream for the other eye, and even to automatically find in what file(s) it is located. It is not absolutely necessary to demux the subtitles for the two eyes as the same stream can be used for the two views, but in some cases the subtitles are slightly different to show the stereoscopic subtitle at various positions along the Z axis. It's useful to avoid strange effects when the subtitle is over an object that springs out of the screen.

How can I know what M2TS file contains the right eye video and subtitle streams? How can I demux the subpic stream from the right-eye file?

Any pointer will be much appreciated.

[EDIT] Hum, it appears that BDSup2Sub has a command line. So, problem 1 is already solved. :-)

crl2007
30th April 2012, 17:09
I don't think you really can demux the SSIF file. There's no demuxer/remuxer for free yet. There's no M2TS for the right stream, there's the SSIF associated with the left M2TS.

r0lZ
30th April 2012, 17:16
OK, thanks for the info.

BTW, can I assume that the SSIF file for a specific MPLS has the same filename (or the same number) that the corresponding M2TS file?

crl2007
30th April 2012, 17:24
Yes, it usually has the same number as the corresponding M2TS file. You can use BDInfo to see this. Press "Settings" and check "Enable SSIF scanning". Or you can use BDEdit for the same purpose.

r0lZ
30th April 2012, 17:47
Hum, I don't like your "usually"! I would like to be sure that it's always the case.
But anyway, if it is impossible to demux the subtitle streams from the SSIF, I don't really need the information. I was still hoping that the subpic stream can be demuxed, as IMO the subtitle streams are certainly encoded and probably muxed the same way than in the M2TS file. It should therefore be possible to demux it (and ignore the video stream). Just my 2 cents, as I don't know much about muxing stuff, and even less about SSIF.

frencher
30th April 2012, 18:48
I'm currently writing a GUI to generate the AVS file automatically from any MPLS file. It works already fine. It can retrieve the number of frames without having to demux, including when the MPLS references several M2TS files. (I use xport.exe for that purpose, as it is fast and doesn't require to demux anything just to count the frames, but eac3to is used if the user wants to demux an audio stream as well.)

The GUI shows the available stereoscopic MPLS files and the information about the streams they contain. There are options to convert to side by side or top/bottom, and to select the resize filter. You can also preview the MPLS or any of the referenced M2TS file with your preferred player.

I would like to add an option to hardcode a subtitle stream as well, but I have two problems.

1. I need a tool to convert the BD SUP format to IDX/SUB, similar to BDSup2Sub but that can be driven from the command line.

Anyone knows a CLI program to convert SUP to SUB? Or is it possible to do it with BDSup2Sub? (As far as I know, BDSup2Sub has no command line arguments.) Or do you know an avisynth filter similar to VobSub but that works with SUP?

2. Currently, I know how to demux the subtitle stream associated with the first video stream (usually the left eye), but I haven't found a way to demux the stream for the other eye, and even to automatically find in what file(s) it is located. It is not absolutely necessary to demux the subtitles for the two eyes as the same stream can be used for the two views, but in some cases the subtitles are slightly different to show the stereoscopic subtitle at various positions along the Z axis. It's useful to avoid strange effects when the subtitle is over an object that springs out of the screen.

How can I know what M2TS file contains the right eye video and subtitle streams? How can I demux the subpic stream from the right-eye file?

Any pointer will be much appreciated.

[EDIT] Hum, it appears that BDSup2Sub has a command line. So, problem 1 is already solved. :-)

Hi

I am finishing my GUI with all options possible for a quick edit to the final file

r0lZ
30th April 2012, 18:52
Oh, well! Your GUI will also encode the AVS script? And it will be possible to hardcode the subtitles? If it's the case, I will probably abandon mine...

frencher
30th April 2012, 18:58
Oh, well! Your GUI will also encode the AVS script ?
Yes ;)

I did not even interested in subtitles subtitle tracks but some titles use the same track. "Sup" for subtitles and forced subtitles

r0lZ
30th April 2012, 19:15
Usually, I watch the 3D movies in my native language, French, but there are some movies in foreign language only and in that case the subtitles are needed. Forced subtitles are perhaps also necessary in some cases, but anyway BDsup2sub can open a SUP file with forced and non-forced subtitles and generate a SUB file with only the forced subtitles.

For me, it is important to hardcode the subtitles in the video stream, as my Samsung TV cannot show the SUP or SUB subtitles, and I hate to have to convert them to SRT. Also, the TV shows them in "flat mode" (at the position of the screen), but when they are hardcoded, it is possible to place them exactly where you want them, for example in the black border below the cinemascope area and with some 3D effect so that they appear in front of the objects. I did that manually recently, but that took much time, so I've decided to make my GUI.

BTW, will your GUI be available soon?

frencher
30th April 2012, 19:48
@r0lZ

I will answer in MP and French here will be simpler

r0lZ
2nd May 2012, 13:22
I'm wondering why the ssifSource binary files must be copied in the script directory. IMO, it's a major drawback, and it's not clean, especially when the conversion is started from a GUI, supposed to hide the implementation details to the user. Also, if the files are stored elsewhere and ssifsource is called with a path in the script, the script crashes immediately, without any error message.

Is it a solution? Is it a problem with the paths used by a specific program? Can this problem be fixed somehow?

slavanap
3rd May 2012, 09:42
Hey guys,

I successfully used x264 (x86 version) with ssifsource and a script similar to the test.avs included in the package.

I usually encode using avs2yuv.exe to pipe the AVS to x264-x64, however it doesn't work with avs's containing ssifsource.

Is there any way to pipe the AVS to x264 instead of having x264 directly read the avs?

Thank you.

There are x32 and x64 versions of ssifSource with "ERROR READING PIPE" message fixed
http://sendfile.su/584222
Not tested at Avisynth x64, hope it will work.

Other bug I will try to fix today's evening. Everyone, thank you for your replies!

r0lZ
3rd May 2012, 09:53
Great! Thanks!

BTW, someone has tested the various x64 ports of AviSynth? Is it one version that works well?

crl2007
3rd May 2012, 12:58
This (http://forum.doom9.org/showthread.php?t=152800) worked well when I was using it. I now use 2.6.0 32-bit.

r0lZ
3rd May 2012, 13:10
Thanks! I'll try it asap!

slavanap
3rd May 2012, 23:08
New version http://sendfile.su/585738
with path bug fixed and unusual termination bug fixed.

r0lZ
4th May 2012, 07:24
Thanks! :)

Cedvano
4th May 2012, 09:24
Thanks slavanap ! Good work !
I use it for encode only the right file.

There is an option to encode only the right eye without crop (it's for increase speed encode) ?

frencher
9th May 2012, 06:36
Sorry I did not have much time right now :(

My GUI In progress ;) What do you think ?

http://i50.tinypic.com/10xbl93.png

r0lZ
9th May 2012, 06:54
Seems very nice.
Will it encode, or just demux and generate the script to encode?

frencher
9th May 2012, 07:08
Seems very nice.
Will it encode, or just demux and generate the script to encode?

Thank You ;)

He will do everything, including 2 pass encoding

r0lZ
9th May 2012, 07:11
I don't think you really can demux the SSIF file. There's no demuxer/remuxer for free yet. There's no M2TS for the right stream, there's the SSIF associated with the left M2TS.
The SSIF file cannot be demuxed, that's right, but the corresponding M2TS files for the left and right eyes can be demuxed, with the exception of the video stream of the right eye. So, if there is a subtitle stream for the right eye, it can be demuxed, and combined with the subtitle for the left eye to recreate the 3D subtitle and hardcode it on the video.

Unfortunately, it is impossible to know with the current CLI tools if a subtitle stream present in the right-eye M2TS corresponds really to the one in the left M2TS. The stream has to be demuxed, just to count the number of subtitles it contains. If that number is equal to the number of subtitles in the left-M2TS (and it has the same language code), then we can probably assume that it's the subtitle for the right eye. (Of course, it can also be verified visually with BDSup2Sub.)

I am still wondering if there are often 3D subtitles in the BDs. I have several BDs here, but none of them have a subtitle stream in the right-M2TS, or, when they have some streams, they are completely different. For example, in Avatar (French edition), the subtitle stream in the right M2TS contains only messages telling that this is a 3D movie and that you must use the 3D glasses. It's a pity, as in the theatrical version the forced subtitles are in 3D.

r0lZ
9th May 2012, 07:14
He will do everything including 2 pass encoding
Nice! I hope it will be also possible to encode in one CRF pass. Using two passes is only useful if you want to control precisely the size of the output file, but it will be desperately slow!

frencher
9th May 2012, 07:19
Nice! I hope it will be also possible to encode in one CRF pass. Using two passes is only useful if you want to control precisely the size of the output file, but it will be desperately slow!

Of course it will be possible to select a single pass CRF, LOSSLESS, mp4, mkv, AVCHD ....
2-pass mode is much faster (the second pass does not decode it and use x64 CPU's)

Cedvano
9th May 2012, 08:30
Nice job frencher.

How do you encode the 3DBD ? Anaglyph, SBS... ?

And for menu ?

I work actually on software like this. But in MVC (most compatibility with 3D players).

frencher
9th May 2012, 17:07
Nice job frencher.

How do you encode the 3DBD ? Anaglyph, SBS... ?

And for menu ?

I work actually on software like this. But in MVC (most compatibility with 3D players).

Everything here is provided interlaced mode, red and blue, upper under etc., in fact all all all ...

frencher
10th May 2012, 19:45
n'Vidia GTX 680 AVC + MVC encoding Hummm.... (http://www.pcinpact.com/dossier/geforce-gtx680-gk104-kepler-nvidia/208-3.htm)

r0lZ
10th May 2012, 20:08
Interesting, but what software will be able to use that hardware encoder? Will it be free?

frencher
10th May 2012, 20:26
From what I understand you need a GTX 680 if I remember correctly ...

Cedvano
11th May 2012, 08:28
It's just an help for encoding MVC, not a codec.

frencher
12th May 2012, 07:10
http://i47.tinypic.com/2co1ksh.png

frencher
16th May 2012, 06:42
3D Subtitle Editor (http://ul.to/tay9459s)

r0lZ
16th May 2012, 06:51
Who did it? You?

frencher
16th May 2012, 06:55
No it's not me from RIP 3dblurayiso

r0lZ
16th May 2012, 07:16
Is it a homepage somewhere?

frencher
16th May 2012, 07:18
No :( 3dblurayiso is down, no update found

r0lZ
16th May 2012, 07:23
Pity. Luckilly, you have the editor! :-)
I will try it when I'll have some free time...

Cedvano
17th May 2012, 10:54
Hi,

I convert 3DBD MVC (Commercial BD) in 3DBD Frame sequential (l,r,l,r,...).
That's work fine. I keep full HD and menu.
But I don't have autoswitch 3D. I have to manually activate the option.

I have read that some bd are in fs. (Yogi bear and The lover's guide (http://www.amazon.fr/The-Lovers-Guide-3D-Igniting/dp/B004EWGHHU) (for adult only))
If someone have one of this can confirm that?

If yes, can send me CLPI and MPLS files ?
It's for the autoswitch option.

Thank's

r0lZ
19th May 2012, 11:33
I have a couple of noob questions about avisynth and the VSFilter.

I wonder if it is necessary to install Avisynth to use the avisynth.dll. In other words, is it sufficient to copy the dll (as well as the required plugins) somewhere in the windows %path% to use it?
Similarly, to use the x64 version of avisynth.dll, is it sufficient to put it in the path, and be sure that the x64 DLL will be found BEFORE the 64bit version (for example by adding the directory containing avisynth.dll x64 at the beginning of the %path% environment variable)?

Also, do you know if DirectVobSub must be installed to use the VSFilter plugin in the avisynth script? In other words, is VSFilter.dll a standalone avisynth plugin, or does it require DirectVobSub?

@frencher: The 3D Subtitle Editor works great to encode a SRT text file to 3D SUB/IDX, but unfortunately, it cannot process the SUP files, and is therefore useless to convert the BD-3D subtitles to side by side or top/bottom. Pity, but it's a good tool to have in our arsenal. Thanks for the finding!

nickolasemp
21st May 2012, 18:49
It already exists (stereoscopic player) with CoreAVCDecoder.dll but is not free right what I find a shame.

Ok, I have bought the stereoscopic player. How can I use CoreAVCDecoder.dll to encode the right view file?
I get an "avs [error]: Plugin CoreAVCDecoder.dll is not an AviSynth 2.5 plugin.", which I find quite right...

LoadPlugin("ffms2.dll")
lv1=FFVideoSource("files\left.mkv", threads=1).AssumeFPS(24000,1001)
lv=crop(lv1,0, 140, 0, -140)
#LoadPlugin("H264StereoSource.dll")
#rv1=H264StereoSource("decoder.cfg", 189932)
LoadPlugin("CoreAVCDecoder.dll")
rv1=CoreAVCDecoder("decoder.cfg", 189932)
rv=crop(rv1,0, 140, 0, -140)
LeftRight3D(lv, rv)
ConvertToYV12()

Could anyone provide a way to do a 3D conversion according to frencher's way? I mean using using rawsource.
H264stereosource.dll gives me a
RefPicList0[ num_ref_idx_l0_active_minus1 ] is equal to 'no reference picture'
RefPicList0[ num_ref_idx_l0_active_minus1 ] is equal to 'no reference picture'
RefPicList0[ num_ref_idx_l0_active_minus1 ] is equal to 'no reference picture'
RefPicList0[ num_ref_idx_l0_active_minus1 ] is equal to 'no reference picture'
RefPicList0[ num_ref_idx_l0_active_minus1 ] is equal to 'no reference picture'
RefPicList0[ num_ref_idx_l0_active_minus1 ] is equal to 'no reference picture'
RefPicList0[ 1 ] is equal to 'no reference picture'
RefPicList0[ 1 ] is equal to 'no reference picture'
RefPicList0[ 1 ] is equal to 'no reference picture'
RefPicList0[ 1 ] is equal to 'no reference picture'
RefPicList0[ 1 ] is equal to 'no reference picture'
RefPicList0[ 1 ] is equal to 'no reference picture'

r0lZ
25th May 2012, 13:51
I've finished the first version of my GUI: BD3D2AVS

It might still be full of bugs, so consider it as an alpha preview, but I have used it successfully to encode several short 3D movies I have here.

Later, when the program will be a bit more seriously tested, I will create a new thread to distribute it officially, but for now, I prefer to keep it here.

[Obsolete download links removed]

I did two different archives, as I may have to release several versions of the GUI itself during its development phase, but the toolset should not need to be updated each time.

To install the program, extract BD3D2AVS.exe to any folder, then extract the folder "toolset" to the same folder. (In other words, the folder toolset must be in the same folder as BD3D2AVS.exe)
You must have properly installed Avisynth (x32 and optionally x64).
If you want to automatically create the MKV video file at the end of the process, you must also install mkvtoolnix.
If you want to hardcode a subtitle file on the video, you must also install DirectVobSub (x32 and/or x64, depending of the Avisynth version you want to use), although I'm still not sure it's necessary. (Someone who has NOT installed DirectVobSub can confirm that the vsfilter plugin works correctly with Avisynth?)
All other required files are included in the toolset.

Comments, bug reports and suggestions are welcome.

Enjoy!

[EDIT] v0.1 is obsolete. Please download the latest version (http://forum.doom9.org/showthread.php?p=1579210#post1579210).

Cedvano
25th May 2012, 14:36
It's good, but the cmd can't run.

Why do not make auto encode ?

PurpleMan
25th May 2012, 14:59
Looks good.

Can you explain the line:

Return(last + BlankClip(last, 72))#.Info()

please?

Thank you.

r0lZ
25th May 2012, 16:21
It's good, but the cmd can't run.
What cmd? Do you mean each command launched with "cmd.exe"? cmd.exe should be available on all Windows platforms, except Win9x.

Why do not make auto encode ?
What is "auto encode"?

r0lZ
25th May 2012, 16:32
Return(last + BlankClip(last, 72))#.Info()
The script returns the final video, padded with 3 additional seconds of black video. I did that, because, sometimes, the original video is stopped abruptly. Another reason is that, if you want to mux an audio stream in another language coming from, for example, a DVD, it may be somewhat longer than the video.

So, the 72 is the number of black frames added to the original video. That number depends of the frame rate, and is 72 for 24 or 23.976 fps.

If you uncomment the final .info(), you can see the information about the final clip on the video, for example in AvsPmod. It's useful if you want to manually modify the script. (Don't forget to remove or comment it out before launching the encode process!)

Anyway, if you don't like the additional 3 seconds of black, you can simply delete that line.

frencher
1st June 2012, 00:14
My firt release v0.0.0.0001,

Download
rar => Look in my signature

I'm interested in any comments, Sorry for bugs :p

In the event for killing all precessus => Ctrl + Alt + Shift + K

http://i47.tinypic.com/2co1ksh.png

r0lZ
1st June 2012, 09:03
Hum, tried your GUI, but got a lot of problems.

1. My behaviour based antivirus (Emsisoft Mamutu) issues a lot of warnings: program tries to manipulate other process and program tries to download invisibly from internet. Not to worry IMO, so I've allowed all. But some people may think your program is a virus.

2. After having dropped index.bdmv on the window, I had to wait a very long time (about 30 seconds) before seeing something happening.

3. After having clicked on the M2TS in the lower left pane, the preview starts, but with a very irritating DOS window on top of the preview.

4. Every minute or so, I have a dialog from Multimedia Player with "Couldn't create the file!E:\Temp\Pub_3DBD's Free.htm". (Note the "!" in front of the file name.)

5. Not sure how I did that, but finally I got something showing in the top center pane: just a single checkbox with the chapters icon but without text, and no entry for the video and audio streams. (The title I've selected has no subtitles.)

6. Tried to select the output folder anyway. The folder selection dialogue can't create a new folder, so I closed it and did it with Explorer. Now, I had to retry about 10 times to be able to re-open the output folder dialogue. Not sure why.

7. Finally, I clicked Go, but soon after, I've heard the eac3to sound indicating that there was an error. The output folder is empty, no error message is displayed, and I haven't found a log.

Let me know if I can help locate the origin of some of these issues.

frencher
1st June 2012, 10:50
Hum, tried your GUI, but got a lot of problems.

1. My behaviour based antivirus (Emsisoft Mamutu) issues a lot of warnings: program tries to manipulate other process and program tries to download invisibly from internet. Not to worry IMO, so I've allowed all. But some people may think your program is a virus.

2. After having dropped index.bdmv on the window, I had to wait a very long time (about 30 seconds) before seeing something happening.

3. After having clicked on the M2TS in the lower left pane, the preview starts, but with a very irritating DOS window on top of the preview.

4. Every minute or so, I have a dialog from Multimedia Player with "Couldn't create the file!E:\Temp\Pub_3DBD's Free.htm". (Note the "!" in front of the file name.)

5. Not sure how I did that, but finally I got something showing in the top center pane: just a single checkbox with the chapters icon but without text, and no entry for the video and audio streams. (The title I've selected has no subtitles.)

6. Tried to select the output folder anyway. The folder selection dialogue can't create a new folder, so I closed it and did it with Explorer. Now, I had to retry about 10 times to be able to re-open the output folder dialogue. Not sure why.

7. Finally, I clicked Go, but soon after, I've heard the eac3to sound indicating that there was an error. The output folder is empty, no error message is displayed, and I haven't found a log.

Let me know if I can help locate the origin of some of these issues.

What is the name of the iso or BD disc that I can check for errors.

Will it be possible to screen shots of these errors for this comprehensive preview, with AVAST and I have not updated this problem.

I had this problem when windows update was wondering the updates, i got stuck here even flash player, microsoft weird, they would block the API when an update is ready to be installed ?

Can you give me the features of your PC, CPU, RAM, OS, x86 or x64, hard drive capacity.

Thank you for your answers.

Video of operation on my PC (http://www.youtube.com/watch?v=0TSJDQD0B_M)

r0lZ
1st June 2012, 11:48
I've tested with The Nightmare Before Christmas.

http://img140.imageshack.us/img140/85/20120601093612.png (http://imageshack.us/photo/my-images/140/20120601093612.png/)

http://img163.imageshack.us/img163/415/20120601093709.png (http://imageshack.us/photo/my-images/163/20120601093709.png/)

I don't think Windows Update was working when I did my tests, but I was downloading a large file. Could it be the reason?

I have Avast free as my main antivirus, plus Mamutu to block malicious programs behaviour.

Win7 SP1 x64, Intel Core2 Quad Q8200 @2.33GHz, 4GB RAM, several HDDs.
Disc space is not a problem. I did my test with a small trailer of Cars 2 3D. (It has only one audio stream, no subtitles)

frencher
6th June 2012, 09:00
Update 3DBD's Free - v0.0.0.0002 Demo Test version

Download
rar => Look in my signature

v0.0.0.0002
Added: Terms and conditions of use
Added: Selection of the working folder output
Added: Indicator Update added
Added: Testing a progress bar
Portable version without installation
Removed "CMD" in preview mode
Some fixes...

All comments are welcome

http://i50.tinypic.com/1z53p0o.png