Hi!
I would like to create an Android ASTC build for Oculus Quest that contains a 10GB stereoscopic 360 video file, which I wouldn’t want to compress further to maintain quality.
I have tried enabling large-, patch- and overflow OBB files and enabled chunk creation for PAK files.
Yet I’m still getting this error: "UATHelper: Packaging (Android (ASTC)): ERROR: Stage Failed. Could not build OBB “…\Saved\StagedBuilds\Android_ASTC.obb. The file may be too big to fit in an OBB (4 GiB limit)”
Is there a way to get it to work with the OBB creation and Chunks, or even to exclude the file and put it into a separate “Movies” folder, as it is automatically the case with Windows builds? (And also have it install/copy correctly with the .apk on the device later)
One solution to overcome the 4 GiB limit on OBB files in Android is to split the video file into smaller chunks and package each chunk as a separate OBB file. You can use the chunk creation feature in Unreal Engine to create multiple OBB files for the video. This will ensure that the video file is correctly installed with the .apk on the device.
Another option is to store the video file in a separate “Movies” folder outside of the OBB file, similar to how it’s done with Windows builds. This way, you can maintain the video quality without having to compress it further.
Note that for this solution to work, you need to make sure that the video file is correctly installed with the .apk on the device, and the path to the file is correctly set in your Unreal Engine project.
Edit: Another thing that hit me, would be to use something similar to an iFrame to stream the video from a server or website.
This is exactly what I was trying to do with the options that I described above. However it doesn’t seem to work. Is there a trick other then enabling chunk creation, large-, patch- and overflow OBB files?
Is there a dedicated option for that? If I just exclude the video file from the build and manually create a Movies folder (UE doesn’t seem to do create a Movies folder with Android build if I’m not mistaken), I don’t see a way to tell the installer to fetch that file during installation.
Streaming the file massively reduces the quality too much unfortunately.
The application works flawlessly on the device with UE’s launch option - I hope there is a way to also make it package with the large file.
For android you can create chunks from the project menu. It should be under Android if I am not mistaken.
If you want to package the video file outside of the OBB file, you can create a custom downloader that downloads the video file to the device’s external storage after the installation is complete. You can also use a web server to host the video file and download it to the device as needed. This will most likely require you to use another service outside of Unreal Engine. Streaming doesn’t have to reduce the quality depending on how you load and buffer the video.
The maximum size limits are: 150MB: Maximum compressed download size of APKs for one device generated from app bundles.
Meaning that you need to have a very small game in order for it to be uploaded on the Google Play Store. I suggest the method of streaming the video to the game. However, my knowledge of how to achieve this without any research is very low.
For android you can create chunks from the project menu. It should be under Android if I am not mistaken.
I researched more about creating chunks. To my knowledge I’d have to assign multiple chunk IDs to the file in question. However the files inside the Movies folder are not visible in the UE content browser and just putting multiple Primary Asset Labels as DataAssets with multipe IDs inside the Movies folder doesn’t seem to work. So I’m not sure how to target the actual .mp4 for creating multiple chunks from it. Maybe I’m missing something?
If you want to package the video file outside of the OBB file, you can create a custom downloader that downloads the video file to the device’s external storage after the installation is complete.
Okay, I’ll look into that more. And for that to work I guess I’d point the video’s FileMediaSource to something like “/storage/emulated/0/movies/filename.mp4” instead of “./Movies/filename.mp4”?
Meaning that you need to have a very small game in order for it to be uploaded on the Google Play Store.
The actual .apk is relatively small. A build for Oculus Quest can contain multiple OBB files with up to 4 GB each - that’s why it would definitely be interesting to know how to target an .mp4 for chunking.
It would be so great to get more info on how to package Android correctly with bigger OBB sizes, specially using videos. I am exactly on the same page and getting the same results. I can Quick Launch de App from UE Editor but I cannot install it with the installer. Everything seems to go fine but obb file is not copied correctly (Android Studio shows a 600mb file but my generated obb file is 3.8 GB).
I have just tested that I can succesfully install the app sideloading it by copying the OBB file into /sdcard/android/obb/ and running the installer (copied anywhere inside the device). If anyone could help…
Thanks!