Search code examples
iosswiftuikitavfoundation

Bundling mp4 files with the app, letting users play videos straight from the device over downloading it from the cloud


I want my app to have a bunch of 30-sec mp4 clips. I want to ship these clips with the App and not have the users download them from the cloud

Each of my clip is around 5 MB and I expect to have a lot of them.

Is there a way to compress them to reduce the app download size? ( the 5Mb size is after all the CODEC's etc) I need an iOS solution for this.


Solution

  • MP4 is very compressed already so there isn't a way to compress it more. That's why zipping mp4s barely changes their size.

    You have two options:

    1) Include whichever ones the user needs first and download the rest, hopefully before they're needed.

    2) If you absolutely have to have them all in the app you could reduce the resolution and/or encode at a lower bitrate.

    If you go with option 2, you could still download higher quality ones from the cloud in the background and use those if available, but default to the lower quality ones if not.