Gvr-unity-sdk: VideoPlayer Black Texture with Video sound

Created on 16 Aug 2017  路  20Comments  路  Source: googlevr/gvr-unity-sdk

On Samsung Phone the video player return a black texture to quad or sphere object but the video sound is playing.

Most helpful comment

That invalid enum error is a red herring and occurs even when the video plugin works properly on Pixel devices.

All 20 comments

What version of Unity? What version of the GVR Unity SDK?

GVR 1.70
Unity 2017.1.0f3

I have same issue with Unity 5.6.2f1 and GVR1.7, Samsung S7. But it works fine on HTC M9.

Same issue for me with the SDK's VideoDemo. I also tried to wait for 3 seconds after launching the app and then starting the playback, but still got black screen.

With latest GVR SDK + Unity 5.6.2f1
on both Samsung Galaxy S8 and S8+

OpenGL ES 3

Not sure if it's related, but log displays

OPENGL NATIVE PLUG-IN ERROR: GL_INVALID_ENUM enum argument out of range (Filename: ./Runtime/GfxDevice/opengles/GfxDeviceGLES.cpp Line: 383)

I wanted to check what exactly is the invalid value for the enum, but it seems GfxDeviceGLES.cpp is not open-source (or is it?)

@smdol @miraleung

Same issue here with S8 and unity 2017.1 GVT 1.7

With MotoG 3,4 gen works fine

Thanks for bringing this up. We'll take a look.

That invalid enum error is a red herring and occurs even when the video plugin works properly on Pixel devices.

Any update on this issue?

I am facing the same issue. I traced this issue to the shader(Google VR/Video Unlit Shader). Something is wrong in this shader.

@sujay46 Could you find out any more detail about what could be wrong in the shader code? How did you trace the problem? Do you have any error outputs? I'd also like to take a look into it.

@sandorvasas I used ADB logcat, and I found out it was printing out shader code in logcat. This happens when the device doesn't support the shader.

Can you paste the shader code that appears in logcat here?

logcat_shader.txt

This is what I got in my logcat.

@sandorvasas and @nathanmartz I was going through the shaders that are used in GVR 1.70. It is written in "GLSLProgram" as contrary to the shader in GVR 1.60 which is written in "CGPROGRAM". Could that be causing issues in shader compiling? I am not a pro in shaders, but probably this could help you guys to figure out the issue.
I am attaching both the shaders here.
shader from Gvr 1.70
VideoUnlitShader.shader.gvr1_70.txt
Shader from Gvr 1.60
VideoDemoInsideShader.shader.gvr1_60.txt

Yes, the video player pipeline was redone in 1.70 to remove a buffer copy step that had previously been done in a native plugin to get the video buffers into a form Unity could use. Now the GLSLProgram is able to use video buffers directly from the decoder without the copy step, improving performance and battery life.

I just tried the Video Demo scene in the SDK built with 5.6 and 2017.1 on Samsung S8+, Android 7.0 and am unable to reproduce the issue.

@sujay46, that logcat suggests the shader didn't compile properly on your device. Can you give me any more information about the device? What country was it purchased in? What version of Android is it running? What API level are you targeting in Unity?

Could you run this adb command and report back the output:

adb shell getprop ro.build.fingerprint

@rusmaxham It is a Samsung Galaxy S6.
and this what i got for your adb command.
samsung/zeroflteue/zerofltetmo:7.0/NRD90M/G920TUES5EQH2:user/release-keys

@sandorvasas could you send me your android build fingerprint? I've so far been unable to reproduce on both the Qualcomm and Exynos versions of the Samsung S8 and S8+.

@sujay46 that version of Android should be supporting the needed extensions to support the video player. Could you send me the project (with project settings) you created to reproduce the issue?

@rusmaxham my device has Android 7.0. Here is the link for the project. Just run the VideoDemo scene in Google VR demos.

The video plugin is not guaranteed to work on non-Daydream-ready devices, like the S6. I'm much more able to assist in debugging issues with the video plugin on a Daydream-ready device, like the S8. If I can get my hands on an S6, I'll try to debug this issue, but no guarantees.

Was this page helpful?
0 / 5 - 0 ratings