An uncompressed video would eat up an enormous amount of storage space. A minute of high-definition video would take around 15GB of storage space, while a two-hour movie would take approximately 1.8TB. Transmission of these videos would consume a large amount of bandwidth and take a ridiculously long time to finish. This is where the video codec comes into play. A video codec (encoder/decoder) is software or hardware that compresses videos for storage and playback. The video codec encodes video information before storage or network transmission and decodes the information during playback or after transmission. Within the codec is a compression engine that compresses the information to reduce the size and, in effect, the network bandwidth consumed during transmission.
A video codec can either be lossless or lossy, the latter being used more frequently. Lossless codecs decompress a file with 100% of the original information retained, like color depth, pixels, and frames. On the other hand, lossy codecs lose some of the information of the original file after decompression resulting in reduced file size. Despite this, many organizations still prefer the lossy kind because of its much smaller sizes compared to lossless codecs. Besides, whatever information is lost during decompression will be unnoticeable to the naked eyes of the viewers. The advantage of lossless codecs is for those who need to work on or adjust to the file since the original information is still intact.
Several video codecs are available like AV1, MPEG-1, MP4V-ES but the most popular and widely used is the H.264. However, many believe that the newer H.265 will put H.264 into oblivion. Let’s delve into these codecs and see if H.265 can topple H.264 from its spot as the most widely used video codec.
H.264, also known as MPEG-4 AVC (Advanced Video Coding) or simply AVC, is a video codec used to record, compress, and distribute high-definition videos at a lower bitrate, smaller file size, and better quality than its predecessors. H.264 has been used in many different platforms since its introduction in 2003, including Blu-ray DVDs, HDTVs, and online video streaming such as Youtube, Netflix, and Hulu. H.264 is also a versatile video codec supporting up to 8k resolution and allowing you to stream a video from one encoder to multiple decoders simultaneously. With the growing use of high-definition videos, H.264’s goal is to provide good quality videos at a smaller file size to save storage space and network bandwidth. After numerous updates and 27 versions, H.264 successfully achieved its goal. H.264 remains to be the most popular video compression software today. It has become an industry-standard video codec covering many applications from security surveillance, energy sector, education, medical, outside broadcast, and drone video recording for transportation and surveillance.
H.264 generally falls under the lossy kind of codec, but it’s also possible to create lossless H.264 to be utilized in different use cases.
H.265 or HEVC (High-Efficiency Video Coding) is a video codec more efficient than H.264 in terms of compressing ultra-high-definition videos at lower file size. H.265 uses just half of the bitrate of H.264 but produces the same or an even better video quality than H.264. H.265 uses the CTU (Coding Tree Units) technique where the information of the original pixels from the previous frame is divided into blocks of different sizes, from 4×4 to 64×64. H.264 also divides the pixels in blocks but can only divide up to 16×16. With larger blocks, H.265 can cover larger areas compared to previous and current frames. Only new information from the current frame is processed, resulting in smaller file size. H.265 also has an improved segmentation algorithm and movement tracking over H.264. Like H.264, H.265 is a lossy codec, but it’s also possible to create lossless versions for different use cases.
Standardized in 2013, H.265 was initially developed for the broadcast industry. However, its ability to handle the demands of high-definition videos and high-resolution imaging formats such as 4K and 8K at a significantly smaller file size than H.264 made it popular in several other industries as well. H.265 cuts the storage space and network bandwidth of H.264 by ~50% resulting in a lower infrastructure cost.
H.265’s efficiency, however, comes at a price. The newer codec requires approximately ten times the computing power of H.264. That said, the processing time for compressing a video will take longer than H.264. In addition, H.265 equipment is more expensive than the existing H.264 systems.
Despite H.265’s drawbacks, many organizations have already transitioned to H.265 as the cost that can be saved in reduced storage and network bandwidth will offset the equipment cost in the long run.
H.264 vs. H.265
H.264 is still the most popular video codec today. The video files produced by H264 are still considerably lightweight, and it requires lesser computing power than H.265. Not to mention that there’s already a wide range of H.264-enabled devices in its almost two-decade run. On the other hand, H.265 handles high-resolution videos more efficiently than H.264, saving approximately 50% of storage space and network bandwidth. Although H.265 systems are more expensive than H.264’s, the cost that will be saved in storage and network bandwidth will be worth it down the road. As the popularity of H.265 continues to grow, a huge price drop on H.265-devices is expected, and it will come as no surprise if it takes over H.264’s spot. However, since H.265 devices currently fall on the expensive side and the computing power requirements are still high, it will take some time before that will happen.