Forum Discussion
Anonymous
6 years agoExpansion File Bundled Scene Not Loading Video (Go)
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!
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!
10 Replies
Replies have been turned off for this discussion
- AnonymousYou 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_martinietoHonored GuestHi!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?
- AnonymousFound 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:
You want to change to:BuildPipeline.BuildAssetBundles("AssetBundles", BuildAssetBundleOptions.ChunkBasedCompression, BuildTarget.Android);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! - zeroonedeveloperProtegeHi
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? - AnonymousI'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.
- zeroonedeveloperProtegeThanks for the quick reply.
Creating the asset bundle with the mp4 flagged as a video clip worked perfectly.
Cheers - robertcoomberExpert Protege@BDHVR process worked for me as well.
- SamElTerribleHonored GuestHi!
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?
Thanks! - SamElTerribleHonored GuestUpdate: 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...
- AlrapHonored GuestHello,
I'm having a similar problem. I have two scenes that play a selection of videos using Unity VideoPlayer, which I have put in an asset bundle. Scripts with the lists of videos are attached to GameObjects in the scenes. I have followed the tutorial and have used 'UncompressedAssetBundle' as an option to build the asset bundle. My videos still don't play. Is there anything else that I could be missing?
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 1 year ago
- 1 year ago
- 6 years ago
- 16 days ago