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

crl2007
21st June 2010, 17:50
This guide adresses to the new BD 3D format.

Software and codecs needed:

1. ffdshow (http://www.xvidvideo.ru/ffdshow-tryouts-project-x86-x64/) + haali (http://multiAVCHD.deanBG.com/haali_MatroskaSplitter_11-01-2009.exe)
2. MVC Decoder (http://www.fbx.ro/4cbzkmk91j46j3v3) - free
3. eac3to (http://forum.doom9.org/showthread.php?t=125966) - free
4. x264 (http://komisar.gin.by/) - free
5. Stereoscopic Player (http://www.3dtv.at/Index_en.aspx) - not free
6. Preferred Filter Tweaker for Windows 7 (http://www.codecguide.com/windows7_preferred_filter_tweaker.htm) - it's free and straight forward
7. multiAVCHD (http://multiavchd.deanbg.com/) - free
8. ArcSoft TotalMedia Theatre 3 Platinum (http://www.arcsoft.com/public/software_title.asp?ProductID=362) or PowerDVD 9 (http://www.cyberlink.com/products/powerdvd/overview_en_US.html) - not free


Let's start. Pay attention and don't skip any steps.

STEREOSCOPIC LEFT+RIGHT CONVERSION

1. Demux the mpls with eac3to. eac3to x:\path\movie.mpls -demux. You will get all streams demuxed, but you'll need only video and audio streams (left video + right video + audio stream). You'll see (left) and (right) as part of the file name of the video streams (h264). For convenience, rename the demuxed audio (dts/ac3/lpcm) to audio.dts (or audio.ac3 or audio.lpcm) or audio_01.dts/audio_02.ac3 if you have more than one audio track.

2. Create a 3D Workspace folder and copy in there the mvc decoder, the x264 codec, the avs script included and the left + right video + audio streams.

3. Rename the video streams (left.h264, right.h264). This is needed if you don't want to edit "decoder.cfg" all the time to insert the name of the streams in there.

4. Edit the avs script and put in there the duration, in frames, of the movie. You must include the ms. You can find out the frame number from eac3to.

http://thumbnails24.imagebam.com/8536/17de8b85354948.jpg (http://www.imagebam.com/image/17de8b85354948)

You can also do it manually. That's done like this:

Example: For a 00:02:27.106 movie the ecuation is 147,106*(24000/1001) and you'll have 3527 frames.

My script looks like this:

LoadPlugin("H264StereoSource.dll")
H264StereoSource("decoder.cfg",3527)

Save it.

5. Open a command prompt for x264 and use the avs to encode the right eye stream (tutorials for x264 can be found on doom9 too). When x264 reaches the end, you will get an error. This has no impact on the movie. Keep in mind that this decoder is really, really slow. On a q9550 and 4 GB RAM it didn't go higher than 3 fps.

6. Open mkvmerge and add left.h264 + audio.dts (or audio.ac3, audio.lpcm). Select the video stream and from the "Format specific option" tab and set the fps to 24000/1001 (mkvmerge will set it to 25 fps by default). Mux them together.

7. After the remux is done, remove all from mkvmerge and insert the encoded right eye stream. Set the FPS to 24000/1001 as for the left one above and hit mux.

8. Now they are ready to be played in Stereoscopic Player. Open Stereoscopic Player - File - Open Left and Right file, select the 2 streams and check "Use audio track from left file".

ANAGLYPH ONLY CONVERSION

1. Open multiAVCHD and drag and drop the movie playlist.

2. Do the following settings:

http://thumbnails25.imagebam.com/8536/0ba02085352557.jpg (http://www.imagebam.com/image/0ba02085352557) http://thumbnails27.imagebam.com/6292/6cc91762915819.gif (http://www.imagebam.com/image/6cc91762915819) http://thumbnails27.imagebam.com/6292/3b784062916754.gif (http://www.imagebam.com/image/3b784062916754)

3. Press transcode, choose your settings and check "Create 3D Anaglyph".

http://thumbnails15.imagebam.com/8535/99900385349935.jpg (http://www.imagebam.com/image/99900385349935)

Click "Apply".

4. You can add as many subtitle streams you want and as many audio streams you want from the "Audio" and "External Subtitles" stream.

5. Click "OK".

6. Click start and let multiAVCHD work.

Important Update: You can now select from multiavchd more 3D modes ( green/magenta, top/bottom, left/right etc ). All you have to do is to set your mode before adding a playlist. The same steps as for anaglyph are used here too.

http://thumbnails30.imagebam.com/8645/5f2e0486440654.jpg (http://www.imagebam.com/image/5f2e0486440654)

SUBTITLE FOR STEREOSCOPIC 3D MOVIES

Software Needed:

1. 3D Subtitler (http://84.27.10.123/3DSubtitler/)

The software is pretty straightforward.

If you have something to add, please feel free.

chocolate elvis
29th June 2010, 02:51
Hi,
Thanks for the post. Have trouble getting it to work though.

Do you mind expanding #5 "Open a command prompt for x264 and use the avs to encode the right eye stream (tutorials for x264 can be found on doom9 too)."

Thanks!

Guest
29th June 2010, 03:05
What do you not understand about it? Looks perfectly clear to me.

crl2007
29th June 2010, 09:58
You open a command prompt and you write there: x264 --x264 parameters --output.264 *.avs

l.e. I've updated the guide with the new MVC Decoder ( now it supports 720p sources too ) and with an alternate option for stereoscopic + new modes conversion ( for people that don't know how to use x264 ).

deank
29th June 2010, 09:58
Btw the latest version of the H264StereoSource.dll (http://multiavchd.deanbg.com/3d/H264StereoSource.rar) supports 1280x720.

chocolate elvis
30th June 2010, 01:50
Can someone cut and paste a sample command for a moron? Can get left to decode but not right. Thanks

crl2007
30th June 2010, 13:37
I wrote in the guide that now you can achieve the same with multiavchd only. You don't need x264 if you don't know how to use it.

chocolate elvis
30th June 2010, 18:22
Thanks, but I'm trying to reconstruct the right eye as a mp4. So the result is a full 1920x1080 left eye, and 1920x1080 right eye, Can't seem to decode the right eye w/o errors.

crl2007
30th June 2010, 20:37
x264.exe --crf 17 --tune film -I 24 --weightp 0 --b-pyramid none --sar 1:1 --aud --rc-lookahead 6 --output right_final.264 sample.avs This is a useful commandline.

rik1138
9th August 2010, 21:20
Is the Right eye stream sort of a 'difference' stream based on the Left eye? Can the right eye MVC be re-built from the PlayList without actually re-encoding the video? (I'm gathering the x264 command above is actually re-encoding the right eye stream to create the .264 file...)

I need to take 3D video from multiple Blu-ray discs and combine it all on one disc, preferably without re-encoding any of it... I can't seem to find an easy way to pull it off.

(I'll re-encode if I have to, just trying to avoid it...)

deank
9th August 2010, 21:44
Alex's mod for Version JM 17.1 allows YUV decoding of right eye stream. Source files for regular H.264 decoding are available, but he didn't respond after requests to share the mod source for right eye decoding. Either way we/you need a way to recreate the 'delta' ssif files (which are same content wise) as r-eye m2ts files.

I'll try again to poke him ;)

rik1138
9th August 2010, 23:21
Are there any tools available yet that can take a couple of lt + right-dependent MVC streams and build a functioning disc (creating the ssif, etc)?

If that's not available yet, I might have to go with re-encoding anyway... The authoring software I'm using won't seem to take MVC streams ripped off of a Blu-ray disc, unless they are MVC streams it created in the first place... Not sure why.

But, if I have to, I can re-encode the two streams, it's just a matter of getting that right-eye stream as a valid AVC file by itself. I tried the .x264 method above, but it gives me an error about loading the h264StereoSource.dll and doesn't work... My first time trying it, so I'm probably doing something wrong, just haven't figured it out yet...

crl2007
10th August 2010, 07:22
There is no such software yet. And as far as that error, you most probably wrote the wrong path for the dll in the avs script.

rik1138
10th August 2010, 08:17
That's what I figured... I have the .dll in the same directory as the .avs script, so I just had the file name itself. I then tried using the complete path, and I still got the error... Is it just that one .dll that's needed, or should there be other files with it? (Or maybe point it to the one in the MultiAVCHD directory?) I'll play with it more tomorrow... I'm sure I've just done something wrong. :)

crl2007
10th August 2010, 14:59
It's just that dll and that cfg file.

rik1138
10th August 2010, 18:54
Not sure what I'm doing wrong here... I have these files in the directory:
H264StereoSource.cfg
H264StereoSource.dll
l.h264
r.h264
sample.avs
x264.exe

Config file:
InputFile = "l.h264"
InputFile2 = "r.h264"
FileFormat = 0
POCScale = 1
# decoder control parameters
DisplayDecParams = 1
ConcealMode = 0
RefPOCGap = 2
POCGap = 2
IntraProfileDeblocking = 1
DecFrmNum = 0

sample.avs:
LoadPlugin("H264StereoSource.dll")
H264StereoSource("H264StereoSource.cfg",3788)

I use your x264 command line posted above exactly, and get this:
avc [error]: LoadPlugin: unable to load "H264StereoSource.dll"
(sample.avs, line 1)
x264 [error]: could not open input file 'sample.avs'

Any thoughts? Does anything look wrong? I can play the l.h264 file in Media Player just fine... But could it be related to other installed AVC codecs?

deank
10th August 2010, 20:00
I got the same error yesterday on my office computer (with multiAVCHD, trying to load the plugin). I believe it is compiled for certain CPU (OS?!) :( :confused:

Works fine on my laptop Vista 32bit Intel PC, but fails with my desktop office XP SP2 Intel PC. Both with Core2Duo CPUs.

//

Thinking about it, I'll try to install .NET on my office PC and will test again tomorrow. It may be .NET compiled (the .dll).

rik1138
11th August 2010, 03:02
Hmm, maybe it's a Visual C++ thing? I had to install the Microsoft Visual C++ libraries for another app (didn't have it installed apparently), and now the x264 gets further (seems to load the .dll okay, recognizes the video file, but then crashes with an exception error...). The crash could be due to the video files I'm using, I'll try it on others tomorrow...

I would have though x264 wouldn't work at all if it needed the VisC stuff, but it did seem to get further...

Vis C here:
http://www.microsoft.com/downloads/en/confirmation.aspx?familyId=d5692ce4-adad-4000-abfe-64628a267ef0&displayLang=en

Limobar
23rd October 2010, 19:18
My way of creating a single file 3d encode, is the following:

1. I encode the right eye lossless (x264 -q0 -m1 -A i4x4 --no-cabac), using the MVC sample script, to create a right eye that has the same quality as the left eye.

MVC sample script:
LoadPlugin("H264StereoSource.dll")
H264StereoSource("decoder.cfg",135266)

2. After that I create a half side-by-side encode using the following Avisynth script:

VideoLeft = directshowsource("C:\x264\left.mkv", audio=false)
VideoRight = directshowsource("C:\x264\right.mkv", audio=false)
VideoStacked = StackHorizontal(VideoRight,VideoLeft)
lanczosresize(1920,1080)
ConvertToYV12(VideoStacked)

and high quality x264 settings, depending on the source.

My question is: Is it possible to leave out step one and do the final encode directly? I think it is possible, otherwise it wouldn't be possible to do step 1, but how?

crl2007
24th October 2010, 00:49
You have to decode the MVC stream, there's no faster method yet.

JK1974
25th October 2010, 17:18
You can integrate the MVC decoding script into the side-by-side script. The main disadvantage is, that the MVC decoding seems to stop a few frames before the AVC decoding which causes e.g. VirtualDub and x264 to crash short before the end of the decoding. However, if you use single pass encoding, you can ignore the x264 general protection fault and mux it without problems with MKVmerge GUI.

Limobar
26th October 2010, 02:20
I don't mind to use crf encoding, so I tried to merge the two scripts, but without success. MeGUI gives me an undescribed error.

This is the script I tried:

LoadPlugin("H264StereoSource.dll")

VideoLeft = directshowsource("I:\BDMV\STREAM\00001.m2ts", audio=false)
VideoRight = H264StereoSource("decoder.cfg",135266)
VideoStacked = StackHorizontal(VideoRight,VideoLeft)
ConvertToYV12(VideoStacked)
lanczosresize(1920,1080)

MeGUI shows the 50% point of the video when you load the script. What I can see, is that the left side of my screen starts from the beginning of the video and the right side of my screen shows the 50% point of the video.

Please, help me to correct my script.

Limobar
5th November 2010, 03:00
I have another question about 3D.

One of the 3D techniques/methods is Side-By-Side (SBS). There is full-SBS (3840x1080 / 1920x1080 per eye) and half-SBS (1920x1080 / 960x1080 per eye).

I wonder what's the use of full-SBS, when our current televisions can only handle 1920x1080? I can only imagine that the television processes (cuts in two parts?) the bigger than resolution input once the 3d-button has been pushed, to make use of it.

Can somebody please explain how SBS works?

crl2007
5th November 2010, 09:03
There are projectors for higher resolutions and multi-monitor solutions. More info here (http://en.wikipedia.org/wiki/Stereoscopy#Side-by-side_.28non-shared_viewing_scenarios.29).

Limobar
5th November 2010, 09:33
Thanks for your answer and the link. Lots of interesting information, but I'm still not able to answer my question about the use of full-SBS (3840x1080) on a 1080p (1920x1080) television.

Is it possible that my television (Samsung PS63C7700 plasma) uses 50% of the resolution (1920x1080) per field (120 Hz, 60 fields per eye/second)?

crl2007
6th November 2010, 18:02
Of course. The image is resized for your display keeping the AR. But not to worry, you'll never loose quality. It's like watching 1080p movies on 720p ready tv sets.

Limobar
6th November 2010, 18:21
It's like watching 1080p movies on 720p ready tv sets.
I don't think that's the same. Watching 1080p on a 720p television will give you inferior 720p quality. Assuming that watching a 3840x1080 SBS encode will give me the same quality as watching a 3D Blu-Ray.

crl2007
6th November 2010, 20:52
If you encode something, automatically there is loss of quality.

Limobar
6th November 2010, 21:08
If you encode something, automatically there is loss of quality.
No, that's not always the case. You can encode lossless and keep the exact same quality.

Going from 1080p to 720p, using a real 1080p source, will certainly lead to a quality loss.


Let's go back to my original question:
I wonder what's the use of full-SBS (3840x1080), when our current televisions can only handle 1920x1080?

crl2007
6th November 2010, 21:27
Lossless if you have a TB HDD just for one movie.

And I just told you that there are projectors with much higher resolutions.

Limobar
6th November 2010, 21:59
It's not even close to 1TB for a single lossless movie. Most of the animation movies are not even 100GB when you encode them lossless with x264, using a Blu-Ray as source.

Without a doubt there is equipment that's able to output higher than 1080p resolutions, but that has nothing to do with full-SBS encodes and how they are meant to be processed.

This is how I think it works, but because I'm not sure, I want someone to confirm or to invalidate my assumptions. A 3DTV receives a 3840x1080 input @ 60Hz and, once the 3d button of the television has been pushed, outputs it as 1920x1080 @ 120Hz (60 fields per eye / second).

crl2007
7th November 2010, 09:45
And all other movies ? :) 200-300 GB at least. I gave you a link how it works. I'll give you another one. Read here (http://www.netblender.com/main/resources/understanding-3d/how-3d-works/frame-sequential-3d-vs-side-by-side-3d/).

JK1974
8th November 2010, 12:48
I think, full-sbs might be possible if you have an appropriate software player. But here it is also assumed that the player can output it in an appropriate way using HMDI.
Thinking about blu-ray players and streaming clients, I donīt think that full-sbs is the way to go. Furthermore, as 3D-TV also uses half-sbs, I think that this is some kind of pseudo-standard even in the 3D community as long as there is no (free) MVC encoder and an upgraded player that allows to playback MKVs with AVC+MVC embedded.
VLC currently even does not even allow anaglyph playback of half-sbs videos, and besides PowerDVD, TMT and Stereoscopic player, I donīt know any other alternative player that is capable of playing 3D content.
So I donīt think that there is an alternative to half-sbs in the near future if even half-sbs is currently "difficult" to be played back (for free) in 3D.

Limobar
9th November 2010, 12:58
After demuxing a Blu-Ray with 3D content, the left eye and right eye have completely different sizes. The right eye is about 50% of the left eye. Does anybody have an idea why this is? Is it maybe because, even though it has been demuxed, the right eye is not the same kind of file as the left eye?

digitalvideo
9th November 2010, 13:10
Limobar,

It's normal because right only code the change from left side

Limobar
9th November 2010, 15:43
That makes sense. That is why the MVC decoder needs the left eye stream, when it decodes the right eye stream.

Thanks for your answer.

bayex
18th November 2010, 22:10
I demuxed the video but cant remux right eye stream to mkv. DGAVCDec, mkvmerge does not work.dss extension can not turn with h264, I can not encode lossless. H264StereoSource does not work. What can I do?

GRKNGLR
18th November 2010, 22:17
I demuxed the video but cant remux right eye stream to mkv. DGAVCDec, mkvmerge does not work.dss extension can not turn with h264, I can not encode lossless. H264StereoSource does not work. What can I do?

I have same problem too.

Limobar
19th November 2010, 01:38
It's correct that you cannot remux the right eye stream. You have to encode it before you can remux it. To encode it, you need a decoder for it and that's when you use the MVC decoder.

The guide by crl2007 is pretty straightforward. Do exactly what he says and it should work.

wa0006
19th November 2010, 06:55
Sometimes work, always crash!

Limobar
19th November 2010, 08:25
It is supposed to crash. The encode crashes about 10-11 frames before the end. The output can be used to remux.

wa0006
19th November 2010, 16:49
It is supposed to crash. The encode crashes about 10-11 frames before the end. The output can be used to remux.

I kown that, but my x264 always crash from starting H264StereoSource.dll

bayex
19th November 2010, 21:00
MVC sample script:
Code:



The content decoder
InputFile = "C:\Users\bayex\Desktop\3d\left.h264" # H.264/AVC coded bitstream
InputFile2 = "C:\Users\bayex\Desktop\3d\right.h264" # H.264/AVC coded bitstream


script


LoadPlugin("H264StereoSource.dll")
H264StereoSource("decoder.cfg",135266)

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

VideoLeft = directshowsource("C:\x264\left.mkv", audio=false)
VideoRight = directshowsource("C:\x264\right.mkv", audio=false)
VideoStacked = StackHorizontal(VideoRight,VideoLeft)
lanczosresize(1920,1080)
ConvertToYV12(VideoStacked)

I can not demux the MKV can not be right

We are trying to encode new 3d new encoders can be a more descriptive form of expression.

@ Limobar, sbs full rips you how are you doing?

crl2007
20th November 2010, 08:59
The way I described here.

rica
23rd November 2010, 01:04
Thanks crl for the thread.

But instead of multi view, is there any other method of multiplexing?

Frame packed or frame sequential?

rica
24th November 2010, 03:41
OK, thanks for the response.

doc_dvxm
24th November 2010, 17:50
Thanx for your nice guide crl2007.

I am trying to do what you've saying...

After demuxing of the video I have a something like that:


M2TS, 2 video tracks, 5 audio tracks, 5 subtitle tracks, 1:43:13, 24p /1.001
1: Chapters, 11 chapters
2: h264/AVC (left eye), 1080p24 /1.001 (16:9)
3: h264/AVC (right eye), 1080p24 /1.001 (16:9)

Video track 2 contains 148488 frames.
Video track 3 contains 148488 frames.
eac3to processing took 12 minutes, 29 seconds.
Done.



My question is: Which frame counts do we need to use in MVC script, If the frame counts of this two "eye" tracks is different?

Everytime the framecount of the right eye track?

Thanx in advance,

doc

crl2007
24th November 2010, 18:41
The framecount can't be different for left and right eye, it's the same movie. As you can see in your example, the framecount is identical:

Video track 2 contains 148488 frames.
Video track 3 contains 148488 frames.

doc_dvxm
24th November 2010, 19:05
Ok. Thanx :)

Lyris
25th November 2010, 23:56
Oh my god, crl2007, you got a copy of the Panasonic 3D demo disc with that horrifying clip of the dogs! "Fuzzy Little Friends" or something?

At the Panasonic Convention 2010 me and some other people were crowded around the demo screens watching this footage in horror. It is so creepy yet so innocent.