July 30, 2011

Convert a H-SBS mkv video into Colorcoded 3D with Sony Vegas 10 pro.

Updated: The method here does  NOT generate ColorCoded videos, only the yellow/blue anaglyphic ones. So the 3D effect and color rendering is inferior to the true ColorCoded video.

I am writing a new tutorial, which uses only free tools to do the job. No more Vegas.

 Original text:
We are stepping into a 3D imaging era. Every year you will see a ton of 3D movies being released. More and more consumer-level 3D cameras/camcorders emerge on the market. It's a good chance that you might come across some 3D video files in a popular format: H-SBS.

H-SBS stands for Half Side-By-Side. H-SBS videos use the same video and audio codec that other videos use, except they show left eye images and right eye images side by side, each is squeezed to half of the width of the screen, as the below image shows. It's a screen capture from movie "Rio", from Twentieth Century Fox Animation.

The advantage of this kind of format is obvious: it can deliver 3D images without creating any new format, and be totally compatible with all regular 2D video/pictures. However, it also reduce the horizontal resolution by half, degrading the video quality a little bit, but in my experience, the sacrifice is completely worth it: it's very hard to tell the difference.

To play this kind of 3D video/pictures, usually you need to have a 3D TV or LCD with expensive LCD shutter glass, and a HTPC that could understand this kind of format. Being a poor guy I can't afford to throw away my 65" projection TV, ebay all my LCD monitors and buy all new 3D ones. So in the search of finding a way to play 3D video on regular monitors I discovered Colorcode 3D, which it's the best way to do the job. Please, go to their website and buy their paper glasses, (don't get the plastic ones), and you will see why. Their amber/blue glasses cost you only $4 for 2 in Amazon, absolutely worth a try.

However, it's impossible to find a tutorial online about the way to convert the popular HSBS 3D video into a Colorcode3D video. Recently I started to use Sony Vegas 10 pro, and I discovered that it had 3D video editing capabilities and Colorcode encoding feature. So this is a tutorial for the guys who have purchased Sony Vegas 10 pro only.

The video file I use is a sample from Movie "Rio". The file name is "Rio.3D.2010.1080p-sample.mkv".

First, to handle the mkv file, you should have MKVExtractGUI and mkvtoolnix ready.

Use MKVExtractGUI to extract only the video from the mkv file, as shown below.
After that, change the extension of  "Rio.3D.2010.1080p-sample_Track1.h264" from "h264" to "264", the result is "Rio.3D.2010.1080p-sample_Track1.264".

Open Sony Vegas 10, and import this file, in "Project Media" tab, right-click this file and choose "Properties". Change the "Stereoscopic 3D mode" from "Off" to "Side by side (half)", as shown below.



Drag the video to the video track.


Click on File->Properties or hit Alt-Enter, the project properties appears. Change the Template to "HD 1080-24p ..." to match the original video resolution and frame rate. Change "Stereoscopic 3D mode" to "Anaglyphic (amber/blue)" as shown below, then click "OK".
I am not sure about the "Crosstalk cancellation", when I set it in the middle, it does seem to reduce the ghosting a little in the final result.



Now you can do all the video editing you want, maybe put your logo in it or add some special fx. My suggestion is to add a "Bright/Contrast Video FX" to it. Increase the brightness a little to balance the reduced light when you wear glasses.

After all is done, you click on File->Render As , choose "Sony AVC" as the save type, then click on "Template" and choose "Internet 1920x1080-25p", don't click "Save" yet.


Instead, click on "Custom" and change the "profile" to "High", change the "Entropy coding" to "CABAC", and change the "Frame rate" to 23.976, in order to match the original format. Lower the bit-rate to "9,000,000" is also a good idea. If you have a powerful graphic card, you can change "Encode Mode" to "Render using GPU if available".


Now you can give the video a name like "Rio.3D.Colorcode.mp4" and click on "Save". It could take a long time to render the video, so you just relax and go get some coffee. With my i7-2600 PC it will take about 4 hours to render this 1 hour and half video.

After the rendering is done, close Vegas (no need to save), open MKVMergeGui, which is part of MKVtoolnix, and drag the "Rio.3D.Colorcode.mp4" to it, then you drag the original "Rio.3D.2010.1080p-sample.mkv" to MKVMergeGui as well. Uncheck the video stream from the original and use only the audio stream. In this example I also uncheck all those subtitle tracks except the English one.



Now all is ready, click on "Start muxing", and you will get the mkv video file in colorcode3d format. Enjoy!

P.S. Sony Vegas seems to have difficulties handling the big .264 file. The first time you click on the file, you need to be patient because it will generate a .sfvx file in the background. Then you need to turn off the thumbnails in the video track, which is in Options->Preferences-Video Tab, just change "Thumbnails to show in video events" to "none". It will solve another non-responsive problem. And remember, under no circumstances you should move the cursor in the timeline. Vegas will take a long time to show you the video frame at that cursor. Better just leave it at 0.

20 comments:

  1. did you post the result on youtube ? can you post a little piece for checking results ? damn i7 took 4 hours for render 1h LOL =p

    ReplyDelete
  2. hi all!

    absolutely awesome and a lifesaving tutorial cyther!!! i had almost perfect result first time... i'm using red/cyan and acually had to decrease brightness a bit and enhanced midtones... oh yeah and my render took 6 hours;)

    thanks again!

    ReplyDelete
  3. Thanks!
    I searched for that over 1 month!
    My render took 14 hours! It was a 2 hour movie!
    Thanks again!

    ReplyDelete
  4. Discovered you need to latest versions

    http://sourceforge.net/projects/mkvextractgui-2/

    and

    http://www.bunkus.org/videotools/mkvtoolnix/win32/

    or you will fall at the first hurdle

    (At least I did on win 7 64)

    ReplyDelete
  5. hey guys,i olso searched al long time and i tryed it but only until me vegas 10 won't acsept the extracted file from mkvextractgui2
    it hangs and have to close it whit task manager

    ReplyDelete
  6. the extracted video file by mkvextrackdgui i not in anyway to put in vegas ,it craches assoon i tought it and have to close it whit task manager, anyone please ?

    ReplyDelete
  7. why did you take me comments away ???

    ReplyDelete
  8. heheheheh love and sex and magic all the way

    ReplyDelete
  9. what if it's .mp4 file?

    ReplyDelete
    Replies
    1. In the next tutorial I will use Avidemux, which is way better than the mkvtools

      Delete
  10. Can you make one tutorial for Vegas 11? The options of render are different. For exemple, the Internet 1920x1080-25p does not exists. Great tuturial. I searched for that a year.
    Greeting

    ReplyDelete
    Replies
    1. Yes, I am going to make a new tutorial for Vegas 11 and perhaps another method to do the same thing.

      Delete
  11. Thanks for the tutorial, do you know how it compares to the official ColorCode 3-D player concerning colour & 3D effect? I've tested with stereoscopic player & avisynth & compared to the official ColorCode player the colour or 3D effect wasn't as good.

    ReplyDelete
    Replies
    1. You are absolutely right. I should have known better.
      This is not real ColorCode. It's just amber/blue color-anaglyph. So the colors look washed out. ColorCode is better, but it's a proprietary system so you really cannot use it in Vegas.
      In the next tutorial I will try to make the 3D effect better through Vegas.

      Delete
  12. Great tutorial but the 264 file doesn't seem to open on Vegas 11 :(
    Any chance you could update your tutorial? No one else seems to have found a solution for colorcode conversion from h-sbs

    ReplyDelete
    Replies
    1. I will check the 264 files again. New tutorial will be up soon.

      Delete
  13. If you can´t open the 264 fine on Vegas try convert it to mp4 using mp4box.exe and it will be imported perfectly on Vegas

    ReplyDelete
  14. Solution for MacOS?!

    ReplyDelete
  15. I use iDealshare VideoGo to convert MKV, MP4, Apple ProRes, FLV, WebM, ASF, MXF, AVCHD, XAVC etc to Sony Vegas video format.
    Here is the easy guide: https://www.idealshare.net/convert-mkv-to-sony-vegas.html

    ReplyDelete
  16. Nice article. It's very helpful to me. Thank you for share with us. Can you please check my Top logo color hex code collection.

    ReplyDelete