Sep 042014
 

One of the benefits to Google Cardboard, Oculus Rift, and similar phone-based headsets is stereoscopic 3D. As a big supporter of stereoscopic 3D, I’ve already been playing with converting my 3D Blu-rays – yes, Hollywood, I own them – to side-by-side 3D files that I can play from my Plex server through my Roku onto my 3D TV. I’ve also been having fun with Google Cardboard (although I’m no longer all that thrilled about the Oculus Rift). Because Google Cardboard supports side-by-side 3D, I decided to play around with converting those side-by-side 3D files to something that can be viewed on Cardboard.

Conversion requires several steps and programs.  Basically, it’s not for the faint of heart or those with older PCs (unless you want to wait a long time for the various conversion processes.) You’ll need the following programs:

  • A program to strip the idiotic AACS encryption from the Blu-ray. Sorry, but I won’t provide links or names of programs to do that because the U.S. government protects the rights of the MPAA and Hollywood more than the rights of its citizens.
  • Virtual CloneDrive from Slysoft (freeware)
  • BDtoAVCHD (free but ad supported through a banner in the program GUI)
  • Handbrake (free, open source)
  • VLC media player (free, open source) to test the playback although Windows Media Player might work

Finally, I’ll just tackle this one right here. If you do any of this with a 3D Blu-ray that you don’t legally own and/or you provide the resulting file to others, especially over BitTorrent or whatever, you’re part of the problem!

Step 1 – Remove the AACS Encryption

This is self-explanatory as to what you need to do; however, once again I will not go into details about what programs to use to do this. You can thank the MPAA and the studios (like Disney) for convincing the U.S. government that we are not citizens with rights for legal use of media that we own. Instead, they have been convinced that we’re nothing more than potential criminals and that no one would ever want to use disc decryption for any kind of legal purposes! Oh, no, never! (Do I really need to include the /s there??)  What can I say? This short-sightedness on the part of Hollywood and their Congressional puppets is a major sore spot with me.

I will say that the most popular program is likely one that lots of people think is just “fab”. *cough*

Most programs will allow you to rip to a directory with the same file structure as the Blu-ray or directly to an ISO file. If you saved the Blu-ray image to a directory with the same file structure, skip step 2.

Step 2 – Mount the ISO as a Separate Drive

After installing Virtual CloneDrive, right-click on the ISO and select “Mount Virtual CloneDrive drive_letter“.  That ISO will then be available as whatever drive letter was listed.

Step 3 – Convert to Side-By-Side 3D

First, a bit of information. 3D Blu-ray in general acts on the principle of alternating frames for each eye, although there are several methods that can be used.  For example, odd-numbered frames might be for the left eye whereas even-numbered frames are for the right eye. The TV will display those based on whatever technology is being used, whether it’s active, passive/polarized, or even red/blue anaglyph. Side-by-side 3D means taking each frame, compressing them horizontally, and fitting them in a single frame. This results in the separate left-eye/right-eye 1920×1080 frames becoming two individual 960×1080 images inside the same frame. When you look at these, you can actually see the 3D composite if you use the “relaxed eyes” method.

avengers-3d-sbs-example© 2012 Marvel

When playing back side-by-side 3D on your 3DTV, you have to tell your TV to switch to side-by-side 3D mode.  It will then recreate the proper 3D image from each half of the frame. The result will be at half the horizontal resolution as the Blu-ray, but it will still look incredibly good.

Start BDtoAVCHD.  Click Open -> Open Blu-Ray folder. Navigate to the drive letter of the mounted ISO or wherever the ripped files are. BDtoAVCHD will then analyze the directory structure to determine the chapters, various branching paths, audio streams, and so forth. When it determines that it’s scanning a 3D Blu-ray, it will prompt you for the 3D mode that you want. On the right side, select 3D SBS (side-by-side) and click Apply.

Click Scan Bitrates. This will take several minutes to run because it will scan through the entire file structure to determine the various codecs that are used. When it’s done, click Close to close the window. It will not close automatically.

This part can be tricky, so you might need to experiment. Blu-ray allows for multiple “streams” where you can choose alternate scenes while playing the movie. This is what allows things like different titles and credits in multiple languages (stored in different files) while using the same base movie files. If the disc has different branches, you can scroll through them by clicking on the up and down arrows next to the Video selection. How to determine the files that each branch uses is too complicated to explain here, but the .mpls file that is listed in the center-right of the BDtoAVCHD window will yield some clues if you look at it. Just stick with the default video for now.

You can change the Target AudioTarget SubtitleTarget MediaCRF,  Speed vs. Quality, and Output Folder to whatever you prefer, but I recommend adjusting only CRF and/or Speed vs. Quality. You’ll be transcoding this again through Handbrake later (this is why I said not to use a weak box for this), so you don’t have to worry too much about getting these settings perfect right now. You want the quality to be as good as possible for the Handbrake conversion; otherwise, you’ll end up with “garbage in, garbage out.”

When you have the settings you want, click Add to Queue.  (Note that once you click Add to Queue, all of the other options disappear. So, if you screw up you’ll have to delete that job and start from Open -> Open Blu-Ray folder again.) When you’re ready, click Start Jobs then walk away. This could take a long time.

Once this process is done, assuming that it was successful, you should have the converted video available in a still-in-Blu-ray format in the directory (yes, I’m old school so I still call it a “directory”) that you specified in Output Folder. If you want to, you should be able to burn the contents in Output Folder to a blank Blu-ray and play it on a Blu-ray player, but if that’s the case you might as well play the original disc and enjoy the 3D in its full 1080p glory instead!

To test the video file, open Windows Explorer, go to your specified Output Folder directory -> BDMV -> STREAM and play the file that is likely called 00000.m2ts.  This is the actual video file for the movie. When you play it back, it should be in side-by-side format as shown in the image above. Don’t worry if you don’t hear any audio. The audio is there, but Windows might not know how to play the audio stream. As long as you can play the movie file and it’s in side-by-side format, you’re ready to go to the next step.

Step 4a: Converting to the Final MP4 File

Start Handbrake. Click Source -> Open Folder then navigate to the destination directory where the side-by-side Blu-ray structure is (the one that contains BDMV and CERTIFICATE), and click Open Folder.  Handbrake will scan through the directory to get the information it needs. From here, you need to determine what settings you want to use based on your destination, but note the following…

  • If you want to play this through a Roku or similar streaming box, then I recommend using the settings and explanations at rokoding.com. Their setting suggestions have worked incredibly well for me. If this is your final goal, then you don’t need to follow any more steps in this guide.  Just follow the directions at rokoding.com, then copy the resulting file over to wherever your Roku can see it (I highly recommend setting up a Plex server) and it should play without a problem. You’re done, although you’ll need to manually switch your TV to side-by-side 3D during playback.
  • If you want to play this on a VR headset like Google Cardboard or Oculus Rift, use the steps from rokoding.com, and then go back to the Video tab to adjust the width and height of the final file, as described in the next step. Don’t click Start just yet!

Step 4b: Calculating the Final Resolution for VR Playback

Follow me on this one…

As you can see from the image above, the side-by-side image is compressed horizontally to fit both 3D images into one frame. The aspect ratio (AR) of a standard Blu-ray frame is 1.77:1, meaning that the frame is 1.77 times the height for a resolution of 1920 x 1080. The side-by-side conversion results in the two 3D images getting compressed, so you now have two images of 960 x 1080 in the same frame. In order to show each half image in its original 1.77:1 aspect ratio, we need to cut the vertical resolution in half from 1080 to 540. This will result in two 1.77:1 frames for a total AR of 3.54:1 as shown below.

avengers-3d-sbs-cap-1920x540Now that we know that the final output width has to be 3.54 times the height, we can start working with some numbers to fit your VR device.

In my case, I have a Nexus 4. (Note to self: never again get a phone with only 8 GB of storage and no microSD expansion!) The landscape resolution of the Nexus 4 is 1280 x 720. In order to calculate the correct height, take 1280 and divide it by 3.54. This gives us 1280 width x (1280 / 3.54) height for a final resolution of roughly 1280 x 360. These are the numbers to plug into Handbrake for the width and height. (Handbrake will adjust them to the closest size needed for a proper conversion, so don’t worry if they change slightly after you enter them.) If you need to go back and adjust the resolution to make the file smaller to fit on your VR device, just make sure that you keep the 3.54:1 AR.  And, trust me, a video file with a resolution of something smaller like 960 x 270 will still look really good on your VR headset but can have a significantly smaller file size than its 1280 x 360 counterpart.

Once you have all of that set, click Start to let Handbrake do its thing.

The final file will be in the directory listed in the Destination field. Copy the file to your VR device and play the file! You’re done! (You might need to install a third party file manager in order to locate and play back the video file on your device.)

About VR Playback

There are a few things about VR playback that you need to be aware of.

The biggest is that you likely will not be able to see the entire screen, but perhaps 70% of it. The extreme sides will be out of your field of view. This is due to the depth of field view and the focal point of the headset. The immersion of 3D or VR in general is slightly broken if you can see edges when running a VR application or game, so edges are placed out of view. We’re watching a movie with a static location, so we don’t need to worry about 360 degree immersion. Unfortunately, the only way to fix this when it comes to 3D movies is to reduce each eye’s half of the frame relative to their own virtual center as shown in the example below.

avengers-3d-sbs-vr-demoDoing this requires extracting the left and right eye frames separately then using a video editor to produce the final results. That also brings in a lot of questions about how to get the audio synced up for the final file and so forth. This process is by no means impossible, but it does add a lot of work – unless whoever maintains BDtoAVCHD implements a method to shrink each of the various frames down during the conversion.

The other issue is that the 3D depth is not as pronounced as it would be if you were watching the movie in a theater or on your 3D TV.  You won’t feel as much of a sense of distance going back into your VR headset, but you’ll definitely see a difference for objects that are closer to the screen. You can adjust your phone left or right in your Cardboard holder to help to maximize the 3D depth as well as focus the viewing area as closely to the center of the screen as possible.

Keep in mind that this whole process isn’t meant to replace a 3D TV or going to a theater anyway.  If you expected the same kind of immersion, you need to lower your expectations. It’s still a fun way of using your VR headset to watch your favorite 3D movies!

So, go ahead and have some fun with this! Let me know how successful you’ve been, but please note that due to spambots the comments are closed after a certain length of time. You can contact me through the Contact tab, though.

Enjoy — but don’t be part of the problem! If you keep pirating 3D Blu-rays, what incentive does Hollywood have to release them in the future?

  One Response to “Convert 3D Blu-ray for Roku, Google Cardboard, or Oculus Rift”

Comments (1)
  1. If you use MX Player in android you can just load the video up after it has been ripped and play. MX Player allows you to play at custom aspect ratios, so you can just set one for 3.54:1 and hit play and it will display correctly.