When you are creating video content, it’s easy to overlook the importance of choosing the right compression method. If you’re starting out, you might just think that you can save the video and everything will work out. Compression plays such an important part of your final video that you need to take the time to understand at least the basics so that you can make an informed decision. Not all compression methods are created equal, and you may find that one method works better for you than another.
While the full ins and outs of compression are complex (and more than any single article can go over), we are here to give you an overview and help you get a grasp on video compression.
Why Compress Video?
Wouldn’t it be simpler if we didn’t have to worry about compression at all and just have video? Theoretically, yes that would be simpler. Unfortunately in practice it would end up being more complicated and make many of the ways we use video impossible, simply because of the sheer size of video content. In order for digital video to be feasible, there had to be a way to make file sizes smaller, so compression algorithms were developed.
Video Compression Uses
You may be wondering why you’d want to compress your videos to begin with. Many platforms (including social media) will require you to compress your videos before you upload them. See below for more video compression uses.
What Is Video Compression?
Video compression is performed via something called a codec, named for its purpose of compressing and decompressing video. In short, it analyzes the video to figure out ways that it can cut out data without affecting the final playback results.
The algorithms used in codecs are extremely complex, but for a simple example of how they work, imagine that you took a video of a person standing in front of a solid white background. Instead of keeping the data for every pixel that will ultimately be white, a codec might identify the region of video that doesn’t have the subject in it and tell the video player to fill any pixels in that region with white. Or if you have areas in your video that don’t change for a period of time, the codec might record those areas and say to keep the same signal for a certain amount of time.
How efficiently codecs work depends on the algorithms for that specific codec, and there are often compromises made between how much a codec can reduce the size of the video file and the quality of the video. The more of the original video data gets stripped, the more likely it is that the video will be degraded.
However, codecs build on the algorithms used before, and as computing power grows, codecs become increasingly efficient. Newer codecs are able to reduce file size more before the video loses quality than older codecs could achieve.
There are a large number of codecs currently available to use. While newer codecs do offer better compression with higher video quality, not every codec is compatible with every file format or video player. If a newer codec isn’t compatible with a popular video player, it can take time for it to gain enough popularity to gain widespread adoption.
Currently, some of the more popular codecs include H.264, MPEG-4, and DivX, with the newer H.265 rapidly becoming a widespread solution thanks to the needs inherent for 4K video. Even with the popularity of those codecs, more are constantly being developed with at least three more set to be released in 2020.
File Formats: Codecs and Containers
One point of confusion when it comes to video compression is the relationship (and separation) between codecs and file formats.
In short, file formats are made of two parts, the codec and the container. The container, which the file format is named after, is essentially a bundle containing not just the video codec, but also the audio stream, subtitles, metadata, and more elements that combine to make the final video.
Different containers are compatible with different sets of codecs. Just because your file is in one format doesn’t necessarily guarantee which codec was used. For example, an .MP4 file might contain video with the H.264 or the MPEG-4 codec. When you create your final video file, make sure you are paying attention to both the container and the codec.
What Codec Should I Use?
With all of this in mind, what codec should you use? Ultimately this comes down to how you’re going to be sharing that video. DVDs and Blu-Ray discs have specific codecs that are compatible with disc readers. If you’re playing it directly from a computer drive, you might choose a codec with less compression and higher video quality.
A huge number of people are sharing and consuming video via online channels such as YouTube and Facebook. For online use, .mp4 containers with H.264 is perhaps the most commonly used file format thanks to high quality, relatively small file size and almost universal compatibility.
Video Compression Formats
Wondering which video compression format is best for your project? Check out this chart of the most common video compression formats.
Compression and Bitrates
In this discussion of video compression, one area that hasn’t been addressed yet is the bitrate of your video.
What is Bitrate?
Bitrate is simply a measurement of how much data is being transferred each second for a video. It is measured in megabits per second (Mbps). Generally speaking, the higher the bitrate, the more information that is being transmitted and the higher the quality of that video will be.
That being said, bitrates are highly dependent on the efficiency of the codec being used to compress the video. Different bitrates from the same codec will result in different video quality output, but newer and more efficient codecs can lower the bitrate without losing quality.
What Bitrate To Use
Because bitrates are dependent on the data being transmitted, the final bitrate will depend not just on the codec and encoding settings, but also resolution, frame rate, high vs standard dynamic range, and other characteristics of the video.
Again, bitrate should be judged by how you’re presenting the video. If you’re streaming online, you want to consider the internet connection speed of your audience and, if live streaming, your upload speed. As a general rule of thumb, for Full HD videos streamed online, expect your bitrate to be somewhere in the range of 5-10mbps. The higher the bandwidth, the higher you can set your bitrate. Ideally you’ll want upload speeds of 5+ Mbps. There are a number of bitrate calculators online.
Video is becoming ubiquitous. In order for video to be managed, compression is essential. While it can be easy to overlook compression methods when creating video, you need to at least know the basics in order to choose the best settings when encoding your video.Tags: Codecs vs File Formats, How to Choose a Codec, How to Edit Video, What Bitrates to Use Last modified: July 9, 2020