# How to calculate storage space needed for a video?

#### That_Tech_Guy_Again

##### Commendable
How do you calculate the amount of storage space necessary for a video? I am seeking a mathematical formula. Since computers use "logic", and thereby mathematics, this should be simple to understand. However, i have been unsuccessful with my google queries regarding this. So i have come here.

So for example, 1080p 60fps videos.

1980 X 1080 = 2,730,600

(I assumed each "pixel" is equal to 1 bit)

2,730,600 X 60 = 124,416,000

(Bits X FPS = Total bits per second)

124,416,000 / 1,000 = 124,416

(Divide by 1,000 to go from Bits to KiloBits)

124,416 / 1,000 = 124.416

(Divide by 1,000 to go from KiloBits to MegaBits)

124.416 / 8 = 15.552

(Divide by 8 to go from MegaBits to MegaBYTES)

15.552 MegaBytes per second for 1080p at 60fps. Without Compression.

15.552 X 60 = 933.12

(MegaBytes per second times 60 seconds, for MegaBytes per Minute)

933.12 MegaBytes Per Minute

Now That is my calculations. However, this answer seems unrealistic.

This is based mostly on guess work, since i cannot find ANY source to give any kind and/or type of mathematical equation. So is the answer correct or wrong? Should i have included bit depth? What other things should be included? or excluded from the equations?

And is anyone capable of giving a source for their answer?

Also, i will not accept an answer without the underlying mathematical proof.

#### USAFRet

##### Titan
Moderator
Resolution, codec (compression), bitrate, and the capture device matter.
1 minute of 1080 AVI is larger than 1 minute of 1080 mp4.

Solution? Capture exactly 1 minute. Examine the resulting file size, and extrapolate from there.

Even that is not exact.
Exactly 3 minutes of AVI in my dashcam might range from 344MB to 433MB.
1680x960, 15110kbps bitrate, 25 frames/sec = 344MB file size
1680x960, 19590kbps bitrate, 25 frames/sec = 433MB file size
The bitrate difference is whatever the camera thought it should do at that moment.

#### That_Tech_Guy_Again

##### Commendable

Doing a simple google search is irrelevant. And after looking at the results, i could not find the answer i am looking for.

Perhaps you received a different set of results. However, do not assume that using two different computers to search the same words on google will lead to the same results.

Are you able to give me the "compression ratio", if not, then the codec is "irrelevant".

#### COLGeek

##### Titan
Moderator
Good luck on your quest. I am done here.

#### USAFRet

##### Titan
Moderator

The codec is absolutely not irrelevant.
There are dozens, they have different compression and filters, and they all result in a different file size for the exact same source file.
https://en.wikipedia.org/wiki/Comparison_of_video_codecs

#### That_Tech_Guy_Again

##### Commendable

I know resolution and bitrate matter. I am not sure what you mean by capture device though. However, the entire point has been ignored.

For i am "LOOKING FOR A MATHEMATICAL FORMULA". (Note. The use of capitalization is not an indicator of raising ones voice, my particular usage has always been to use capitalization to make specific important words stand out).

For example: Is this the mathematical formula?

Bitrate X Bit depth X resolution X Frames Per Second X Codec compression ratio = Total number of bits per second

This is an example, it is undoubtedly the wrong formula since i am here asking for it. But to say , or more accurately imply that there is no mathematical formula is to say that mathematicals, does not exist, and by extension you would have to say that computers, WHICH RUN ON MATHEMATICS, cannot exist.

Everything you said may be important. But you missed the entirety of the point. I want the mathematical/empirical/verifiable formula. I do not want anecdotal evidence.

Thankyou for sharing examples though, it appears you are able to understand how bitrate factors into everything, but you still have not shown how you are able to get 344MB from the variables, 1680x960, 15110kbps bitrate, 25 frames/sec, simply giving me the information you can obtain about your device including the variables, without showing how they are included in a mathematical formula is not helpful. I get that it was only an example using your particular device.

However, do you get 344MB by Simply adding all the numbers together? What about times (X) them together to get the number of bits? And then divide by 1,000 to get kilobits? and then divide by another 1,000 to get megabits?

Then what if the AVI format enables the total video to compress by 30%. would you then divide your megabits answer by 1.30???? Would you then have the correct answer in the AVI format???

You can have a mathematical formula, which includes the codec, file format, bitrate, bit depth, resolution, Frames Per Second, However, all i want to know is, What EXACTLY IS the mathematical formula.

#### That_Tech_Guy_Again

##### Commendable

Perhaps i did not explain what i was saying accurately. I meant, it was irrelevant in the context, that if you do not give me the compression ratio of the codec being used e.g AVI, MP4, ratio for which it is being used on the source file, then there is no point in the codec even being stated.

For example, is the compression ratio for the codec AVI 30%, 40% or 50%???

#### USAFRet

##### Titan
Moderator
A = X x Y resolution
B = bits per pixel
C = frames per second

A * B * C = file size per second.

Add in variable bitrate, subtract codec compression (or not), add in file format sector slack space, add in audio channel...

Any of the dozen links available from the google search will show the same basics.

#### That_Tech_Guy_Again

##### Commendable

So with calculating the file size with a 1080p resolution at 60fps. A * B * C = File size per second. I got back 995,328,000 So i assume this is the total BITS per second?

So i divide by 1,000 to get kilobits. 995,328.

Then i divide by 1,000 again, to get megabits. 995.328. This almost equals 1 Gigabit per second.

Is this wrong? It just seems that this is a bit too big for 1 second of video.

Then if i was to divide by 8 to get MegaBytes per second. I get 124.416. This just seems like a ludicrous amount of space necessary for 1 second of raw video.

I assumed the B = Bits per pixel is 8

If an image is 24 bits per pixel, it is also called a 24-bit image, a true color image, or a 16M color image. Sixteen million is roughly the number of different colors that can be represented by 24 bits, where there are 8 bits for each of the red, green, and blue (RGB) values.

but if i * by 8 and then later divide by 8 to get to MegaBytes. Then what is the point?

#### USAFRet

##### Titan
Moderator
Read through here:
https://blog.frame.io/2017/03/06/calculate-video-bitrates/

(one of the first links from the above google search)

Raw video is huge. That's why we have codecs and compression.

#### That_Tech_Guy_Again

##### Commendable

You do realize that 2 different people with 2 different sets of browser will get 2 DIFFERENT sets of results right?

I am from Australia, and my internet history is definitely going to be different from yours, Why would you think that we would have the same search results?

I will be reviewing the information submitted.
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "https://forums.tomshardware.com/threads/how-to-calculate-storage-space-needed-for-a-video.3425120/", "fetch_time": 1560880432000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2019-26/segments/1560627998808.17/warc/CC-MAIN-20190618163443-20190618185443-00119.warc.gz", "warc_record_offset": 453605836, "warc_record_length": 31976, "token_count": 1805, "char_count": 7307, "score": 3.5625, "int_score": 4, "crawl": "CC-MAIN-2019-26", "snapshot_type": "latest", "language": "en", "language_score": 0.9048708081245422, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00041-of-00064.parquet"}