I’m using Quest2, OpenXR via Virtual Desktop/Steam VR. (PCVR)
I notice that playing videos works fine in the Editor, but simply doesn’t work in builds.
The videos do actually appear as a small compressed bunch of pixels on the TV Screen object I have, and it seemingly tracks with head movements (It shouldn’t), so when I move my head up, the small bunch of white pixels (which is the video playing) moves down on my TV Object, and when I move my head down, those video pixels move in the opposite direction.
Audio works.
I’ve spent a few hours trying various options, but nothing seems to solve the issue.
Has anyone managed to successfully use Videos in (Build) VR?
Is there a setting I’ve missed?
I’ve seen other posts on the subject without a solution, most of them mention Android, but as I’m using PCVR (Windows10 x64) I wouldn’t have expected this to be an issue.
Have you tried lowering the resolution of the video? Mobile platforms can be constrained for some reason. See if a 480p video works adequately for you.
Yes just tried a low res 150kb clip, still the same issues… Also I’m using PCVR and not a mobile platform. Windows 10 x64, 64GB with Nvidia RTX card. The Build is Intel64 and I’m using HDRP.
I did however seem to find a clue to the issue. I’m not sure if this is a Unity issue or SteamVR issue.
I decided to disable SteamVR’s VRServer.exe by temporarily renaming it. This stopped SteamVR runtime from taking over when running the builds .exe, and allowed me just to see the VR build run on the monitor and through Virtual Desktop. This worked as expected, the video plays fine from the same XR camera.
As soon as I enable SteamVR and play the same .exe through SteamVR runtime, the video appears as a small bunch of macro block looking pixels that move when I move my head/HMD.
I guess that means that the Unity Build itself is okay, it’s the SteamVR runtime that is the issue?, although this is still confusing as the SteamVR runtime works without issues when playing directly from the editor.
In my project the video works perfectly in editor but in build i can only hear the audio but video is not visible. I have tried render texture and material override.
The same setup works perfectly with unity 2021.x
If I disable OpenXR or Varjo from XR Plugin management, so the project is non-vr, then the video is seen normally on plane that is using render texture from videoplayer.
I’m not using video but I do have in-game cameras pushing onto RenderTextures; I found that some texture formats work in the Editor but they are messed up or missing on Quest builds.
Here are my notes from that: “The original Color Format was R8G8B8A8_UNORM and this is OK, but the Depth Stencil Format was bad - original was D32_SFLOAT_S8_UINT but I had to change that to D16_UNORM”.
Given the SteamVR revelations above, this may not be your issue but there’s a lot can go wrong wiht all these moving parts, thought it might be worth checking.
Exact same issue as OP here.
Tested on Unity 2022.2.17f1, 2022.3.3f1 and 2022.3.10f1: they all fail to display the video in a Windows x64 standalone build, while using OpenXR. In all other situations, it works fine (in the editor while in Play mode, or in the standalone build, while the VR headset is not plugged in).
I got the same problem here in Unity 2022.3.12 LTS, OpenXR 1.8.2 and HDRP 14.0.9
The Problem occurs with bopth HTC Vive and HTC Vive Pro 2:
Simple VideoPlayer-Component on a Plane-Mesh is playing fine in editor, but not in build.
Tried all kinds of compressions and render-texture-setups - all not working.
What I found out though is that it is working in a development-build - but no idea why… can anyone confirm that?
Cheers!
Same issue here… I’m using Unity 2022.3.15f and 3.1.0 RSA… For me is working everywhere (In editor, VRPC) except in an installed build in a Quest3. Any possible solution?
How are you displaying the video? The VR Template has a video player that shows a working example. Have you tried cross referencing that against your own project? It uses a Canvas to render the video, have you tried that?
I currently have multiple videos running in tandem at once, all using different canvases. Using Unity 2022 LTS, URP, and Open XR. Works in Editor, PC builds, and Quest Standalone builds.
Kinda have a similar problem, but the strange thing is that is renders just fine in side loaded apk built from editor but when I download it from meta quest release channel it doesn’t render at all.
FWIW the side loaded apk is the exact same apk I uploaded for release channel.
Actually ended up being something completely different. In my case my local PC had the correct codecs to build (H.265) but the CI machine did not, which was preventing it from importing and embedding the videos properly ingo our addressable bundles.
Can you share me that Link I am following these steps
I have followed these steps
Downloaded 360 video in my assets
created Render texture with dimension of video
created Material skybox(panaromic) and linked rendered texture
Skybox material applied to screen
Added unity video player scene .linked video and Render texture to video player
I have streaming assets folder in which I have the video and Transcode is also checked
[I can hear the Audio but not the video]
Issue: 1) I see the video plays in desktop when we hit play, but when built into apk and copied to VR headset I see only blank screen
(play on awake is also checked)
should I consider anything else extra?
I’m not totally sure about skyboxes using a render texture of a video on device, and don’t have a repro of that on hand. However I don’t see any reason why it shouldn’t at least work. You would probably want it to be a really, REALLY high resolution video though.
A few things to consider:
Are you getting audio from the build (.apk)?
Is your path your are using to load from on android correct?
“I have streaming assets folder in which I have the video and Transcode is also checked” – You shouldn’t need either of these to render a video on headset.
Have you checked your device logs while running the app?
I’d actually recommend starting with logs. If you are unsure how, check out the Android Logcat package, I use it probably every day. Make a tag for “Unity” and you should be good to go.