Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VisionOS] Problem with video loading #2094

Open
makszhk opened this issue Dec 3, 2024 · 1 comment
Open

[VisionOS] Problem with video loading #2094

makszhk opened this issue Dec 3, 2024 · 1 comment
Assignees
Labels
triage Needs triage visionOS visionOS platform

Comments

@makszhk
Copy link

makszhk commented Dec 3, 2024

Unity version

2022.3.45f1

Unity editor platform

Windows

AVPro Video edition

Ultra

AVPro Video version

3.1.3

Device hardware

Vision Pro

Which visionOS version are you using?

2.1

Application mode

Immersive

Texture format

BGRA

Audio output

System Direct

Any other Media Player component configuration required to reproduce the issue.

No response

Which output component(s) are you using?

Resolve to RenderTexture

Any other component configuration required to reproduce the issue.

No response

The issue

The problem is as follows: sometimes (!) no video will load or play.
I have 3 videos. They have auto play and auto open. After I download the build locally on Vision Pro, everything seems to work fine. But after restarting the app, sometimes one or more videos won't play.
I've even already written a script that turns on these videos through a delay so that it's not at the same moment, but that didn't help.
Everything works through ResolveToRenderTexture and PolySpatial Updater (which labels the Dirty texture). There are 3 custom materials for each video, each with a different RenderTexture. The video is taken from your example with Transparent mask.
I'm attaching an example of a project where the video sometimes doesn't load.
I would like to specify that sometimes it happens 10 times you restart the app - everything works fine, but on 11 it doesn't work. That is, I have not managed to catch it adequately yet.
To determine in the project that the video is not loaded is very simple - on VisionOS transparent materials are grey for some reason, and when the video is not loaded in the project you can see how some pieces of meshes grey.
Thanks.

Media information

No response

Log output

ArgumentException: RenderTextureDesc width must be greater than zero.
Parameter name: desc.width
  at UnityEngine.RenderTexture.ValidateRenderTextureDesc (UnityEngine.RenderTextureDescriptor desc) [0x00000] in <00000000000000000000000000000000>:0
  at UnityEngine.RenderTexture.GetTemporaryImpl (System.Int32 width, System.Int32 height, UnityEngine.Experimental.Rendering.GraphicsFormat depthStencilFormat, UnityEngine.Experimental.Rendering.GraphicsFormat colorFormat, System.Int32 antiAliasing, UnityEngine.RenderTextureMemoryless memorylessMode, UnityEngine.VRTextureUsage vrUsage, System.Boolean useDynamicScale) [0x00000] in <00000000000000000000000000000000>:0
  at UnityEngine.RenderTexture.GetTemporary (System.Int32 width, System.Int32 height, System.Int32 depthBuffer, UnityEngine.RenderTextureFormat format, UnityEngine.RenderTextureReadWrite readWrite) [0x00000] in <00000000000000000000000000000000>:0
  at RenderHeads.Media.AVProVideo.VideoRender.ResolveVideoToRenderTexture (UnityEngine.Material resolveMaterial, UnityEngine.RenderTexture targetTexture, RenderHeads.Media.AVProVideo.ITextureProducer texture, RenderHeads.Media.AVProVideo.VideoRender+ResolveFlags flags, UnityEngine.ScaleMode scaleMode) [0x00000] in <00000000000000000000000000000000>:0
  at RenderHeads.Media.AVProVideo.ResolveToRenderTexture.Resolve () [0x00000] in <00000000000000000000000000000000>:0
@makszhk makszhk added triage Needs triage visionOS visionOS platform labels Dec 3, 2024
@Chris-RH
Copy link
Contributor

Chris-RH commented Dec 5, 2024

Hi @makszhk,

We've received your sample project via email. Thank you. Our Apple dev will look at it next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Needs triage visionOS visionOS platform
Projects
None yet
Development

No branches or pull requests

2 participants