How to create VR Video player using Google Cardboard SDK for Unity

Rao picture Rao · May 16, 2015 · Viewed 32.7k times · Source

I just downloaded Google Cardboard SDK for unity. I am fine and able to create VR project. Setup is fine and everything is working fine.

I am noob at VR Apps. Just stepped in VR Apps.

I am planing to create my own VR Enabled Video Player for android, Just like the default Google Cardboard Youtube player.

Can any one suggest me a link or can guide me in developing this app.

Answer

Shannon Perkins picture Shannon Perkins · Sep 9, 2015

Scott Driscoll's answer totally works. I had some initial problems getting the Easy Movie Texture Unity plug-in to work for me, but finally figured it out, and it works flawlessly. I now have 360-video running as a texture on the inside of a sphere on my iPhone 6. And I have to say, I didn't think it would happen.

For working on a Mac, here's what I did:

  1. Download the Easy Movie Texture plug-in from the Unity Asset Store
  2. Open the Demo Sphere demo scene from Assets/EasyMovieTexture/Scene
  3. Create a new (empty) Prefab to your project, and drag the Sphere GameObject from the Demo Sphere scene onto the Prefab.
  4. Reopen your Cardboard scene and drag the new videosphere prefab into your hierarchy.
  5. Open your source 360-video in Quicktime
  6. File -> Export -> 720p
  7. Change file extension from '.mov' to '.mp4'
  8. Drag your new mp4 file into your projects Assets/Streaming Assets directory. Note: don't import through the menu system, as this will force Unity to convert to OGG.
  9. On the "Media Player Ctrl" script component of your videosphere GameObject, locate the "Str_File_Name" field and provide the FULL filename. Make sure to include the extension as part of the string, "mymovie.mp4".

Pretty sure that's everything. Hope it helps other folks stuck on this problem. Thanks Scott Driscoll!

One last note, you can only view the video on the phone, not in preview in the editor. It would be better if it didn't work this way, but really once the initial issues of resolution and placement are resolved, I don't really need to see the video every time I run the scene in the editor.