1

I have created a video player using OpenGl in android and it works fine. I used the following tutorial (https://www.virag.si/2014/03/rendering-video-with-opengl-on-android/).

Now I want to create same app for Google Cardboard. I searched it on internet and found out following queries and a Rajawali Renderer. (How to make a simple VR video player by Google CardBoard Android SDK)

Now first of all Rajawali latest code is not working. So, if anyone has a working code please suggest.

Second thing is that Rajawali requires 360 degree input. But I want to view my normal videos using Google cardboard. So, I want to learn how to split my screen of Video player, so that I can see the output in Google cardboard.

Also, how to split any normal android screen so that we can see the output in Google cardboard?

Community
  • 1
  • 1
Utkarsh Srivastav
  • 3,105
  • 7
  • 34
  • 53
  • Creating image for vr is relatively simple you render side by side on the screen two almost same images and deal with distortion. Look at this [link](https://www.youtube.com/watch?v=B7qrgrrHry0) – Logman Jun 24 '16 at 19:34
  • Have you found a solution? – Erik Minarini Jul 05 '16 at 17:18

1 Answers1

1

You can download cardboard SDK from here: https://developers.google.com/vr/android/download

On git, there are some samples,

https://github.com/googlevr/gvr-android-sdk/blob/master/samples/sdk-simplevideowidget/src/main/java/com/google/vr/sdk/samples/simplevideowidget/SimpleVrVideoActivity.java

this is for using a video in "simplepanoview" that is a custom VR view as you can see here: https://developers.google.com/vr/android/samples/vrview#vr_view_sample_apps

In the sample is used loadVideoFromAsset("video.mp4") this method is called in AsyncTask. When the video is loaded (or if it fails) starts onLoadSuccess (or onLoadError).

You can find very good documentation here: https://developers.google.com/vr/android/reference/com/google/vr/sdk/widgets/video/VrVideoView

Hope this helps you, let me know, good luck!

Erik Minarini
  • 4,795
  • 15
  • 19