<p>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.</p>
<p>Couple of things you should know:</p>
<ul>
<li><a href="https://momofilmfest.com/smartphone-iphone-filmmaking-what-is-variable-frame-rate-vfr/" rel="nofollow noreferrer">some smartphones use a variable framerate</a> in video.  This is the bane of any video editor but great for casual smartphone users.</li>
<li>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.</li>
<li>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.</li>
<li>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.</li>
</ul>
<p>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.</p>
<p>You can simply calculate by doing bitrate X time = filesize, and this will be reasonably accurate.</p>

CC BY-SA 4.0
2022-07-13T10:47:31.500Z
2022-07-13T10:47:31.500Z
AutoBaker
<p>I am trying to predict video file size given:</p>
<ul>
<li>camera fps.</li>
<li>number of horizontal pixels.</li>
<li>number of vertical pixels.</li>
<li>bit depth.</li>
<li>time duration of the video.</li>
</ul>
<p>using the following formula</p>
<pre><code>file_size = horizontal_px * vertical_px * bit_depth * fps * duration_s
</code></pre>
<p>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.</p>
<ul>
<li>camera fps: 30 fps.</li>
<li>number of horizontal pixels: 1920.</li>
<li>number of vertical pixels: 1080.</li>
<li>bit depth (unspecified, assume it to be 24 bits).</li>
<li>time duration: 13s.</li>
</ul>
<p>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?</p>

<video><file-formats><storage>
Estimating video file size given camera parameters
A. Fenzry
# Estimating video file size given camera parameters

(Asked by: username_0 on 2022-07-13)

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?

**Tags:** video, file-formats, storage


---

## 1 answers

### Answer by username_1 on 2022-07-13. Score: 2

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](https://momofilmfest.com/smartphone-iphone-filmmaking-what-is-variable-frame-rate-vfr/) 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.


---

