Hi, I've encoded a 3d blu-ray to yellow and blue anaglyph using an avisynth script and Pantarheon. I wondered if any one knew of some tweaks to make it look a bit more like colorcode, or like stereoscopic player's yellow and blue optimizied? Or is there any other method, doesn't have to be avisynth. Thanks

Bloody

Post subject: Re: Encoding video to ColorCode anaglyph format?

Posted: 10 Aug 2010, 14:11

Site Admin

Joined:29 Apr 2010, 17:51Posts: 3148Location: Sofia, Bulgaria

If you find a description on how videos are encoded for colorcode you might be able to implement that with an Avisynth script yourself. Have you also tried the official ColorCode editor software, there is a free demo available for download on their website: http://www.colorcode3d.com/Editor.html

SetMTMode(4, 1) # For multicore procesor (you need copy MT.dll and its avisynth.dll in .../windows/system32 directory)# It can crash...#Technical info from MT documentation:#It contains the two new functions SetMTMode() and GetMTMode() and is needed by MT.dll. #Install it by overwriting avisynth.dll in your c:\windows\system32 (and remember to take a backup of the old file first)#On linux with Wine, I have with standard Avisynth version around 4 frame for second (Phenom II 4x) without MT version (MT don't work on linux for me) with DVD quality (~480p)

fR = DeleteFrame(fL, 0) # Set the right frame with one frame difference

# If W is less than 640, algorithm for light depth will not work good enough (integer number will eat pixels, because it depend of dW/2).dW = W / 128 # More depth perception, but little more artifact on details (it is usefull for me on 640x480 video)

fL = ConvertToRGB32(fL) # Input in RGB, because of 'crop-even' problem with YV12 (on some movie)

## Motion mask:super = MSuper(fR)bvectors = MAnalyse(super, isb = true, blksize=32) # greatest blocksize, less problem with picture and best speed (I have been reported that on Vista 64 bit has error with 32 with some old version of mvtools2.dll).

# Posible improvement in this part of code :# 1. Some detection when camera rotate around object create oposite Pulfrich effect, and then it need oposite switching left/right frames (rare condition)# 2. With high speed vertical movement, frames are too different and create bad visual overlap, and it will be better switch off this cut/paste system

# Posible improvement in this part of code :# 1. Sometimes background is more white than foreground. Then it will be better if this is in reverse.

#################### OUTPUT TO GLASSES: #############################

### UNIVERZAL FILE FORMAT OUTPUT (FOR ENCODING):# If you need ColorCode format output from this file, you can use my YouTube3D.avs script to convert with VirtualDub##side by side L/R#return StackHorizontal(fL, fR)##above below#return StackVertical(fL, fR)# Or found some standard format (Colorcode?) with some differences information (put around picture)...

# Posible improvement in this part of code :# Need better filters for blue (green passing problem) and yellow (blue passing problem). # I am optimize this code for card glasses. I wait for china plastic glasses, to see its filters.# China glasses are come after 1 month of waiting. Nice look and feel, better transparancy, but little more ghosting. On version 0.75, I try to optimize it.# On my 2Dto3D conversion look good, but with real 3D it has ghost problem with high depth part of scenes.# Because of that ghosting, I reduce blue and yellow line intensity. Scenes in focus look good and for my low-level depth conversion this glasses are good enough.# Solutions: maybe metalic filters on glass (like filters in Dolby glasses with 6 color) will improve this viewing system. But I can't find this 'perfect' filter glasses...

# Interesting setup:# 1. DLP projector (ViewSonic 120Hz PJD6211 or better)# 2. DLP-link active switching glasses without connection or emitters: XpanD X102# 3. We need white LED emmiters (and electronic) for simulate this white flash from projector for possible using this kind of glasses on 120 Hz monitors.# (white flash sync is when active glasses are in switching position, and both eyes are black)# VirtualDub can open this script. Chose video-compress-xvid, and than Save as AVI, can create useful output file.# You need lot of CPU power...ConvertToYV12()

The only thing is it's for 2D to 3D conversion and I can't make sense of what i'm meant to comment out etc. What would be the exact script for a left and right input (left.m2ts and right.m2ts) for colorcode conversion based on this script? Appreciate if anyone could help

Bloody

Post subject: Re: Encoding video to ColorCode anaglyph format?

Posted: 11 Aug 2010, 13:40

Site Admin

Joined:29 Apr 2010, 17:51Posts: 3148Location: Sofia, Bulgaria

You can probably use the code available here for colorcode output, however as I do not have a pair of colorcode glasses it is hard to tell how well it works... other than that you can use the left and right input and skip the processing part for the 2D to 3D conversion and feed the left and right frames directly to the colorcode output.

Simmo10

Post subject: Re: Encoding video to ColorCode anaglyph format?

Posted: 12 Aug 2010, 12:32

Joined:10 Aug 2010, 13:39Posts: 7

I managed to work out how to use that code but a certain part of the code made the colours look horrible and the blue and yellow anaglyph effect dissapear. Instead, I used part of the code from here:

When i've opened the script into MEGUI it tell's me it needs to be YV12 and would I like to convert it to YV12. I opened it in MEGUI to see what it looks like, is this not neccasary if I use x264 with the command prompt?

Simmo10

Post subject: Re: Encoding video to ColorCode anaglyph format?

Posted: 13 Aug 2010, 10:44

Joined:10 Aug 2010, 13:39Posts: 7

I've altered my script and got rid of the "out =" part and "return out". MEGUI still tells me to convert to yv12 so I do but I don't get a warning anymore So for anyone looking to do the same thing as me you could try this, my final working script:

H264StereoSource is a decoder for the right eye video on 3D blu-rays, it is needed because the right eye video uses MVP decoding, there's a guide for how to use it here: http://forum.doom9.org/showthread.php?t=155246 If you have a left and right video eg. "left.m2ts" & "right.m2ts", your script would be this:

Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum