Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

Expansion File Bundled Scene Not Loading Video (Go)

I recently used this tutorial from Gabor to attempt to get around size limitations for apks by creating an asset bundle and turning it into an expansion file. My app is essentially an interactive video player, with a 3.65GB video, in a single scene. I removed the scene from the build list, turned it into an asset bundle obb and created a new scene that loads the asset bundle and starts the loaded scene, it works in loading the scene and the interface, except the video doesn't play. Using Unity 2018.3.6f1 and Oculus SDK 1.34.

Any help would be greatly appreciated, thanks!


  • JacksonGordonJacksonGordon Posts: 138
    You might have to pass the video file name to the player again.  Before it was an asset bundle, it might have had a reference to the video.  The switch to the asset bundle might have changed when things are compiled or referenced.  I would try a null check at the start of the run video script to make sure it has the name of the file to play.  Just a thought/ guess though.
  • ivan.martinietoivan.martinieto Posts: 1
    edited April 2019

    I'm working in a similar app and I'm doing the same tutorial but I have a lot o doubts becouse it's my first "asset bundle":
    I have 4 scenes, first scene (0) go in the apk and the another 3 go in the asset bundle .obb with the video files.

     I'm using "Oculus Alpha channel" to upload the apk and asset bundle .obb. I need to use the command "BuildAssetBundles or AssetBundle.LoadFromFile("/sdcard/Android/obb/main.1.com.oculus.demo.obb");" to load de .obb file, or the "Oculus alpha channel" decompress automatically the asset bundle in the same folder?
  • BDHVRBDHVR Posts: 8
    Found the solution, videos in a compressed asset bundle won't work, apparently something to do with interfering with the video's own compression. Solution is to change your bundle build script, so where the Oculus-suggested code says:
    BuildPipeline.BuildAssetBundles("AssetBundles", BuildAssetBundleOptions.ChunkBasedCompression, BuildTarget.Android);
    You want to change to:
    BuildPipeline.BuildAssetBundles("AssetBundles", BuildAssetBundleOptions.UncompressedAssetBundle | BuildAssetBundleOptions.ForceRebuildAssetBundle, BuildTarget.Android);
    This way you can have a small (in my case 50mb) apk, and an obb that contains a large video (in my case 3.65gb).

    Hope this helps anyone with a similar problem!
  • zeroonedeveloperzeroonedeveloper Posts: 3
    I am having trouble with Out of Memory issues when trying to load.extract  a 1GB movie (.byte file) from an asset bundle.
    I'm interested in the solution here of adding the entire scene to the asset bundle and not just the movie.
    If you don't mind me asking are you using the standard Unity VideoPlayer or something else like Easy Movie Texture?
  • BDHVRBDHVR Posts: 8
    I'm using the native Unity VideoPlayer, but I think AVPro Video might be better all round, I haven't made the switch for this particular project but in another I found AVPro performed much better. As far as I'm aware as long as you're not compressing the assetbundle, any video player will work.
  • zeroonedeveloperzeroonedeveloper Posts: 3
    edited June 2019
    Thanks for the quick reply. 
    Creating the asset bundle with the mp4 flagged as a video clip worked perfectly.
  • robertcoomberrobertcoomber Posts: 10
    edited December 2019
    @BDHVR process worked for me as well. 

  • SamElTerribleSamElTerrible Posts: 2
    I'm also working with my first asset bundle, but I'm struggling to figure out how to play a video from the asset bundle on AV pro

    I can load the bundle normally using AssetBundle.LoadFromFileAsync(). However, AV pro requires you to pass in an absolute path or URI to play a video.

    I can do assetBundle.LoadAsset to load the .mp4, but this still doesn't give me a URI to feed into AV pro.

    Does anyone know how I could get this working?

  • SamElTerribleSamElTerrible Posts: 2
    Update: Av pro can also play a video from a byte[], so the other option is to convert the .mp4 into a byte[] and play it. I still need to figure out how to do this...
Sign In or Register to comment.