What is video compression and what does it do?
Raw video files take up a lot of space, and it’s becoming increasingly apparent that processor power is escalating faster than storage capacity and even faster than network bandwidth. That’s why most video creators are pursuing efficient ways to reduce data size without sacrificing quality—and that’s where video compression comes in.
Here’s a guide to video compression and everything you need to know about it.
What is video compression?
Video compression is the process of reducing the number of bits needed to represent a video without compromising its visual quality. The purpose of compression is to make the video occupy less space than the original file and to facilitate its transmission over the Internet.
Here’s how it works.
Videos are compressed using codecs and video codecs are the compression component of video compression software. They’re algorithms that compile files by encoding the data they contain.
Codecs filter out additional data, such as frames of similar images, by grouping them into categories. As a result, they eliminate unwanted frames of data and encode the remaining data together, resulting in a loss of data bits and a reduction in file size.
Why compress videos?
File size is usually the primary concern of anyone compressing video content, since large files slow down easy uploads, file transfers, seamless online streaming, etc. This is because they demand more storage space and consume more bandwidth, which can be costly or restricted on a video hosting platform.
For example, a simple 1080 HD video clip can take up approximately 11 GB of space per minute of video. This varies slightly depending on the frame, but it’s more space than anyone can afford for a 1-minute video. This cost makes video compression important.
Video compression optimizes storage capacity demand as well as file transfer and transmission speed. This facilitates video uploads and sharing, allowing viewers to enjoy a seamless streaming experience.
iStock’s very own online video editor allows users to make their own videos using iStock’s large variety of stock videos that are fitting for any occasion. In addition to how easy to use the video editor is, users are able to download ready-to-upload videos with different sizes and orientations.
Check out our online video editor here.
Types of video compression
There are two types of video compression: lossless compression and lossy compression.
Let’s break down each type for a better understanding.
Lossy compression is the traditional and most commonly used type of compression for reducing file size. It’s the type of compression where the size of the original video file is reduced by removing parts of the original video deemed unnecessary. These parts can be anything, like repeated sounds and image sequences.
Note that the rendering quality remains relatively good due to video codecs.
For example, DVDs are compressed using the video codec MPEG-2. This codec reduces the file size considerably, sometimes up to 30 times smaller than the original file. Yet, the compressed DVD videos still appear in good sound and visual quality.
Here are scenarios where you can use lossy compression:
- You don’t mind the video rendering quality.
- Reducing the file size.
- Uploading it to a platform with limited storage and bandwidth.
- Your video hosting platform improves video rendering.
- You want to make the file lighter for faster transfer.
Note that lossy compression will sometimes result in a glaring drop in quality, as it can cause a lot of video information to be lost.
With iStock’s videos, we provide high-resolution videos for users to download or use in our video editor. This ensures you’re getting the best quality possible without risking the loss of video information.
Check out some of our stock videos here.
As the name suggests, lossless compression compresses the video file with no loss of information or quality (visual image or audio) whatsoever. This technique is undoubtedly the best for preserving the quality of your videos while reducing their overall size.
The catch, however, is that it results in a compressed file of almost the same size as the original file.
Also, it has a limited scope and doesn’t compress data to the same degree as lossy techniques. But if you don’t mind the file size, it’s the best compression technique because it gives you better and purer video quality.
Here are potential situations where you can use lossless compression:
- You want to play the video on another device that doesn’t support its current format.
- You want to upload it to a video platform with a specific file format requirement without losing its quality.
- You want to transfer the video file from one hard drive to another without losing its quality.
How does video compression affect a file?
Here is how video compression affects your files.
Video bit rate refers to the number of bits processed in a video sequence over time and is expressed in bits per second (bps), kilobits per second (Kbps), or megabits per second (Mbps).
Video compression is about minimizing the number of bits needed to represent a video sequence, meaning the first thing affected during a video compression is the bit rate.
By compressing the video file, the compression software reduces the number of bits per time frame by eliminating unnecessary bits of information.
The final visual quality of a video depends on the type of compression. While both lossy and lossless video compressions are meant to improve your video without hurting its quality, lossy compressions generally result in lesser video quality. This is because of the reduction of the overall file size. But again, most visual quality drops are unseeable to the naked eye.
Video compression implies that an uncompressed video file contains much more data than is necessary to process it properly. Therefore, video compression seeks to achieve an optimal compromise between data reduction and quality.
Advantages of video compression
It’s always better to keep file sizes to their possible minimum, but there’s more to video compression than that. Here are the main benefits of video compression.
Requires less storage space
Compressing video files makes them smaller and lighter in size. For example, video codecs such as H.264/AVC and H.265/HEVC can reduce an original raw video data by as much as 1,000 times. This means that terabytes or gigabytes of raw video content can be compressed into megabytes.
Faster file reading/writing
As the videos are smaller in size and require lower bandwidth, video hosting platforms can easily and efficiently process them (i.e., convenient uploads plus faster and smoother transmissions). This prevents the video from taking ages to play or crashing during playback. As such, even users with poor internet connections get to enjoy trouble-free video quality and viewing experience.
Faster file transfer
The smaller the file size, the faster the transfer.
Let’s assume that your device’s file transfer speed is a steady 100 Mbps. With that in mind, transferring 500 GB of raw video data from one hard drive to another would take approximately an hour and a half.
Now, suppose the used compression codecs made the files 5 times smaller than the original size—that is, 100 GB. This means that the transfer will now take 18 minutes to complete instead of 90 minutes.
Disadvantages of video compression
Video compression is not a foolproof process. Here are some of the possible disadvantages of video compression.
Video resolution is the level of detail in your video (i.e., the sharpness and accuracy of every detail in the video.) The level of these details decreases as compression occurs—reducing the overall quality.
Keep in mind that only lossy compression results in resolution drops. Lossless compression doesn’t compromise any of the details of the video and restores it in all its forms.
Extra resources needed to compress/decompress
Video compression is too expensive in terms of power consumption and time. Think about hours and days of video footage. The problem is that compressing video data of this size always involves a lot of data movement between compute and storage, which results in additional resources.
Video compression codecs and formats
There’s a huge misconception around video compression concepts where people confuse video compression formats with video codec formats. Let’s clear this up.
Video codecs, as aforementioned, are the compressing elements in video compression tools. Codec stands for coder and decoder (co-dec). The different algorithms as per chosen codec format, encode for compression (code and compress.) They can also decompress videos for playback by decoding them (decode and decompress).
Here are the main video codec formats.
- H.264 (AVC)
- H.265 (HEVC)
- H.266 (VVC)
After encoding (or decoding), the video sequences are grouped into components: images frames, audio codecs, subtitles, and all video metadata. The processed components must now be packaged into a video container or wrapper (i.e., a video file format). This is what makes it possible to output the final compressed video for playback.
Here are some examples of video file formats.
While different video file formats may support the same codec format, not all video file formats are supported by video devices or platforms. Some videos may playback on a MAC device but fail on a Windows PC, or play on one platform but fail on another.
This means that users can decide how they want the video to be compressed by choosing the appropriate codec format and decide how they want their videos to be played by choosing the appropriate container format.
Video compression FAQs
Do I have to compress a video in order to share it?
In most cases, yes. For example, email platforms like Outlook and Gmail limit the size of videos to a maximum of 25 MB. At the same time, Facebook limits to 10 GB, Instagram to 4 GB, and TikTok to 500 MB. You need to make sure your video size complies with platform regulations.
How do video compression tools work?
Video compression tools work by using video encoding algorithms known as codecs. Codecs, by encoding video sequences, reduce the number of bits needed to represent a video. After encoding, the video sequences are wrapped in video containers (such as MP4 and AVI) and then output as compressed videos.
What container file format is best for posting videos online?
For the format of a video for the web, we recommend the MP4 container. With this format, you will be able to upload your videos on any platform from Facebook, Instagram, Twitter, to YouTube.