I am working on a unity project using vuforia and the vuforia video playback. The project involves adding a lot of mp4 files directly into the project directory because the vuforia video playback needs a local path to the video. The unity project is now up to 3.2 GB, and I just started development. Are there any ways to combat this issue of this app potentially getting way too large?
I recommend storing your larger files in an Asset Bundle. Asset Bundles allow you to store your content online, and download it when necessary (once opened after install, or after the user has paid for the content). You can access your assets locally using the Asset Bundle directory:
Application.dataPath + "/AssetBundles/" + assetBundleName
Compress the files as much as possible until you see some visible quality drop. You just need to find the best combination of video resolution and audio / video bit rates.
Related
I use WWise + Unity. Wwise sounds are in the streaming assets folder. When I build the game in "aab" with "default" compression. All sounds are in place, the weight of the game is correct. But when I upload the game to "Google play" the Wwise sounds disappear and the weight of the game becomes smaller. It looks like it doesn't see the streaming assets folder or deletes it altogether. But at the same time, if you build with "lz4" or "Lz4hc" compression, there is no such problem. What could be the problem?
In the path in the streaming assets folders, I tried to write the name of the folders with a small letter. I read somewhere that this might help. But it did not help. At the same time, everything works as it should only if you make a build with Lz4 and Lz4hc compression. But we need to make a build with "default" compression.
I am making a game and it is going to have a lot of assets in the game and the download size is going to be very big. I am using the Play Asset Delivery to upload my large game to Play Store. More than 90% of the assets are maps. I have a few maps in the game and I don't want them all to be downloaded when the player is installing the game from the Google Play Store. Like Call of Duty Mobile I want the player to be able to download each map individually in runtime.
I separated the assets of every map into a separate assetBundle.
I read the Play Asset Delivery documentation and it seems like I have to use On-demand for each assetBundle.
But the when I build the game and upload it to play store it will download the whole game again. I don't know how to make it not download the on-demand assetBundles.
How do I do that?
is it event possible?
And sorry if my English was bad.
Here's the reference on how you retrieve the assets: Unity Documentation
Basically you need to import the Play Asset Delivery library and call the RetrieveAssetBundleAsync() method to retrieve an AssetBundle.
You can also request asset asynchronously and monitor the download progress.
Here's another reference on how you download the assets. Retrieve assests
I need to cache audio files and save it locally so as to remove latency while playing it. I tried using the audioplayers package but I could not cache it. Could anyone help with this caching? Previously when I followed Angela Yu's course I had played from assets folder but now I need to cache audio files from network.
i'm fairly new to Flutter and is currently working on a course app that requires downloading the videos to the app.
The downloaded video will only be accessible through the app just like Youtube and Netflix, and will be hidden/encrypted from gallery. Would greatly appreciate if someone if someone could point me in the right direction in building this feature.
On iOS and Android your app has it's own isolated folder for storing documents. Items stored there are not intended to be accessible to the user outside of your app. This folder isn't scanned by the Gallery or accessible to other apps on the device. (However, with a little effort a user can access the files so this is not a complete solution where security is an concern. You would need to add encryption if you didn't, say, want a motivated user to copy the video file to a PC and be able to play it.)
the path_provider plugin gives your Flutter app common file locations on a device. The private app folder location is retrieved with getApplicationDocumentsDirectory()
"Download video" is a vague requirement. Most video on the internet (Netflix, Youtube) is provided via HLS or DASH for streaming, which you do download but the video is split up into many files- sometimes thousands of files for a single video. The dart:http package is likely what you're going to want to use to get/download the files (unless the video files aren't available via HTTP/HTTPS, then you'll need a different transport-specific library, like FTP, RTSP, etc.)
I'm using MovieTexture now, but when a video file is added to unity Project, it will automatically be imported and converted to Ogg Theora format. and the quality is really bad.
I have tried changing the quality setting and even on the highest setting the video is still pretty bad quality, I have tried it in multiple file formats like .mov, .avi. .mpeg4 etc. I have even tried converting it to .ogv to try and get around unity converting it itself, and still the quality is poor. The platform is PC, and in the build the quality is the same as in the editor.
so the question is ,how to play high quality video in unity no matter using MovieTexture or anything else like some plugins?
Unity player on Windows only supports OGG, which is why Unity is transcoding your videos.
I have use the Renderheads AVPRo Quicktime plugin on Windows to play very high quality videos in kiosk setups. (They also have one for Windows Media format, but I used Quicktime).
Link: Renderheads AVPro (Quicktime)
I am not affiliated with them in any way, just a very happy customer, and here is the review I posted on the Unity Asset store:
Great work on your plugin! I've used so many plugins that don't work well over multiple platforms, or require switching between platforms, or manual steps, or manual licensing, or DLL hell, etc. I have to say you nailed it.
I develop on a Mac (and your plugin runs in the Unity Editor), then deploying on Windows. It all worked well straight forward and as documented. Even the events to detect when a video has loaded and is ready to play just what I needed (as we are loading a large video file).
Additionally, the error messages are very precise and pin-point a problem (missing file, bad format, etc) which means less time debugging.