Video file size can be a tricky thing. How large is the one you just recorded? This complex storage format holds a lot of information and there are many reasons why you may want to check the size of it. In order to get the most accurate calculation, we need to start by dispelling a common myth:
Video file size depends on the bitrate but not the video resolution.
Bitrate is the most important factor in determining a video file size. Technically-speaking, you can have a 4K video with a lower bitrate than a 720p video. However, in this instance, the 4k video quality would appear poor but take less space on the disk when compared to a 720p video. And if your video contains audio? That track has its own bitrate as well.
File Size = Bitrate x duration x compression ratio
Here is a reference chart taken from sample videos found on Youtube/internet
|Resolution||Bitrate||1 minute||Recording Duration per GB|
|4K (UHD)||20 Mbps||84MB||12 minutes|
|1080p (FHD)||5 Mbps||20MB||50 minutes|
|720p (HD)||1 Mbps||5MB||3.5 hours|
|480p (SD)||500 Kbps||2MB||8 Hours|
The above table is for heuristic estimation and reference only. There are a lot of other factors influence the actual video file size such as compression ratio, variable bitrate, color depth.
Bitrate = Frame size x Frames Rate
Although the original intent to write about video file size, read along if you would like to learn more about videos, overall. This guide purposefully hides complex details to simplify the understanding of most common terms and their usage. If you have any questions or suggestions, please reach out to our team.
A Glossary of Terms
Frame: Any static picture you see on your screen while playing or pausing a video is called a frame. They are consecutively presented in such a manner as things appear moving on the screen. That’s why video is also called moving pictures.
A frame behaves just like a photo, and all the attributes such as color depth and dimension. A 1080p or full HD video will have frames of size 1080×1920 pixels with each pixel storing RGB (Red, Green, Blue) 8-bit color data and maybe some more. The frames are presented usually at a constant rate called frame rate.
Frame Rate: The number of frames (frame rate) presented on screen per second is represented as with FPS or frames per second. A typical video can have 15 to 120 frames per second. 24 is used in movies and 30 FPS on common on TV.
The frame rate should not be used interchangeably with shutter speed. Shutter speed is an in-camera setting used to determine the amount of motion blur in film production.
More FPS means smoother playback but a bigger file.
The approximate size of each uncompressed frame is 5MB. At 30 frames per second, a raw HD video will need 5MBx30 = 150MB storage space per second. We are going to need around 540GB per hour for the raw footage. that’s a lot of disk space even today. Many of our storage drives can’t even write to a disk that fast. However, you usually won’t need that much space, thanks to compression and lossy encoding (quality compromise to save disk space) techniques.
Compression reduces the space required to store similar frames that have fewer moving parts. Such as a landscape scene with little or no motion between frames. Since motion in scenes can drastically change in most videos, some encoders allow encoding at a variable bit rate by consuming more than average when needed and less when the scene is mostly static.
Encoding: Encoding is the process of digitization of analog video streams. Just like getting an electric wire feed from the camera and storing the content in a .mov file. The process may happen in hardware or software. Many digital cameras encode video natively, without needing to have any additional software post-processing and requiring less storage space.
The conversion between different file formats is called transcoding. These terms have different meanings but are used interchangeably since digital cameras have greatly eliminated the need for encoding these days.
Codec: Codec is the program that is responsible for the encoding and compression of the video and audio tracks. A lossless raw encoder may not compress the data hence need a lot of storage space to store every bit of the video feed. A lossy codec such as H.264 could store the same video on a fraction of filesize. Different codecs are used to achieve a balance between quality and storage space.
H.264 aka AVC (Advanced Video Coding) by the MPEG group is internets current popular codec. This codec is widely supported by most mobile devices, web browsers, and operating system vendors thankfully requiring many different formats for playback like the old days.
Mp3 by MPEG group and AAC (Advanced Audio Coding) by Apple are the most popular audio codec on the internet. Since the mp3 patents have expired AAC is being recommended.
A newer video codec H.265 aka High-Efficiency Video Coding or HEVC is now available as the successor of the H.264 codec. H.256 provides better compression and faster decompression. This codec is being promoted for use by video pioneers such as Netflix and Youtube to improve the streaming video quality and experience, especially on slower connections.
Containers: Often called file formats such as MP4, MOV, AVI, WMV, MKV, and WebM. There are a lot of different container formats. MP4 is very popular on the web and WebM is an open container format being actively promoted by Google for royalty-free internet use.
The container is a file format that describes how the tracks (video/audio/subtitles) stored inside the file. The file format is just a matter of choice often used along with well-known codecs that work together. Some containers allow streaming video playback while others require the file to be downloaded entirely before playback. Since these container formats support different feature sets and require some agreement and royalty payment by the manufacturer, vendors tend to prefer one format over another.
If you like to learn more here is a detailed comparison on Wikipedia.
MP4: MP4 (MPEG-4 Part 14) is a well-known internet container/file format that is supported by a wide range of devices such as mobile phones and digital cameras. This container allows storage of multiple video, audio, subtitles, and other metadata, where containers such as mp3 container only allowed audio tracks and a limited set of metadata inside it. A variant of this format supports progressive streaming, this is the most preferred format for internet video playback.
Above are the main factors used for determining the file size.
HDR: High dynamic range. Modern TVs and cameras are able to capture greater details of images and video in senses that contain brighter and dark objects. In traditional SDR (Standard dynamic range) images were either bright or dark depending on the contrast application. HDR format can, however, capture more information per pixel (32 bits) and let the display decide the actual contract at the time of presentation. This method requires double the amount of storage file size and some advanced compression technique that can impact the final file size when applied.
Audio: Some containers allow multiple audio tracks embedded in the video files. Hence the size of the video depends on no of tracks and bitrate of the audio as well. 192Kbps bitrate is considered good quality audio for stereo sound.
Encryption: Video security mechanisms such as DRM (Digital Rights Management) that use encryption to protect playback of the content on authorized devices. For example, Netflix only allows you to play their video only if you have an active membership. This is often done to implement licensing and prevent piracy. This protection usually increases the file size due to metadata inclusion.
Video streaming: Video streaming is a process of watching a video over a network without having to download the entire video file. This technique often begins by buffering (downloading some metadata and the portion of video currently being watched) parts of the video and provides seeking and skipping parts that are not being watched. Streaming provides smoother watching experience and requires less network bandwidth and disk storage.
There are many methods available on the web to implement streaming.