switz
switz

Reputation: 25188

iOS Video File Sizes and Bandwidth Considerations

I'm building an app whose core functionality is centered around 1-10 second videos. Currently, I'm recording video using PBJVision with the preset set to AVCaptureSessionPresetMedium. A 10 second video is around ~3-5MB. Considering each user could theoretically download hundreds or even thousands of videos a day, I was wondering if there was a more bandwidth efficient way of packing these videos up.

Could WebM be a more suitable container format?

I searched across the web, but couldn't find any articles pertaining to this specific question.

Edit: this looks promising

Upvotes: 3

Views: 362

Answers (2)

9dan
9dan

Reputation: 4272

Modern video codecs (include WebM VP8) usually has compression ratio around 1/50. By adjusting codec parameters we can archive ~ 1/100 (IMHO), but very difficult and horrible picture quality.

Roughly, we can think of 1 camera pixel consist of 1.5 bytes (YUV 12 or 16 bits).
If the resolution is 720x480 and the frame rate is 30/sec,

720 x 480 x 1.5 x 30 = 15,552,000
x 10 sec = 155,520,000
/ 50 = 3,110,400
~= 3MB

It seems PBJVision doing good.

Reducing resolution, or lowering frame rate would be the first consideration, I think.

Upvotes: 2

szatmary
szatmary

Reputation: 31101

ios wont playback webm unless you use a software decoder. A software decoder will take more CPU/battery and produce more heat. And webm will not even solve your problem. What you want is to reduce the bitrate, but this will also reduce the quality. So its a trade off.

Upvotes: 0

Related Questions