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)

BDHVRBDHVR Posts: 8
NerveGear
Hello,
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!

Comments

  • JacksonGordonJacksonGordon Posts: 138
    Art3mis
    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
    NerveGear
    edited April 11
    Hi!

    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
    NerveGear
    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
    NerveGear
    Hi
    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
    NerveGear
    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
    NerveGear
    edited June 12
    Thanks for the quick reply. 
    Creating the asset bundle with the mp4 flagged as a video clip worked perfectly.
    Cheers
Sign In or Register to comment.