I'm going to have a large number of mp3 files in my app. Right now, this is what I do:
Use On Demand Resources so that the files will not affect the app size;
At first launch:
Now my question is:
If the total files size reaches more than 300mb for example, it will be a problem since maybe the user will delete the app because he is running out of space. How can I solve this?
I was thinking about:
store my files online and play, but then everytime the user wants to play them, he will use mobile data. Or, if the user doesn't have data connection or he is in a place without signal, he won't be able to use the app;
compress the files in a zip, then unzip it when the user wants to play them and zip again;
ask the user which files he wants to download, and then remove them if he wants to download more.
Without knowing how an average user will use the app it is impossible to say is it better to download everything, allow user to download only required files or store everything online. In general you should not make user wait or limit app functionality if user has slow connection.
One thing you should do for sure is to decrease files size as much as possible. Zip will not help you since it can not decrease already compressed media files (like mp3, ogg and others).
First off all check that audio bitrate is not too big. Typical bitrates for different purposes:
So if audio contains only speech 48 kbit/s is usually enough. For music 128 should be ok.
Second - you should use better compression codec than mp3. For detail information please check this link http://soundexpert.org/encoders-48-kbps but usually you should use AAC codec.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.