VideoHelp Forum
+ Reply to Thread
Results 1 to 11 of 11
Thread
  1. Hi all,

    I have files in MKV format which is 1080p/720p as Left and Right separate files (2 separate files) for 3D viewing. I want to convert these Left and Right MKV files to Anaglyph Red/Cyan or Green/Magenta for viewing 3D on my LCD. I tried MultiAVCHD but could only find guides on convertion of 3D Bluray to Anaglyph.

    Can any member suggest a program where the two files Left and Right are converted to a single file which is of Anaglyph Red/Cyan or Green/Magenta.
    Last edited by eummagic; 31st Dec 2010 at 03:13. Reason: spelling
    Quote Quote  
  2. Hi,

    Very nice of you, but how to merge the Left and Right files to make Anaglyph Red/Cyan or Green/Magenta format? Since Iam a newbie, can you pls post the method and the software required to do this pls...
    Quote Quote  
  3. Originally Posted by eummagic View Post
    how to merge the Left and Right files to make Anaglyph Red/Cyan or Green/Magenta format?
    The script does that. Then you open the script in the encoder of your choice and save as a video file.
    Quote Quote  
  4. Originally Posted by jagabo View Post
    Originally Posted by eummagic View Post
    how to merge the Left and Right files to make Anaglyph Red/Cyan or Green/Magenta format?
    The script does that. Then you open the script in the encoder of your choice and save as a video file.
    Extremely sorry for disturbing you again, pls pardon my ignorance....

    I have downloaded the AVISynth and installed in my pc.

    As seen in your post, is this the script you mentioned to open using an encoder

    Code:
    left=AVISource("left.avi").ConvertToRGB()
    right=AVISource("right.avi").ConvertToRGB()
    
    red=ShowRed(left)
    green=ShowGreen(right)
    blue=ShowBlue(right)
    
    MergeRGB(red,green,blue)
    Can you pls be elaborate, do I need to copy these codes onto notepad and save in what file extension e.g. "abc.?"?


    Sorry for too many questions...
    Can you pls recommend an encoder so that it would work 100%?
    Quote Quote  
  5. Yes, you need to copy the script into Notepad and save with the extension .AVS (or rename the file after saving).

    Since you have MKV files you can't use AviSource(), you'll have to use DirectShowSource() or ffmpegsource2() (for the latter you'll have to download the ffmpegsource filter and put it in AviSynth's plugins folder). You'l have to change the filenames in the script to reflect your left and right files:

    left=DirectShowSource("left.mkv").ConvertToRGB()
    right=DirectShowSource("right.mkv").ConvertToRGB()

    red=ShowRed(left)
    green=ShowGreen(right)
    blue=ShowBlue(right)

    MergeRGB(red,green,blue)
    ConvertToYV12() #if necessary
    Unless your files are named LEFT.MKV and RIGHT.MKV you'll have to change the filenames in the script. If they are in a different folder than the AVS script you need to use the full pathnames.

    Then you open that script with an editor or converter like VirtualDub, HcEnc, Xvid4Psp, etc., the same way you open a normal video file, then encode to the file type you desire. You can also open the AVS script with most media players to view the results (HD files may not play smoothly though).

    That script will give you a color anaglyph. If you want a grayscale anaglyph you should add GrayScale() to each of the videos:

    left=DirectShowSource("left.mkv").GrayScale().Conv ertToRGB()
    right=DirectShowSource("right.mkv").GrayScale().Co nvertToRGB()

    red=ShowRed(left)
    green=ShowGreen(right)
    blue=ShowBlue(right)

    MergeRGB(red,green,blue)
    ConvertToYV12() #if necessary
    Color anaglyphs don't work well for some material (one eye sees the picture-red, the other see the other picture-blue-green, your eyes put them together into a color picture). For example, if the picture is mostly red, the blue/green eye won't see much of anything so you won't get a 3d effect. Grayscale should work for all material.

    I'd recommend you try the original script with the sample left and right files. Once you get that working you can start modifying the script for your particular files.

    Sorry, I don't know of a simple program that will take a stereo pair of files and simply output an anaglyph video.
    Quote Quote  
  6. Thank you very much for a detailed guide...

    Eureka! It works superb...I downloaded the HcEnc and with your script it worked perfectly

    I find there are other type of 3D types like Over/Under or Top/Bottom, how do you handle this 3D formats to Anaglyph?

    Sorry for this question, yesterday I downloaded a file assuming it is Red/Cyan but it is Over/Under and I see other types like Side by Side, Half Side by Side, Top/Bottom etc. with some other 3D files. So just curious if there is any script to handle these conversions to Anaglyph Red/Cyan?
    Quote Quote  
  7. You'll have to learn a little AviSynth to handle different formats. The commands you'll probably need to use are Crop(), LanczosResize(). See the AviSynth docs for details about the commands.

    For example, if a 640x480 video file has the left view in the top 240 scan lines and the right view in the bottom 240 scan lines, and should be displayed as a 640x480 video:
    src=DirectShowSource("640x480.mkv")
    left=Crop(src,0,0,720,240).LanczosResize(640,480) #top 240 lines upscaled to 640x480
    right=Crop(src,0,240,720,240).LanczosResize(640,48 0) #bottom 240 lines upscaled to 640x480

    red=ShowRed(left)
    green=ShowGreen(right)
    blue=ShowBlue(right)

    MergeRGB(red,green,blue)
    ConvertToYV12() #if necessary
    From that you can probably work out what to do for left/right splits instead of top/bottom splits.
    Quote Quote  
  8. Umm...I don't know how far I can go deep into this as its a new thing for me...

    Say, I have a MKV files with 1920 x 1440 resolution which is Top/Bottom i.e when I play using KMPlayer or VLC I get two screens top & bottom of same scene. So as per your script, is that I need to change the value to as below

    src=DirectShowSource("1920x1440.mkv")
    top=Crop(src,0,0,720,240).LanczosResize(1920,1440)
    bottom=Crop(src,0,240,720,240).LanczosResize(1920,1440)

    red=ShowRed(left)
    green=ShowGreen(right)
    blue=ShowBlue(right)
    MergeRGB(red,green,blue)
    ConvertToYV12() #if necessary

    But, here i don't what value I should enter, marked in 'red'. My guess is instead of 240, it should be 720 as 1440/2=720, but don't know what is for '720'. Pls guide me...

    Meanwhile, I will go through the AVISynth docs if it enters my mind or would be bouncers above my head
    Quote Quote  
  9. Crop(clip, top left corner, top right corner, width, height) -- all of what you want to keep. So for your 1920x1080 clip you want to use:

    left=Crop(src,0,0,1920,720).LanczosResize(1920,144 0)
    right=Crop(src,0,720,1920,720).LanczosResize(1920, 1440)

    I don't know if the resizing is right for that clip. You'll have to experiment.
    Quote Quote  
  10. Hi,

    Thanks for your guidance, let me do some trial & error methods and will revert here....
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!