I am trying to predict video file size given:

  • camera fps.
  • number of horizontal pixels.
  • number of vertical pixels.
  • bit depth.
  • time duration of the video.

using the following formula

file_size = horizontal_px * vertical_px * bit_depth * fps * duration_s

For a specific video in my phone (mp4 format) a video of 13s occupies 23.72Mb of memory. However considering the characteristic value of each of the given parameters and the formula provided, that should be 2313Mb instead, almost a two orders of magnitude difference.

  • camera fps: 30 fps.
  • number of horizontal pixels: 1920.
  • number of vertical pixels: 1080.
  • bit depth (unspecified, assume it to be 24 bits).
  • time duration: 13s.

I imagine that part of it may amount to the compression algorithms to reduce raw video size, but I wouldn't expect it to be able to reduce ~99% of the original size. What am I missing?

1 Answer 1


I don't think this is possible without more information. Even if you only want a very rough estimated filesize, you are still missing information that will affect the final size.

Couple of things you should know:

  • some smartphones use a variable framerate in video. This is the bane of any video editor but great for casual smartphone users.
  • Video can be compressed in different ways, using different codecs, and this will vary between devices. You may be able to create a formula for one device, but this won't apply to other devices.
  • compressed video doesn't just reduce a file to a certain % of it's original size. The compression ratio will vary a lot depending on the video contents.
  • I should think it's unlikely your phone will record in 24-bit color. Some new phones will record 10-bit but 8-bit is common.

Instead, you should see if your device you use has a standard or average bitrate. Most digital cameras, camcorders, DSLR's, etc will shoot video that will have a fairly consistent bitrate across different files. If your manual doesn't say specify this, shoot some videos in different environments and average out the bitrate from the files. Bitrate is a standard piece of metadata that will be included in most video files. For instance my Canon 5D records at about 17250kbps for FHD video in PAL at it's lowest compression rate.

You can simply calculate by doing bitrate X time = filesize, and this will be reasonably accurate.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.