They say you’re not a true 3D enthusiast until you’ve got a shelf full of red/cyan and green/magenta anaglyph 3D glasses. I’m ready to dump mine in the waste bin, but there’s this little problem; two more shelves of anaglyph DVD, BluRay and VHS movies collected over the years. Soon the studios will start to release the latest blockbusters in full color BluRay 3D, but somehow I doubt they’ll find the time or budget to convert “Comin’ At Ya” or “The Stewardesses” from anaglyph to full color 3D. Who knows, maybe the full color film prints are lost forever.

For a couple of years there were two online purveyors of converted movies; they both did a creditable job, but recently dropped out of sight. My suspicion is that the films’ copyright holders got wise and shut them down for selling unlicensed copies. I doubt the sin had anything to do with 3D, just that they were selling unauthorized copies of the studios’ movies.

However, for those of us who purchase legitimate anaglyph 3D movies from Amazon or our local video store, the courts have strongly affirmed that we can watch them any way we choose, in private, whether we watch standing on our head, projected on a fishbowl, reflected off the water in our toilet, or even in full color 3D! In other words, if we have a gadget at home that translates anaglyph movies into full color and we use it solely to privately watch the legitimate 3D movies we own, we’re well within our legal rights.

And here’s how!

Anaglyph movies come in a number of flavors. This post deals with red/cyan and green/magenta anaglyphs which cover the majority of releases available. The goal is to create full color left and right video streams from these anaglyph releases. To keep things simple, this post describes a method to output either side-by-side or top-bottom formatted full color stereoscopic video in a single file. The tools used are open source: AVISynth and VirtualDubMod, as is the code I’ve contributed (refer to the license that accompanies the code.) To keep things simple, there’s download links for everything needed at the end of this post.

This post is not a cookbook for the uninitiated. If you are comfortable with AVISynth and VirtualDubMod, or are willing to learn these two programs, you’ll be fine. You don’t need to be a coder, you just need to be experienced in using these programs. Similarly, you need to have a basic knowledge of 3D formats and some experience critically viewing 3D. If you’re a 3D enthusiast or a professional, you’re already there.

Prepare your computer

First thing is to get your system ready. Sadly there’s no AVISynth for ‘nix or Mac, so we’re talking PC with XP, Vista, or Win7. The conversion process should run on any PC capable of running these OS’s, but it won’t be much fun without a Dual Core and 2gb+ of memory. I’ve done my testing on an I5-750 with 4gb. Your mileage may vary.

At a minimum, install AVISynth, VirtualDubMod, and the K-Lite Codec Pack. Since AVISynth only ingests AVI, WMV, MPG, and MKV files, you’ll almost certainly want to install software that converts your DVDs and BluRays to one of these formats. For DVD, I recommend VOB2MPG (and if you need to access encrypted DVDs, add DVD Decryptor.) For BluRay, I recommend MakeMKV.

The MOST IMPORTANT thing in getting your DVDs and BluRays into a computer format is that the ripping process should not re-encode (i.e. decompress and then recompress) your video. Anaglyph colors are very delicate and each compression generation makes your 3D conversion ever so much more difficult. VOB2MPG3 and MakeMKV both can do the conversion without recompression.

How the code works

The actual 3D anaglyph-to-full color conversion logic is contained in two AVISynth scripts (.AVS files.) The core logic is in AnaExtract.AVS; unless you’re a coder, you probably won’t fool with this. Just tuck the file away in a safe folder somewhere. The other script is where you set all the parameters for a particular movie you’re converting. I like to name these files: XX-DeAna.avs, where the XX is replaced by the name of the movie. However, you can name each copy of the file anything you like.

The video near the top of this post demonstrates how to use AVISynth, VirtualDubMod, and the parameter file to convert an anaglyph movie. While that should be enough to get you going, the gory technical details begin now. I’ll get back to the parameter .AVS file later on, but first let’s pick apart the actual core processing module: AnaExtract.AVS.

Yes, the code is open source

Find the files we want to convert

Deal with different anaglyph formats – red/cyan or green/magenta

Prepare the full color information

Correct for any leakage between left and right

Reduce color fringing

Convert to YUV Color Space

Restore the color

Do some final color correction

Process an existing 2D version

Swap left and right video if needed

Build the side-by-side or top-bottom output

Resize the output if needed

Dub in the audio track

The Parameter File

You’ll want to have a copy of this file for every movie you want to convert. This is the file you load with File->Open Video in VirtualDubMod. It tells AVISynth how you want the movie converted. Although we walk through each parameter in the video at the top of this post, let’s have another run through.

Name the files

Format the output file

Prepare the color information

Deal with left-right leakage and color fringing

A final round of color correction

Load the actual conversion code

Downloads

Anaglyph Conversion AVS Scripts

AVISynth

VirtualDubMod

K-Lite Codec Pack (not required, but makes things much easier!)

AC-3 Sound Codec (not required, but the AC-3 codec in K-Lite doesn’t work with AVISynth)

MakeMkv – Rips BluRay to MKV with no re-encoding (currently free)

VOB2MPG – Rips DVD VOBs to MPG

DVDDecrypter

Stuff Yet to be Done

  • Convert red/blue anaglyph (trivial)
  • Convert ColorCode anaglyph (brutal!)
  • Better defringing
  • Output dual stream WMV
  • Output 2 separate files
  • Better leakage correction
  • Interlaced output
  • Optimize for speed
  • Port to After Effects, Premiere, Vegas, etc…
  • Linux version

It’s open source. You can help too!

Acknowledgements

Much of this code was inspired by prior AVISynth anaglyph converters from Olivier Amato and The Lone Wandering Soul. You probably will see some similarities in a few areas. That’s not coincidental. My thanks to both of them.

Related posts:

  1. Dump Those Silly Colored 3D Glasses
  2. Build Your Own 3D Shutter Glasses Controller for Field Interlaced Stereoscopic Viewing

One Comment on “Dump Those Silly Colored 3D Glasses!”

You can track this conversation through its atom feed.

  1. T says:

    Is there are a way to do the same with pictures. Make 3D pickter that you can see with Nvidia 3D vision?

    That would be nice for the moon pictures.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>