I am attempting to play a Spatial Video (MV-HEVC) on a plane in Unity. When I build and run the project and compile it to the Vision Pro via Xcode, the first frame of the video shows up but it never plays. I am using the VisionOSVideoComponent from this page: Video Player components | PolySpatial visionOS | 1.0.3
I am also pretty certain I have set up the file in the StreamingAssets folder correctly, based on the instructions in the linked documentation. Does anyone have an idea as to why the video isn’t playing?
I have two copies of the video - the first one is in the path: Assets/Video. This is the video version I am referencing in the VisionOSVideoComponent script. The second is in this path: Assets/StreamingAssets/VisionOSVideoClips. FYI I also tried it in this path and it didn’t work: Assets/StreamingAssets
Im not sure if there is a step that I appear to be missing - the video plays correctly when I play the scene in unity
I think I just figured out a solution. My project was based on an old version of the Unity VisionOS Project example. I created a new project based on a version 1.2.3 and the video seems to play correctly.
I’m facing an issue with playback of my spatial video in my unity build, though not the same as this thread exactly. I’ve added a .mov file (dragged out of the Photos app on Mac) to the StreamingAssets/VisionOSVideoClips/ folder and added another instance of the clip into the Assets/Resources/ folder. I’ve dragged the clip from resources to the VisionOSVideoComponent. When attempting to run the build, the video clip won’t play, even if I wire a button press to invoke the Play method.
Can you please let me know if I’m missing a step? I’ve attached a screenshot of my setup.
I would try removing the second version from the resources folder as @ina suggested. If that doesn’t fix it you can submit a bug report and post in the incident number here and I can take a look.
I also noticed it looks like the video has the Lazy Follow component, is it meant to follow the users headpose?
I put it into the root of the ExampleAssets directory and the issue persists. Is there a specific arbitrary folder you’ve placed it in when testing? @ina
Dan, I added Lazy follow so it shows up in my line of sight just for temp testing. Prev it would spawn on the ground. I’ve tried builds without the Lazy Follow as well.
I’ll submit a bug report shortly and follow up with the incident number.
The incident number is IN-77915.
I noticed with the simulator it plays the Spatial Video no problem. When running in headset, it plays the audio for a brief moment (say 1-2 seconds) then cuts and the frame stays frozen.
EDIT:
Hey, sorry to drag this thread on. I turned off PlayOnAwake and manually invoked playback of the video and now the issue no longer persists. I suspect there might be some connection between the lack of playback and this Xcode warning, which is mentioned in a few other threads for this forum.
That warning in XCode can be ignored, it’s related to when we try to do GPU work and aren’t allowed (like submitting metal frames).
The good news: I took at look at your project and everything is setup correctly
The bad news: There’s some issue on our side where Play On Awake doesn’t work in an unbounded scene. If you build to a bounded scene the play on awake works just fine. I’ve routed the bug to the right person on our side.
Sounds like calling Play() manually lets you work around the issue for now. I tested with my own spatial video just to be sure the video wasn’t the issue.
PS: Nice videos, the hiking one has really good spatialization and looks amazing!