User Tools

Site Tools


video_files:formulas

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
video_files:formulas [2025/05/16 22:07] petervideo_files:formulas [2025/05/17 07:24] (current) peter
Line 1: Line 1:
 ====== Video Files - Formulas ====== ====== Video Files - Formulas ======
 +
 +===== General =====
  
 <code> <code>
Line 28: Line 30:
 ---- ----
  
-===== File Size =====+===== Picture File Size =====
  
 <code> <code>
Line 37: Line 39:
 **NOTE:**   **NOTE:**  
  
-  * **Color depth**:  RGB would have a color depth of 3 (24 bits; 8 bits for Red, 8 bits for Green, 8 bits for Blue). +  * **width**:  In pixels.  
-  **Color depth**:  RGBA would have a color depth of 4 (32 bits; 8 bits for Red, 8 bits for Green, 8 bits for Blue; 8 bits for Alpha).+  * **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).   * **frame rate**: in fps (frame per seconds).
   * **duration**:  in seconds.   * **duration**:  in seconds.
Line 45: Line 53:
  
 ---- ----
 +
 +===== Sound File Size =====
 +
 +<code>
 +Sound File Size = sample rate x duration x bit depth x number of channels
 +</code>
 +
 +<WRAP info>
 +**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.
 +  * **channels**: 1 is mono, 2 is stereo, 6 is dolby-surround.
 +
 +</WRAP>
 +
 +----
 +
 +===== Bitrate =====
 +
 +<code>
 +Bitrate = file size / (number of minutes * .0075)
 +
 +Bitrate = (file size * 8) / (duration in seconds)
 +
 +Video Bitrate = Total Bitrate - Audio Bitrate
 +</code>
 +
 +----
 +
 +===== Duration =====
 +
 +<code>
 +Number of minutes = file size / (bitrate * .0075).
 +</code>
 +
 +----
 +
 +===== Filesize =====
 +
 +<code>
 +file size = bitrate * number of minutes * .0075
 +
 +file size = duration × frame rate × frame size
 +  frame size = H × V × color depth
 +  color depth = 8bitxRGB = 8*3 = 24
 +
 +Picture File Size = colour depth x width in pixels x height in pixels
 +  colour depth = RGB=3 bytes; RGBA=4 bytes
 +  
 +file size = bitrate * time
 +
 +file size = duration × file size per sec / 8
 +  file size per second = fps × frame size
 +
 +Video File Size = (Bitrate / 8) × Duration
 +
 +File Size (in Bytes)=(Video Bitrate × Duration)+Audio Bitrate
 +File Size (in Bytes)=(Video Bitrate × Duration)+((Audio Bitrate x Audio Size)/Audio Channels*6)
 +
 +Compressed Video File Size (GB) = (Bitrate (Mbps) * Total Time (seconds)) / (8 * 1024)  
 +</code>
 +
 +----
 +
 +===== Sound Bitdepth =====
 +
 +See **bits per raw sample** field.
 +
 +An approximation of the sound bitdepth can be calculated by using variables: audio sample rate, audio channels and audio bitrate.
 +
 +<code>
 +audio bitdepth = audio bitrate / audio_channels / audio sample rate
 +</code>
 +
 +<WRAP info>
 +**NOTE:**  The audio bitrate may need to be multiplied by 1,000 to be in bits.
 +
 +  * This formula should produce a value such as 1, 2, 3 or 4; which is the number of bytes.
 +    * When these bytes are multiplied by 8 to convert them to bits, this will result in 8, 16, 24, or 32 bits.
 +</WRAP>
 +
 +----
 +
 +===== Sound Bitrate =====
 +
 +<code>
 +bit rate = audio sample rate * audio channels * audio bit depth
 +</code>
 +
 +----
 +
 +===== Sound File Size =====
 +
 +<code>
 +Sound File Size = sample rate x duration x bit depth x number of channels
 +</code>
  
  
video_files/formulas.1747433224.txt.gz · Last modified: 2025/05/16 22:07 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki