We have a video we need to play at variable speeds for an iPhone app. But you're only able to change the video playback speed between .5X-2X or so. We needed more control than that.
Instead we broke our videos into a consecutive series of PNG's that we "flip through" on a timer.
The size of all these PNG's is making the app unwieldy to download over the wire. How can I best use this flipbook approach while being smart about respecting the iPhones own built-in compression routines? How can we avoid both space and memory hits from this approach, especially on older iOS devices?
Right now, the app is too large at almost 50 MB. It also takes a bit of time during startup to grab all the images and put it in an NSMutableArray.
I ended up using jpg's instead.
First off, please have a look at my blog post related to memory usage for images video-and-memory-usage-on-ios-devices. It actually will not matter if you use JPEG or PNG in terms of the amount of memory consumed by the decompressed images. What could end up making a difference is the app size and that is something that can be addressed by using h.264 instead of JPEG to compress the video frames. Anyway, if you only hold 1 or 2 frames in memory at the same time then you do not have to worry about crashing on the device. But, you could still get faster execution times by using a library built specifically for this purpose. Please have a look at my library linked in the above glob post if you want to reduce app size further and speed up loading time for each frame.