Remember that frustrating time you watched a video or streamed a live event, and it freezes up, or its quality was reduced from what it previously was?
Now it’s possible to stream or play high-quality videos faster using either the H.264 or H.265 video codec. This post will try to answer which one of these video compression standards is better and why. To do that, we must first understand what a codec is and how it operates.
Codec stands for compressor-decompressor. It’s a compression technology with two essential components: an encoder for compressing files and a decoder to decompress them.
It converts the light and sound from your camera into a digital format that a machine can understand (compression). Computers then read it and play it back to us in the same format as when it was recorded (decompression)
Some of the codecs for video include VP9, MPEG2, Cinepak, H.264, and H.265. Aside from videos, codecs are also used in other files such as audio (AAC, MP3) and still images (PNG, GIF, JPEG), and data (PKZIP).
Before we delve into the more technical stuff of comparing these two video codec, let’s first look at them individually.
”Compressor settings HD 1280x720” (CC BY 2.0) by kentbye
Advanced Video Codec (AVC) or H.264 is the current encoding standard for streaming videos. It works great for HD streaming, but if you want to watch content in 4K quality, you may need a better encoding format.
H.264 works by processing video frames using macroblocks. These macroblocks are usually made of 16 x 16-pixel samples divided into transform blocks and subdivided into prediction blocks. This format can significantly lower bitrates which makes streaming faster. Youtube, iTunes, and Vimeo are just some of the platforms that use AVC.
Pros
Cons
High-Efficiency Video Codec (HEVC) or H.265 is an efficient video compressing method that works best for Livestream and online videos. The key benefit of HEVC is that it uses less bandwidth to stream videos, and the video quality is higher due to its advanced compression.
Unlike H.264, the newer H.265 processes information using coding tree units composed of macroblocks spanning 4 x 4 to 64 x 64-pixel blocks. This format allows the codec to compress video information more efficiently and with better spatial prediction and motion compensation.
While HEVC allows for a faster live stream, it does necessitate more specialized hardware to compress the data. To decompress the data and watch high-quality streams, devices that are h.265 compliant would need less bandwidth and processing power.
”1080p HEVC playback h265 on MP-Classic-H” (CC BY-SA 2.0) by Giulio Jiang
Pros
Cons
”1920x1080p30 stream” (CC BY-NC 2.0) by csete
Both video codecs are exceptionally excellent at compressing and decompressing video. However, H.265 is better than H.264 for several reasons.
H.265 uses parallel processing computing methods and supports specialized extensions like FMA3/FMA4 and AVX/AVX2 to fast-track the whole process. Specific rectangular regions that separate the image are self-contained and enable parallel processing.
The intraframe prediction feature in H.265 is much more detailed than that of H.264, allowing for 33 directions of motion versus nine in H.264.Moreover, H.265 utilizes a decision tree called Wavefront Parallel Processing (WPP), which helps more productive compression.
However, the adoption of H.265 as the universal standard codec is relatively slow because very little hardware can integrate it. Many content providers also have stuck with H.264 because it will always play compared to H.265.
While H.265 is not as common as H.264, the former is rapidly gaining more market share. For example, Apple’s new operating system for the iPad and iPhone, the iOS 11, will use H.265. The latest MacBook Pro also runs using the Kaby-Lake processors, which can decode the H.265 codec. Apple also plans to use it on the Safari web browser and their tvOS for streaming video.
Netflix (4K), iTunes Movie (4K), Amazon Prime, Vimeo, and Disney+ use H.265. Furthermore, mirrorless cameras such as the Canon R5 and Panasonic S1 all use the latest codec.
IP security cameras also greatly benefit from the efficiency of H.265 and are adopting them. However, playing video in browsers and mobile devices remains problematic.
Thanks to its greater efficiency and performance, H.265 is likely to dominate the marketplace in the next few years. But that’s just our opinion.
What do you think will be the future of video codec? Tell us your thoughts by writing a comment below.
Got you interested in things about videos? Read ”What is Raw Footage and Why is it Useful?” to learn more.
Legal Stuff