0% found this document useful (0 votes)
429 views

Guide To HEVC - H.265 Encoding and Playback - TechSpot1

The document provides information about HEVC/H.265, a video compression standard that offers roughly double the compression ratio of the widely used H.264 standard. HEVC is not as compatible with existing devices as H.264, as hardware support for HEVC decoding is still limited, but software decoding is possible on many devices. While HEVC requires more processing power during playback than H.264, benchmarks showed minimal performance impacts on recent hardware.

Uploaded by

Victor Bulgar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
429 views

Guide To HEVC - H.265 Encoding and Playback - TechSpot1

The document provides information about HEVC/H.265, a video compression standard that offers roughly double the compression ratio of the widely used H.264 standard. HEVC is not as compatible with existing devices as H.264, as hardware support for HEVC decoding is still limited, but software decoding is possible on many devices. While HEVC requires more processing power during playback than H.264, benchmarks showed minimal performance impacts on recent hardware.

Uploaded by

Victor Bulgar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Guide to HEVC/H.

265 Encoding and Playback

For years, H.264 has been the go-to video compression standard. Whenever you
download a film or TV show, watch a Blu-ray, view HDTV broadcasts, or stream
something from various sites and services, there’s a very good chance the video
stream you’re watching has been encoded with H.264.

H.264 is a great compression standard for a number of reasons. It provides very good
quality at relatively low bitrates, and its widespread use means it’s supported by
essentially every video playback device made in the past five to ten years. It’s also very
versatile, not only allowing compression to small file sizes, but also to high quality, high
bitrate files that are suitable for use on Blu-ray discs.

While H.264 is doing a pretty good job of delivering compressed videos to users,
there’s a better standard out there that offers similar quality at even smaller file sizes.
The standard is called HEVC, or High Efficiency Video Codec, and it first appeared in
2013 as a true successor to H.264. For this reason, HEVC is also known as H.265, or
MPEG-H Part 2.

HEVC’s main advantage over H.264 is that it offers roughly double the compression
ratio for the same quality. This means that a video file encoded with HEVC can occupy
half the space of its H.264 equivalent with no noticeable change in quality, or the same
amount of space with improved quality. Sounds pretty good, right?

HEVC is able to compress files to a greater extent than before by evolving upon the
H.264 standard. In both of these standards, motion compensated prediction is used to
find areas that are redundant within a single frame or in the frames that follow. When
redundant blocks of pixels are identified, they are encoded by referencing another area
in the same or following frames. In H.264, these blocks can be up to 16x16 pixels in
size, but big gains in compression were made by increasing this to 64x64 in HEVC.

Other improvements also help HEVC achieve greater levels of compression, including
better variable-block-size segmentation, improved deblocking and motion
compensation filters, sample adaptive offset filtering, and better motion vector
prediction and precision. This page here from the x265 group has a great explanation
of these terms and how it can improve HEVC’s efficiency.

As HEVC is relatively new to the scene, it’s not nearly as compatible with existing
playback devices as H.264. Many such devices have dedicated hardware for decoding
H.264 streams, while equivalent hardware for decoding HEVC is significantly less
common. That’s not to say it’s impossible to decode HEVC on today’s devices –
software playback is still possible on a wide variety of hardware, and some hardware
decoding solutions exist – but something that can play H.264 is not necessarily HEVC-
compatible.

Here’s a quick rundown of well-known hardware that includes dedicated HEVC


decoding blocks, which definitely support efficient HEVC playback:

Intel 6th-generation ‘Skylake’ Core processors or newer


AMD 6th-generation ‘Carizzo’ APUs or newer
AMD ‘Fiji’ GPUs (Radeon R9 Fury/Fury X/Nano) or newer
Nvidia GM206 GPUs (GeForce GTX 960/950) or newer
Other Nvidia GeForce GTX 900 series GPUs have partial HEVC hardware
decoding support
Qualcomm Snapdragon 805/615/410/208 SoCs or newer. Support ranges from
720p decoding on low-end parts to 4K playback on high-end parts.
Nvidia Tegra X1 SoCs or newer
Samsung Exynos 5 Octa 5430 SoCs or newer
Apple A8 SoCs or newer
Some MediaTek SoCs from mid-2014 onwards

As you can see, most desktop hardware released in 2015, and most mobile hardware
from late 2014 onwards, supports dedicated HEVC playback. Hardware designers have
been more focused on getting HEVC decoding blocks into mobile hardware first, as the
CPUs in these products typically aren’t fast enough for software decoding. Support in
desktop hardware has been marginally slower as most desktop-class parts are
powerful enough to decode HEVC without dedicated decoding blocks.

If you have a computer or device that doesn’t include the aforementioned hardware,
that doesn’t mean you won’t be able to decode HEVC. PCs, even those with entry-level
CPUs from several years ago, shouldn’t have much trouble software decoding HEVC
videos. One of my HTPCs equipped with a $50 Intel Celeron ‘Ivy Bridge’ CPU from
2012 is more than capable of decoding HEVC, and I’ve even achieved smooth playback
on Intel Bay Trail and Qualcomm Snapdragon 801 devices in some circumstances
(albeit at high CPU utilization).

As a general rule of thumb, if you have an older PC you’d describe as “very slow” it
probably won’t be capable of HEVC playback. Anything else will probably suffice.

Where you won’t find HEVC playback support is in many dedicated media players on
the market today. These products either don’t support HEVC hardware decoding, have
too low power SoCs to support smooth software playback, or only support a small
handful of popular video formats without the ability to run wide format playback
software like VLC.
Here’s a quick rundown of popular media playing devices that don’t support HEVC:

Google’s Chromecast (first and second generations)


Apple TV (although some reports suggest 1080p HEVC playback is possible by
running VLC on a 4th-gen model)
Roku (third-gen models and earlier)
Amazon Fire TV (2014) and Fire TV Stick
Any Western Digital WD TV products
All PlayStation consoles
Xbox 360

And here are the media players that do support HEVC:

Roku 4
Amazon Fire TV (2015)
Xbox One

This isn’t an exhaustive list, but you can clearly see that there’s just a handful of very
recent devices that support native HEVC playback. The Xbox One is the only console
to support playback, although support for HEVC was added through a software
update, presumably utilizing software decoding.

So while the benefits of HEVC encoding are clear, playback is essentially restricted to
PCs, high-end smartphones and tablets, and a very small range of media players and
consoles. At this point in time, compatibility is a disadvantage to encoding your media
library in HEVC.
As for software that can playback HEVC-encoded files, there are many options out
there. On Windows 10, you can natively play HEVC videos in the default Films & TV app
or through Windows Media Player. Alternatively, you can use VLC or MPC-HC for
playback, which support older operating systems, or popular media center apps like
XBMC/Kodi (version 14 onwards) and Plex Media Player (not Home Theater).

If you’re running Mac OS X or iOS, VLC is your best bet. On Android devices, you’ll be
able to play back HEVC files using MX Player through software decoding if your device
is fast enough, or if it (and the version of Android) supports native HEVC playback.
Note that some devices have HEVC decoding blocks in their SoCs but don’t support
native playback at this time.

HEVC Versus H.264 Playback Performance

For devices that can decode HEVC video, performance is a concern. As HEVC
compresses video streams to a greater extent than H.264, it requires more processing
power to decompress; a pretty typical trade off when it comes to compression
algorithms.

The difference in hardware utilization is particularly significant when comparing HEVC


software playback to H.264 hardware-accelerated playback. This is a situation that will
be common to most current-generation devices, as H.264 hardware decoding is very
common, whereas we’re only starting to see HEVC hardware decoders on the market.

For mobile devices, HEVC’s greater hit on performance naturally leads to a greater hit
on battery life. Again, this is a trade-off that users, at least for the next few years, will
have to consider when encoding or playing HEVC content. The standard may allow you
to view 4K streams while consuming less bandwidth, but your handset may run out of
juice earlier than expected.

To see just how HEVC and H.264 differ from a performance perspective during
playback, I ran some benchmarks on a collection of reasonably recent hardware.

Across the four PCs I tested both the HEVC and H.264 files on, typically there was only
a small performance hit when playing back the HEVC files. On an Ivy Bridge Intel Core
i5-3570 desktop, CPU utilization roughly doubled, but sat under 10 percent when
playing back HEVC files. There was a wider gap in utilization on our Broadwell-based
Dell XPS 13, although again utilization sat below 10 percent in both cases, with very
impressive results while decoding H.264.

The Skylake Dell XPS 13 is the only device tested here that has support for hardware
HEVC decoding. Unsurprisingly, this resulted in very low CPU utilization while decoding
HEVC, and even though utilization was noticeably higher than decoding H.264, it was
still low enough to not be of concern.

On a low-performance HTPC, built using an Intel ‘Ivy Bridge’ Celeron G1820, decoding
HEVC wasn’t particularly troublesome either, despite CPU utilization sitting in the 45 to
65 percent range. Even though this may sound quite high, I never experienced any
stuttering or decoding issues on this system.

I also recorded the median clock speeds that each processor sat at while decoding
both H.264 and HEVC. In most circumstances, there was only a small 100-200 MHz
jump in clock speed while decoding HEVC, which helps with power consumption.
Across the board, as CPU utilization was below 100%, the CPU never ran at its full
clock speed while decoding these files, which is a great result.

To start our battery life results, I’ve recorded figures from two smartphones that
support hardware HEVC decoding: the Snapdragon 810-powered Sony Xperia Z5, and
the Exynos 7420-powered Samsung Galaxy S6. While playing back the same Game of
Thrones video on both handsets, encoded in either H.264 or HEVC, there was
essentially no difference in battery life. This is a fantastic result, as it makes it much
easier to justify encoding files in a space-saving HEVC format.

On a laptop without HEVC hardware decoding, the Dell XPS 13 with Broadwell inside,
we saw a reduction in battery life of four hours. This is a pretty significant drop, and
highlights the importance of having hardware decoding support in your battery
powered devices. When moving up to a newer XPS 13 with Skylake inside, the
inclusion of hardware decoding again reduces the battery life gap to zero.

How to Encode HEVC: The Set-Up and Test Files

Now that we’ve looked at how to playback HEVC-encoded files, it’s time to create
them. There are a whole collection of tools and utilities that can encode HEVC, but in
this article I’m going to focus on those that are easiest to use and provide the best
quality options.

Throughout this section I’ll be looking at encoding two TV show episodes I ripped from
a Blu-ray earlier. If you want to learn how to rip Blu-rays, there are plenty of guides
around, and plenty of ways to do so. For this guide, however, I created two high-bitrate
H.264 files that are of excellent quality, essentially representing what you’d get from
the source material.

It should be noted here that if you rip a Blu-ray at original quality you will get a massive
file size as Blu-rays use high-bitrate media for the ultimate in quality. Whether you use
original quality or slightly compressed files really doesn’t matter, as encoding to lower
bitrate H.264 or HEVC will lead to a slight reduction in quality for either type of file. The
end result will usually be the same as well: a 10 GB Blu-ray source or a medium-bitrate
2.5 GB H.264 rip will both be compressed to 700 MB using the same HEVC settings,
for example.

What I wouldn’t recommend doing is ripping your Blu-rays to a low quality file before
re-encoding them to HEVC, as you can expect to lose even more quality in the
process. In general, you want a source quality file before compression to deliver the
best results, although most files you acquire through more dubious means should also
suffice.

A single, high-detail frame from The Big Bang Theory sample used for encoding test
purposes

The two files I’ll be using as examples in this guide are as follows:

Game of Thrones, Season 2, Episode 1: 1920 x 1080, approximately 5,000 kbps


H.264 with 1,500 kbps DTS 5.1 channel audio, encoded using x264
The Big Bang Theory, Season 8, Episode 11: 1920 x 1080, approximately 9,000
Kbps H.264 with 1,500 kbps DTS 5.1 channel audio, encoded using x264

The Game of Thrones file is of higher visual quality due to the way the show was filmed
and produced, with excellent detail, motion scenes, panning, and some dark
environments. It’s a very good test bed for a typical TV show or movie file. The Big
Bang Theory is of lesser visual quality despite its high bit rate, due to a differing
camera setup. It also has less movement and detail, representing many sitcom TV
shows that you may be wanting to encode.

This is a frame from the Game of Thrones test file

I also want to explain some terms before encoding these files:

MP4 and MKV are containers, which are used to house the video and audio
streams. In the case of MKV files, subtitles are also embedded in some
circumstances.
H.264 and HEVC are coding formats, and describe how to encode a video file
using the accompanying compression standard
x264 and x265 are encoding libraries, used to create H.264- and HEVC-encoded
videos respectively

Therefore, it’s correct to say that we’ll be creating MKV files which include HEVC video
streams encoded using x265.

For both H.264 and HEVC encoding using the CPU, we’ll be using Handbrake, and
you’ll need at least version 0.10.0 for x265 support. I’ve used version 0.10.3.0 64-bit for
this guide, which was the latest version at the time.

As a benchmark, I’ll be comparing encoded HEVC files to a compressed H.264 file


created using what I believe are settings that achieve a great balance between small
file size and quality. This includes using Handbrake’s constant quality setting at 23 RF
for 1080p files, strict anamorphic picture size, and the following collection of advanced
settings and filters. Note that to use the advanced settings, you’ll need to tick the
appropriate box in the videos tab

For all audio files, whether it’s encoding H.264 or HEVC, I’ll be compressing to 5.1
channel HE-AAC with a bitrate of 256 kbps. If you’re more of an audiophile or if you’re
encoding a movie, you might want to consider increasing the bitrate or using a
different codec, but I find these settings to be perfectly fine for most TV shows.

How to Encode HEVC: Handbrake Settings to Use

While I’ll be exploring other encoding options later in this article, this page will give you
step-by-step instructions on how to set Handbrake to encode small, high-quality
HEVC files.
Firstly, you’ll want to change the video codec under the Video tab from H.264 to
H.265 (x265).
Also, change the container from MP4 to MKV so that you can embed subtitles if
you want to.

Input the file you want to be transcoded by clicking the large Source button and
then File (clicking Folder allows you to easily set up batch encodes). Then set a
destination by browsing to whatever folder you desire.

Head to the Picture tab, and set Anamorphic mode to strict. Also check to make
sure the automatic cropping feature has detected the correct settings.
Sometimes it will erroneously crop out a few pixels on any side, but you can
address this by switching to custom with 0 set in every location box. If, however,
you have a 21:9 video encoded in 16:9, the cropping feature will automatically
crop out the black bars at the top and bottom.

In the Filters tab, you’ll only want to modify these settings where necessary,
leaving everything else ‘off’. If a TV show is interlaced, for example, it’s a good
idea to set Decomb to Fast as this will only deinterlace frames that are visibly
interlaced. If you want to remove noise or grain from a source, setting Denoise to
hqdn3d with a custom preset of 1:1:4:4 is a solid choice.

In the Video tab you’ll want to select some specific settings. Make sure framerate
is set to ‘same as source’ and that the ‘Use advanced video tab instead’ box is
unchecked.
Then, select an x265 preset of Medium by adjusting the slider down from the
default Ultrafast setting. On the next page I’ll explore how the x265 preset
determines encode times, file sizes and quality, but basically you want to leave it
on Medium for the best balance of encode time and file size. Setting it higher will
result in a larger file and faster encodes, and setting lower will reduce the file size
at the expense of significant longer encode times.
As for quality, set this to Constant Quality with a value of 23 for 1080p videos,
and slightly higher (22) for 720p videos. This is the slider you’ll want to
experiment with the most: adjusting it closer to 0 gives better quality and higher
bitrates, while moving it the other way has a negative effect on quality and
delivers smaller files. I find 23 to be a great balance between quality and file size,
although if you’re willing to put up with more compression artefacts,
experimenting with 25 or lower is a good idea. However, I wouldn’t go any lower
than 30 or any higher than 15 for the best results.

As I mentioned earlier, in the Audio tab you’ll want to change the codec to HE-
AAC (FDK), the bitrate to 256, and the mixdown to 5.1 channels. If your source
has only 2.0 channel audio, leaving the setting on 5.1 will still encode only 2.0
audio; in other words, it won’t transform a stereo source into surround sound
using any filters or magic. Here you might want to play with bitrates to whatever
you desire, although I think 256 delivers great quality for TV show audio.
Optional: Pass through any subtitles from your source by heading to the Subtitle
tab, clicking Add Track, then selecting Add All Remaining Tracks. From here you
can also “burn in” subtitles, which codes the text into the video stream so you
can see the subtitles on video players that don’t support in-file subtitles (though
you can’t turn off the subtitles). Setting subtitles to “forced only” tells a video
player to display subtitles even when the audio track matches your set language:
this is useful for displaying a subtitles when dialogue isn’t in English; for example,
during alien conversations in a sci-fi film.
Optional: Save these settings as a preset so you can revisit them easily in the
future.

Now you should be all good to go. Click Start and let the encode happen, which
may take a considerable amount of time depending on your hardware. After the
encode is done, text saying ‘finished’ will appear in the bottom left corner.

How to Encode HEVC: Utilizing Nvidia GPU Hardware Acceleration

If you happen to have a Maxwell-based Nvidia graphics card from the GeForce 900
series or later, you can utilize your GPU’s dedicated HEVC encoding block to transcode
videos into HEVC significantly faster than by using Handbrake. While only some 900
series GPUs feature a HEVC decoding block, all include HEVC encoders, which is
going to come in handy.

While performance is significantly improved by using Nvidia’s HEVC encoder, NVENC,


it comes at a cost of quality. Simply put, you’re not going to get as good a quality at the
same bitrates using Nvidia’s encoder compared to using Handbrake. You can check
out a comparison on the pages that follow, but essentially the quality of Nvidia HEVC
encodes is equivalent to a good H.264 encode, albeit with a much faster encode time.

Anyway, if you want to use NVENC to encode HEVC videos, you’ll need to download a
program called StaxRip. The version I used for this guide was x64 1.3.1.7 beta.

The interface for StaxRip is quite different to Handbrake. Firstly, you’ll want to
drag your source file into the Source box, click Automatic when the pop-up
appears, and then click okay. The program will then briefly demux the file to
prepare for encoding.
After that’s done, you’ll want to keep most of the settings at their default, making
sure to set the target file to wherever you want the new file saved.

One thing you will want to change is the encoder. Click on the x264 text and
change this to Nvidia H.265.

Then, click on Encoder Options under the Nvidia H.265 header, and change the
mode to CQP. Leave the other values at their defaults.

Optional: Instead of selection CQP as the mode, select VBR. Then go back to the
main StaxRip screen and change the video bitrate to whatever you feel is
appropriate. You’ll probably need a bitrate of at least 2,500 kbps to achieve good
quality for a 1080p file, in which case leaving the setting on CQP is a better
choice. However, if you want to experiment with bitrates rather than quality
selections, VBR is the mode for you.

After choosing CQP mode, or optionally VBR, return to the StaxRip main screen.
From there, click on the “Edit” text next to the audio box that by default should
say “AAC VBR 2.0 ~115 Kbps”. In this screen choose AC3 as a codec with 6
channels and a quality of 256 kbps. Also, uncheck the normalize box. Again, you
can play around with these settings to adjust the audio delivered with your video.
Click Next, then Start to begin the encode. Eventually it will complete itself and
notify you in the log screen that appears.

Let’s take a look at how the various encodes perform. Throughout the following
section, all encodes were made using Handbrake with the settings as mentioned, with
the exception of the Nvidia encodes, which were performed using StaxRip. My
personal rig was used for testing, which is equipped with a modest Intel Core i5-3570
quad-core CPU at 3.4 GHz, 16 GB of DDR3 memory, and an Nvidia GeForce GTX 980
Ti.

The following presets were tested:

H.264 Custom: Settings listed on Page 3, QF 23


H.264 Handbrake Deafult: x264 Very Fast, Main Profile, Level 4.0, QF 23
HEVC Medium: x265 Medium Preset, QF 23, default otherwise
HEVC Faster: x265 Faster Preset, QF 23, default otherwise
HEVC Medium: x265 Medium Preset, QF 23, default otherwise
HEVC Medium QF 15: x265 Medium Preset, QF 15, default otherwise
HEVC Slow: x265 Slow Preset, QF 23, default otherwise
Nvidia HEVC: CQP mode at default settings

For our Game of Thrones test file, there is a lot that can be deduced from the above
data. Firstly, the x265 Faster preset was significantly slower than the Ultrafast preset,
while actually delivering less compression. Secondly, the x265 Slow preset was
enormously slower than the Medium preset, while delivering a very similar file size. Of
course this says nothing about quality, which we will explore later, but purely based on
this data it’s very easy to remove the Faster and Slow presets from contention.

It's also plainly obvious that the Nvidia HEVC encoder is significantly faster than
anything else due to its hardware encoding advantage. It creates a slightly larger
HEVC-encoded file than Handbrake’s default H.264 settings in under half the time.
Also, looking at the Efficiency Score (final file size * encoding time) metric, which
essentially evaluates the compression efficiency in a lower-is-best fashion, it clearly
blows away the competition.

If you’re after the smallest file possible, HEVC Medium beats my custom, excellent-
quality H.264 settings in file size (it’s 56% smaller) with an encode that took 38%
longer. It’s also more efficient than the HEVC Slow preset, but falls behind the Ultrafast
preset, which delivers a 21% larger file in 63% less time.

The overall winner will still need to be determined by quality, but there are already
some clear winners: Nvidia’s HEVC encoder is the most efficient, and the HEVC
Medium preset does the best job of compression. For those without a current-gen
Nvidia GPU, the HEVC Ultrafast preset is looking good. From these results it’s hard to
see why you would bother encoding in H.264 unless you were more concerned about
compatibility than compression.

It’s a similar story looking at encodes of The Big Bang Theory. Nvidia’s HEVC encoder
created a decent file size in a very fast time of just four minutes, at a whopping 158.6
frames per second. Again, the Faster preset is slower and delivers less compression
than the Ultrafast preset, while Medium is looking like a solid bet for the smallest file
size.
Quality Comparison

Due to the amount of encodes I performed for this article, it’s hard to produce every
single relevant side-by-side comparison for this section. Instead, I’ve included what I
believe are the most relevant comparisons, and if you want to compare further, you can
download this archive of lossless, full-resolution screenshots comparing each encode.

You'll need to look closely to spot the differences in the frames below. As we're
looking at different forms of compression, the images generally look pretty similar,
except in fine details. Typically you can spot the better encode by looking for sharper
detail on faces and fabrics such as shirts; less blocking in blurred backgrounds or
other smooth gradient areas; and fewer artefacts.

The frames that follow are 1100 x 600 crops of the full 1920 x 1080 frame. They are
not downscaled in any way.

I’ll start by comparing the difference in quality between the default H.264 preset in
Handbrake (x264 Very Fast) and my custom settings. My custom preset delivers
significantly improved fine detail, less background blocking, and better clarity during
moving scenes. However, this isn’t a surprise as it uses a higher bitrate to achieve this
quality, producing slightly larger files.

It should be noted here that my custom H.264 preset comes the closest to the source
material of all the encodes I performed for this article. The source does have higher
quality throughout, though with a file size around three times larger.

Here you can see the difference between the two best presets in my opinion: x265
Medium and my custom H.264 preset. There is very little difference in visual quality,
with a slight advantage to H.264 in very fine detail and background clarity. When
playing back the video, the differences between the two are practically
indistinguishable.

This is a great result for HEVC, as it exhibits nearly identical quality in a file less than
half the size. Encoding times were increased by 45% on average to achieve this quality.

Interestingly, there is almost no visual difference between the Faster and Medium
HEVC presets. If anything, Medium is slightly better quality when displaying facial
detail, at a smaller bitrate.

And again, Medium isn’t any different to Slow when it comes to visual quality. For all
intents and purposes, these two presets are identical in quality, and with a very similar
file size and significantly slower encodes, the Slow preset isn’t worth using.

There is no point using Nvidia’s HEVC encoder for low bitrate encodes: the quality is
horrible in comparison to an x265 Medium encode, with reduced detail across the
entirety of the frame. Even though the dedicated Nvidia hardware encodes the file
much faster, the quality is so poor from this identical-bitrate comparison that it’s not
worth using.

There is a slight difference between Nvidia’s HEVC encoder set to CQP mode
compared to the x265 Medium preset. Medium has a small advantage in fine still detail
here, and slightly less blocking, at a significantly smaller file size. Nvidia has a slight
advantage in detail during high motion scenes, although this isn’t surprising
considering its superior bitrate.

Nvidia’s encoder has a small quality advantage over the x265 Ultrafast preset in most
circumstances, however Ultrafast encodes end up being significantly smaller.

By extension, Ultrafast encodes are also inferior to Medium encodes, although they
take less than half the time to encode.

And just in case you were wondering how the HEVC Medium encode compares to the
original, these are the comparisons for you. Note that the HEVC Medium preset
delivers a file just one fifth the size of the original Blu-ray rip (525 MB versus 2.5 GB).

Viewing these cropped and (slightly) compressed comparisons on a computer monitor


isn’t the best way to directly compare the image quality. For the best comparisons,
check out the archive that includes every scene I used above for every encode in high-
quality images.

Wrap Up: HEVC Is Best

From all the testing I performed for this article, it’s clear that HEVC provides the best
quality at the smallest file size, if you’re content with the downsides and restrictions
that the format brings.

Of all the encodes I produced, here is the list from best to worst in terms of quality:

H.264 Custom
x265 HEVC Medium/x265 HEVC Slow
x265 HEVC Faster
Nvidia HEVC CQP
x264 H.264 Very Fast
x265 HEVC Ultrafast
Nvidia HEVC VBR Low Bitrate

With Medium HEVC encodes occupying the least space of everything I encoded, it
clearly takes the crown for the ultimate encoding profile that you should be using
above all else. This includes H.264, because even though I achieved better quality
from a custom H.264 preset, the files were more than twice as large.

If you’re less concerned about space and more concerned about efficiency, I would
strongly recommend using Nvidia’s HEVC encoder on the default CQP settings. It
produces files that are around twice as large as the Medium x265 preset, but it
encodes these files significantly faster than anything else. Quality is much better than
x265’s Ultrafast settings, and slightly better than the default x264/H.264 settings in
Handbrake, albeit at higher bitrates than both.

If you don’t have a current-gen Nvidia GPU and you’re not keen on lengthy encodes, I’d
recommend sticking to either HEVC’s Ultrafast preset or the default x264 Very High
preset. Ultrafast HEVC is a bit more than twice as slow as x264 Very High, but it
produces smaller files at only a small reduction in quality.

Of course, my recommendation to use the x265 Medium preset in Handbrake at


constant quality of QF23 is only a suggestion, and you might find better results with
your media by experimenting with the settings available to you. As I mentioned earlier,
adjusting the constant quality slider is your best bet for increasing/decreasing the
quality at the expense of bitrate, and adjustments may be needed for some files. It’s
particularly worth experimenting if you are encoding animated TV shows, such as
Family Guy.
There are still questions over whether encoding to HEVC at an intensive x265 preset
like Medium is a better option than simply buying more hard drives to store larger files.
3 TB hard drives are currently just $85, while power costs are 12 cents per kWh in the
United States on average. Depending on the performance of your rig, its power
consumption, and the quality you want to achieve, it may be better to simply buy more
hard drives.

Having a library of HEVC files may also not be suitable for your use cases. The format
is new enough that it’s not compatible with a variety of popular media player hardware,
although this will improve with each new hardware generation. It’s more hardware
intensive to decode as well, which affects battery life on mobile devices, while older
hardware may not be powerful enough to decode it at all.

And finally, if you’re an impatient person, the extra time it takes to encode to HEVC
versus even a high-quality H.264 file may become frustrating.
But if you really want the best quality files in the smallest possible format, HEVC is the
way to go. For this very reason, it’s no surprise to see the industry pushing for
widespread HEVC adoption, or adoption of a similar low-bitrate, high-quality format.
Moving away from H.264 to HEVC or an equivalent is especially important for 4K
streaming, as the bandwidth requirements can be reduced significantly by simply
encoding the media in a more compressed format. HEVC is perfect for this: it provides
the same quality as H.264 streams at half the bitrate.

Even if 2016 isn’t the year where HEVC becomes widely adopted, testing out what the
format is capable of has taught me at least one thing: the impending death of H.264
has been flagged, and it’s time to prepare for a new generation of better, more efficient
encoding formats.

You might also like