User Tools

Site Tools


video_files:formulas

This is an old revision of the document!


Video Files - Formulas

File size = bitrate * number of minutes * .0075
Bitrate = file size / (number of minutes * .0075)
Number of minutes = file size / (bitrate * .0075)

otherwise

GB = mbps * minutes * .0075
mbps = GB / (minutes * .0075)
minutes = GB / (mbps * .0075)

NOTE: The .0075 is derived from the following:

  • As there are 8 bits per byte, it is required to device by 8 to determine the bits.
  • To convert the number of minutes to seconds, multiply by 60.
  • Divide by 1,000 to to convert megabits (Mb) to megabytes (MB), or megabytes to gigabytes.
1/8 * 60 / 1000 = 0.0075.

Picture File Size

File Size = width x height x colour depth x frame rate x duration

NOTE:

  • width: In pixels.
  • height: In pixels.
  • color depth: The number of bits used to encode the colour of one pixel.
    • A 1-bit colour depth means that the graphic can only include 2 colours (e.g. 1 = black, 0 = white).
    • A 8-bit colour depth means that the graphic can include up to 256 colours.
    • A 3-Byte colour depth (RGB code) would include 16,777,216 colours.
      • RGB would have a color depth of 3 (24 bits; 8 bits for Red, 8 bits for Green, 8 bits for Blue).
    • A 4-Byte color depth (RGBA) can also be used. (32 bits; 8 bits for Red, 8 bits for Green, 8 bits for Blue; 8 bits for Alpha).
  • frame rate: in fps (frame per seconds).
  • duration: in seconds.

Sound File Size

Sound File Size = sample rate x duration x bit depth x number of channels

NOTE:

  • sample rate: The number of samples being recorded per second; (such as 48,000 samples per second).
  • duration: In seconds.
  • bit depth: The number of bits used to record one sample.
    • Retro-arcade games used to use 8-bit music. Old mobile phones used to use 16-bit ringtones. Higher quality sound files may use a 32-bit bit-depth or higher.
  • color depth: The number of bits used to encode the colour of one pixel.
    • A 1-bit colour depth means that the graphic can only include 2 colours (e.g. 1 = black, 0 = white).
    • A 8-bit colour depth means that the graphic can include up to 256 colours.
    • A 3-Byte colour depth (RGB code) would include 16,777,216 colours.
      • RGB would have a color depth of 3 (24 bits; 8 bits for Red, 8 bits for Green, 8 bits for Blue).
    • A 4-Byte color depth (RGBA) can also be used. (32 bits; 8 bits for Red, 8 bits for Green, 8 bits for Blue; 8 bits for Alpha).
  • channels: 1 is mono, 2 is stereo, 6 is dolby-surround.

video_files/formulas.1747433863.txt.gz · Last modified: 2025/05/16 22:17 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki