Videoclip doesn't work with AssetBundle

I want to distribute a video clip with Assetbundles using VideoPlayer component, but it doesn’t work.

Is there anyone who succeeded in playing videos with Assetbundles?

I apply PolySpatialObjectUtils.MarkDirty(renderTexture) and use BuildAssetBundleOptions.UncompressedAssetBundle option.

The following errors occur on both Unity Editor and a simulator.

AVFoundationVideoMedia error while reading unityvfs:///LOCALPATH/archive:/CAB-5d40f7cad7c871cf2ad2af19ac542994/CAB-5d40f7cad7c871cf2ad2af19ac542994.resource
Context: AVFoundationVideoMedia::OpenForRead found no video tracks
Error details: <Empty>
VideoPlayer cannot play clip : Assets/PATH/video.mp4

I have confirmed that the video codec is supported on visionOS.

  • The video clip is able to be played in a built app on visionOS.
  • The video also works with URL in stead of a video clip in an assetbundle.

I guess the problem is just caused by the assetbundle.

I recall that Unity didn’t support videoclip assetbundle on Android before Unity 2018.

I want to make sure that eather

  1. I made a mistake with the video playback, or
  2. The video clip in an asset bundle is not yet supported on visionOS.

Does anyone have a solution or suggestion?

Video clip assets currently do not work with asset bundles; this is a known limitation. At the moment, they must be placed into the StreamingAssets folder so they can be accessed on device/sim.

Can you submit a bug report (no repro project needed!) or submit a request on the visionOS roadmap and we can begin to compare it with other feature requests? Thank you!

Thanks for your reply.
I have submitted a bug report IN-82873.

1 Like