|
|||||||||
|
Thread Tools | Search this Thread |
March 29th, 2011, 05:46 PM | #61 |
Regular Crew
Join Date: Dec 2010
Location: Istanbul Turkey
Posts: 74
|
Re: How to convert anaglyph to side by side?
|
April 5th, 2011, 08:21 PM | #62 | |||||
Regular Crew
Join Date: Dec 2010
Location: Istanbul Turkey
Posts: 74
|
Re: How to convert anaglyph to side by side?
This is the copy of the same thread on doom9.
Hi, after lots of work i think i'm ready to re-introduce Tony Asch's tool. This is based on Tony's "Dump Those Silly Colored 3D Glasses!" Dump Those Silly Colored 3D Glasses! How-To; Teardowns; Tutorials V-Rtifacts You will find an educational movie on the same link as well. And most of the quotes from Tony have been taken from DV Info Net forum. Tony says : Quote:
You will find detailed explanation on how to use it on given scripts. But i want to make a basic summary: Quote:
The anaglyph movie you have has to be shot as real stereoscopic. You should have a 2D copy of the same movie. (i insist it is an obligation.) The best results have been taken in case of using original anaglyph blus and DVDs. How to use: The best way is to use VirtualDubMod to change the parameter script and see immediately what has been changed. Hit F5 in the script editor to automatically save the script and reload it in VirtualDubMod, thus revealing the newly processed images. And after being sure you're ready to fully process the movie, just encode it to 264 using x264; internally or externally. I always prefer to encode it externally. Then what we need? DirectX End-User Runtime DirectShowSpy.dll Proppage.dll AviSynth VirtualDubMod AC3ACM Codec ffmpeg Haali Splitter (latest version: 03.03.2011) FfdShow GraphStudio TSMuxer MKVMerge Gui x264 (or MeGui) AnyDVD/AnyDVD HD (commercial) eac3to Video ReDo (for mpeg2 frame accurately cutting) (commercial) Video ReDo TV Suite (for mpeg2 or h264 frame accurately cutting) (commercial) Stereoscopic Player or TMT5 (commercial) (for playing resulting SBS files.) Lets start: Step by step: 1) Decrypt anaglyph BD or DVD via AnyDVD. 2) Analize decrypted DVD or BD (you may use BD Info for BDs) and find what videos are 3D or 2D. 3) Demux 2D and 3D videos with eac3to and remux to m2ts via TSMuxer. 4) Cut -if needed- to syncronize 2D and 3D videos with VideoReDo/Video ReDo TV Suite. (if the source file is VC1 cut and demux with TS Muxer and remux to mkv with MKVMerge Gui.) 5) Find the video is RC or GM. 6) Explore the 2D video is left or right. 7) Input the parameters to xx-De-Ana.avs. 8) Re-encode with x264 to SBS or TB. After decripting and analizing files, the extraction is very important. Tony says: Quote:
And i recommend you to use eac3to to demux and remux to mkv with MKV MergeGui. (if you will need to cut to synch videos, you should remux to m2ts with TSMuxer first.) After extracting non-re-encoded 2D and 3D videos you may need to make them cut if your Anaglyph source has not a matching (time synced) 2D version which is either the left or right eye view. This cutting must be frame accurately and i use Video ReDo Tv Suite for this. And after cutting we have to make sure both videos have the same frame number. The best way is to write basic scripts to check it on VirtualDubMod: Code:
DirectShowSource("C:\bloody\2D-cut.m2ts", fps=23.976, audio=false, convertfps=true) info() Code:
DirectShowSource("C:\bloody\3D-cut.m2ts", fps=23.976, audio=false, convertfps=true) info() And we should test both videos whether they were really synchronized: (I use GraphStudio to open both videos at the same time.) Or you may find more handy to see them as SBS on VirtualDubMod if they are 1920*1080. (just right click on the screen and select 50%.) Or just open the same script with GraphStudio. Code:
VidR = DirectShowSource("C:\bloody\test\2D.mkv", fps=23.976, audio=false, convertfps=true) VidL = DirectShowSource("C:\bloody\test\3D.mkv", fps=23.976, audio=false, convertfps=true) StackHorizontal(vidL, vidR) Now lets have a look at our parameter avs: Step by step: Code:
# Setup our input files anaglyphName = "C:\bloody\3D-cut.m2ts" # Anaglyph video PureColName = "C:\bloody\2D-cut.m2ts" # Video with color info (either Anaglyph or 2D) monoName = "C:\bloody\2D-cut.m2ts" # Possible 2D video for one eye, if not set to "nothing SoundName = "C:\bloody\2D-cut.m2ts" # Video with the sound track we want Code:
# Anaglyph input format, either RC or GM, i.e red/cyan or green/magenta inputFormat = "GM" Easy to understand: RC: GM: Code:
# Maybe we already have one eye's version in 2D already, # i.e. the DVD or BR has both 2D and 3D versions # Set to: monoRight or monoLeft or monoNone isMono = "monoRight" And how do we know 2D video is right or left? Lets have a look before we decide. Perspective look: Left Angle: Right Angle: Left eye means what our left eye sees only when our right eye is closed and the reverse is true. And compare what our left or right eyes see when the video is shot as right or left angle. Hidden Stuff: Quote:
And finally the best way i found is to open both anaglyph and 2D videos at the same time with GraphStudio and to find which is matching to left or right. You may use the above script as well. OK, here are some samples: Put your Red-Cyan glasses on and close your left and right eyes and find out what eye matches to 2D video? When your right eye is closed down, you can see both videos (as red) matches to each other, right; which means 2D is left. (have you noticed hidden stuff here?) Put your Green-Magenta glasses on and close your left and right eyes and find out what eye matches to 2D video? When your left eye is closed down , you can see both videos (as magenta) matches to each other, right; which means 2d is right. (have you noticed hidden stuff here?) Resulting files just to compare: Code:
# Swap eyes: either Yes or No # Note: it is industry standard to put Red on the left eye for RC glasses # and Green on the left eye for GM glasses # It would be unusual to set this parameter to Yes # since the un-swapped arrangement is either Red=Left or Green=Left swapAnaglyph = "No" Code:
# Output formatting: # Choices are: # SBS_Left_First, SBS_Right_First, TB_Left_Top, TB_Right_Top # # Meaning Side-by-Side (SBS) or Top-Bottom (TB) # And choosing which eye is in which position # This happens after the optional swap (above) # and is somewhat redundant, but makes the eye choices clearer. outputFormat = "SBS_Left_First" Code:
# Resize the output video? Either Yes or No # If set to No, then the output video is either # twice the width of the input (for SBS) # or twice the height of the input (for TB) outputResize = "No" # If we are resizing the output, specify the dimensions (Int) # These dimensions apply to the stacked video size outputWidth = 500 outputHeight = 200 Code:
# In case one anaglyph eye has leaked into the other # We can try to remove that leakage by subtraction # Expressed as percentage (int or float) (-100 to 100) (0 means none) leakCorrectR = 0 # Leakage of left into the right eye leakCorrectL = 0 # Leakage of right into the left eye Code:
# How much to blur the color information (Int or Float) # This is done by shrinking the color video down in size # and then resizing it back up to full resolution # producing a blurred full resolution image # The two decimate numbers are expressed as percentages # i.e. a percentage of the full resolution to calculate # the shrunk size. 100 means no shrink, 10 means 1/10 the # resolution of the original, etc. # Anaglyphs are only offset horizontally, so the color blur # should be strong horizontally, but weak vertically # For films where the cameras were misaligned vertically # you will need to make the vertical blur greater. decimateHoriz = 12.0 # Horizontal shrinkage decimateVert = 24.0 # Vertical shrinkage - can usually be much bigger than decimateHoriz # Final brightness and contrast adjustments tweakBrightL = 0 # Left brightness, integer to add to each pixel (pixels are 0-255) tweakContL = 1.0 # Left contrast adjustment (1.0 means no contrast adjustment) tweakSatL = 1.0 # Left saturation adjustment (1.0 means no saturation adjustment) hueL = 0 # Left hue adjustment (-180.0 (greener) to +180.0 (redder) 0=none) tweakBrightR = 0 # Right brightness, integer to add to each pixel (pixels are 0-255) tweakContR = 1.2 # Right contrast adjustment tweakSatR = 1.5 # Right saturation adjustment hueR = 0 # Right hue adjustment Trial and error. Remember: Quote:
Code:
# Option to horizontally blur the left and right videos, # just before the color is restored (before optional LR swap) # Helps remove some of the fringing that appears in poor DVD encodes # Set to exactly 1.0 for no processing (faster!!), # > 1.0 blurs... try 1.5 to 4.0 blurLeft = 1.5 blurRight = 1.0 Code:
# Common code to do the conversion # Make sure this file path points to # the file on your system. import("C:\bloody\AnaExtract.avs") OK, we finished to input parameters and check whether it works on VirtualDubMod. And the final stage: encoding. I prefer to encode to 264 externally via x264. I put all related files under one folder including x264.exe. A very basic encoding code: (selecting the detailed encoding parameters is up to you.) Code:
C:\bloody>x264 --fps 24000/1001 --level 4.1 --sar 1:1 -o test.264 XX-deana.avs Thanks for reading. EDIT: Test files (raw) for whom interested in: 2D.mkv 3D.mkv _ _ _ _ __ _ Last edited by Seref Halulu; April 6th, 2011 at 03:09 PM. |
|||||
April 6th, 2011, 04:01 PM | #63 |
Regular Crew
Join Date: Dec 2010
Location: Istanbul Turkey
Posts: 74
|
Re: How to convert anaglyph to side by side?
Now i'm adding a general purpose AnaExtract.avs.
You may select DirectShowSource, FFVideoSource or DGSource on xx-deana.avs. XX-DeAna.avs: DG: Code:
# XX-DeAna.avs # Tone at VRtifacts.com # V 0.9 June 27, 2010 # Modified by @rica April 6, 2011 (source options included and selectable) # Select our input method (Source); DS (DirectShow Source), FF (FFVideo Source), DG (DGSource) inputMethod = "DG" # Setup our input files anaglyphName = "C:\bloody\3D-cut.dgi" # Anaglyph video PureColName = "C:\bloody\2D-cut.dgi" # Video with color info (either Anaglyph or 2D) monoName = "C:\bloody\2D-cut.dgi" # Possible 2D video for one eye, if not set to "nothing SoundName = "C:\bloody\2D-cut.ac3" Code:
inputMethod = "FF" # Setup our input files anaglyphName = "C:\bloody\3D-cut.mkv" # Anaglyph video PureColName = "C:\bloody\2D-cut.mkv" # Video with color info (either Anaglyph or 2D) monoName = "C:\bloody\2D-cut.mkv" # Possible 2D video for one eye, if not set to "nothing SoundName = "C:\bloody\2D-cut.mkv" # Video with the sound track we want Code:
SetMemoryMax (64) Tony, please have a look at this attachment. Thanks. Last edited by Seref Halulu; April 6th, 2011 at 06:41 PM. |
April 26th, 2011, 04:35 PM | #64 |
Regular Crew
Join Date: Dec 2010
Location: Istanbul Turkey
Posts: 74
|
Re: How to convert anaglyph to side by side?
|
April 27th, 2011, 06:25 PM | #65 |
Regular Crew
Join Date: Jul 2010
Location: Central NJ
Posts: 42
|
Re: How to convert anaglyph to side by side?
Much of JackAss 3D doesn't seem to be 3D, but there are parts that have some 3D. See the attached images - side-by-side and RC anaglyph. I didn't have the patience to actually watch the movie to see how much is 3D and how much is not.
__________________
VRtifacts |
April 28th, 2011, 03:24 PM | #66 |
Regular Crew
Join Date: Dec 2010
Location: Istanbul Turkey
Posts: 74
|
Re: How to convert anaglyph to side by side?
Tony,
This is the first time that i can't find any differences between left and right using silly anaglyph eye-wear. Bizarre shot and i agrre i don't have patience to finish this rubbish stuff. Anyway when somebody from avsforum insisted it's not fake 3D, i seperated left and right videos using Adam's tool and the source was only anaglyph itself: AVS Forum - View Single Post - The Official AVS 3D Blu-ray Topic! And here is a close-up: _ _ _ _ Last edited by Seref Halulu; April 28th, 2011 at 06:15 PM. |
May 8th, 2011, 05:24 AM | #67 |
Regular Crew
Join Date: Dec 2010
Location: Istanbul Turkey
Posts: 74
|
Re: How to convert anaglyph to side by side?
Last night i tried to convert "Night of the Living Dead" anaglyph movie.
Anaglyph is "Red-Cyan": But this time "cyan" is on the left instead of "red". So you will find non-standard glasses besides anaglyph DVD; "Cyan" is put on the left eye and "Red" is put on the right eye. Code:
# Swap eyes: either Yes or No # Note: it is industry standard to put Red on the left eye for RC glasses # and Green on the left eye for GM glasses # It would be unusual to set this parameter to Yes # since the un-swapped arrangement is either Red=Left or Green=Left swapAnaglyph = "No" I bought a 2D version as well to get the best true color. So as to be sure 2D is "left" or "right", i extracted "left" and "right" videos from the anaglyph version first. Left-Right SBS: (Check out aviscript, it works:Left on the left side, right on the right side.) Left only: Right only: OK, lets have a look at to the "2D" video. It is obviously "Left" and this is the reference view. So we should select "isMono = "monoLeft" But if we use below script we can not get stereoscopic result: Interstingly if i select "monoRight", i get sterescopic: Or instead if i select "GM" with "monoLeft" together, i get stereoscopic too: Tony could you have a look at that issue some time? Thanks in advance. Here are the sample videos. (2D and 3D) 2D.mkv 3D.mkv _ _ _ _ _ _ Last edited by Seref Halulu; May 8th, 2011 at 06:41 AM. |
May 8th, 2011, 10:05 AM | #68 |
Regular Crew
Join Date: Jul 2010
Location: Central NJ
Posts: 42
|
Re: How to convert anaglyph to side by side?
Actually, everything is correct:
isMono = "Right" inputFormat = "RC" swapAnaglyph = "Yes" The script does the swap as the very last step. The rest of the processing is done before the swap. Thus, the final left side is processed as if it were on the right. This explains why you need to declare the mono file as Right, because at the end Right is swapped with Left. Internally the script doesn't really know much about left and right, it operates purely on color filters. In this case when you say isMono="Right", what you really are saying is: "please don't bother to extract the cyan video because I already have a better version in my 2D file....and although cyan is normally a right side video, and I know you're going only process the red as if it were on the left, and then swap left and right when everything is finished.... and I understand that while you are processing the colors, right and left are reversed, so even though my mono video represents the left view, I need to process it on the right side (cyan) before reversing the left and right as the last step." Sorry to make this complicated... it's just related to the ordering of how the parameters are executed. I guess I could change the syntax to isMono="R", "C", "G", or "M" and that would make things clearer.
__________________
VRtifacts |
May 8th, 2011, 01:53 PM | #69 |
Regular Crew
Join Date: Dec 2010
Location: Istanbul Turkey
Posts: 74
|
Re: How to convert anaglyph to side by side?
Thanks Tony for the detailled explanation.
|
June 12th, 2011, 05:29 PM | #70 |
Regular Crew
Join Date: Dec 2010
Location: Istanbul Turkey
Posts: 74
|
Re: How to convert anaglyph to side by side?
|
August 19th, 2011, 04:34 PM | #71 |
Regular Crew
Join Date: Dec 2010
Location: Istanbul Turkey
Posts: 74
|
Re: How to convert anaglyph to side by side?
Hi Tony.
Please have a look at to the post 63 and post 70. Still no response. And here is what SP does on settings: Tony, please do us a favor. You know i'm not a coder. Thanks. Last edited by Seref Halulu; August 19th, 2011 at 05:28 PM. |
August 19th, 2011, 05:09 PM | #72 |
Regular Crew
Join Date: Dec 2010
Location: Istanbul Turkey
Posts: 74
|
Re: How to convert anaglyph to side by side?
We need the final avs which has been improved.
|
| ||||||
|
|