Now that both macOS (High Sierra release) and Adobe Media Encoder (2018 update) support the new HEVC codec, I thought I’d compare compressing video using H.264 to HEVC, which is often called “H.265.”
NOTE: Here’s an article I wrote a few months ago that describes the HEVC codec in more detail.
This is not an in-depth rigorous test, but a look at some typical compression workflows with a look at the differences between the two codecs.
NOTE: When I was looking for footage to test, I discovered that all my high-quality footage (ProRes, R3D, RAW) was shot on a tripod, while all my hand-held footage was H.264. Compression speeds and final image quality may vary depending upon the exact technical configuration of the source file; however that won’t change the process in general.
HEVC is supported in macOS High Sierra (10.13). However, not all applications that run in this environment will play HEVC.
For example, QuickTime Player X plays HEVC perfectly. However, QuickTime Player 7 won’t open the file. If you use QT 7 for media management you won’t be able to use HEVC. And, no, Apple won’t be updating QuickTime Player 7. (Sigh… QuickTime Player 7 was just SO useful!)
Also, on a Mac, HEVC files have the same extension as H.264 files: .MP4. So you can’t tell these two codecs apart using the file extension.
IMAGE QUALITY vs. FILE SIZE
The BIG benefit to using HEVC to compress (encode) your video is that it shrinks file sizes about 50% for the same image quality.
There are six factors that determine image quality in any compressed file:
The only real “lever” we have to control during compression is the bit rate, also called “data rate.” This is the number of bits per second that are allocated to playing back the file.
Assuming a source file with good image quality, the bit rate needs to increase as:
However, the higher the bit rate, the larger the file size. So, we are always looking to balance the best possible image quality with the lowest possible bit rate. There is no single perfect answer, every movie is different.
For example, files downloaded to a computer can be quite large simply because of the vast storage that most computers have available. However, the same file downloaded to a mobile device could totally fill the device’s storage. Here, the smaller the file size, the better.
FIRST TEST – IDENTICAL BIT RATES
Here’s our source file, a 0:13 handheld dance shot. (H.264, 1280 x 720, 29.97 fps)
(Footage courtesy: Amy Campion, Antics Performance – www.anticsperformance.com)
Here’s a still from the compressed H.264 version. (H.264, 1280 x 720, 29.97 fps)
Here are the settings I used for the H.264 version:
Essentially, this image looks the same as the original – given the fact they both started out as H.264 and the same frame size, that’s not surprising. I didn’t see any artifacts, even though there was a lot of movement in the frame.
Moving to HEVC, we can select the level of image quality we want. However, as image quality improves, compression time increases dramatically.
This 13-second clip took:
Only you can decide which quality option to pick, based on your deadline and requirements. However, for anything going to YouTube or other social media, a setting of Good seems to me to sufficient.
Also, to the best of my understanding, HEVC is not hardware-accelerated in Adobe Media Encoder.
NOTE: However, compression speeds do improve with faster CPUs. So, if you are buying a system specifically for video compression, a faster CPU will save you time.
Here’s a still from the compressed HEVC version, Good quality on top and Highest quality on the bottom. While I didn’t put this under a video scope, I could not see any image differences either during playback or paused. Neither version exhibited any artifacts during playback. Both were compressed with a 2 Mbps variable data rate.
NOTE: I suspect the Higher or Highest quality settings may make a difference as resolution increases, bit rate decreases or with HDR material. For the web, though, I’d still stick with Good quality for now.
Here are the settings I used for the HEVC version – except that I varied the Quality setting:
First, the image quality looked the same as the original. Again, this is not surprising because we used the same bit rate as H.264 and the frame size, itself, wasn’t that big.
Three take-aways so for:
SECOND TEST – DIFFERENT BIT RATES
Here’s the same movie compressed using HEVC at half the bit rate – 1 mbps – and at the Good quality setting.
To my eye, the blacks were a bit elevated and the colors were a little washed out compared to the original movie. But, amazingly, there were no artifacts – even though both the dancer and camera were moving throughout the shot.
I was surprised and impressed!
Here is the same frame from all three movies. The original is on the right, 2 mbps H.265 in the middle and 1 mbps H.265 on the left.
With both H.265 images:
Based I what I see here, the higher the bit rate, the fewer changes I would expect to gray-scale and chroma levels, as well as more detail in the final image. Given what I see here, I’m losing a bit too much detail in the image at 1 mbps.
For now, if you are compressing using HEVC, I would recommend a bit rate setting of 60% of the rate you use for compressing H.264 movies. This should yield comparable image quality, with a 40% decrease in file size.
Every movie is different, but this bit rate seems a good place to start. From here, experiment with different settings as your deadline allows to get the best balance between image quality and file size.
NOTE: Try really, REALLY hard to avoid compressing a compressed file. This will almost always look bad. Instead, compress your HEVC file from the high-quality master file.
Keep in mind that the principle reason for using HEVC is to decrease the file size of the compressed file. Not all applications currently support HEVC (H.265) and, for the next several months, anything going to social media should be H.264.
While all iOS devices now are using HEVC when recording video files, this codec is primarily designed for distribution, rather than acquisition. The loss of chroma and altered grayscale information suggest this would not be the best format to use for capturing green screen masters or high-quality HDR source material.
On the other hand, that wasn’t why this codec was designed. It was designed to take our finished movies and squeeze them into half the space of H.264. And, based on this initial look, it does an excellent job.
Final Cut Pro X 10.4
Edit smarter with Larry’s brand-new webinars, all available in our store.