HEVC

H.265, or HEVC as it is better-known, is the MPEG group's follow-up to the ubiquitous H.264/AVC video codec. It offers significant improvements in reduction of file size for equivalent perceptual quality over its predecessor.

Encoding.com offers a number of implementations of HEVC, including x265 (the default described here), content-adaptive HEVC encoding via Beamr CABR, as well as Dolby Vision.

x265's options frequently mirror those in its related project, x264, with some notable exceptions. The majority of users will not need to define these parameters in a job request, unless expressly required by your decoder, but they are documented here for those who need to modify them.

<?xml version="1.0"?>
<query>
    <userid><<id>></userid> <!-- required-->
    <userkey><<key>></userkey> <!-- required-->
    <action>[Action]</action> <!-- required-->
    <source>[SourceFile]</source> <!-- required-->
    <format>
        <output>[mpeg_dash|mp4|kindle_fire]</output> <!-- required-->
        <video_codec>hevc</video_codec>
        <video_codec_parameters>
            <refresh>1</refresh>
            <rc-lookahead>20</rc-lookahead>
            <b-adapt>2</b-adapt>
            <bframes>4</bframes>
            <b-pyramid>1</b-pyramid>
            <ref>3</ref>
            <ctu>64</ctu>
            <tu-intra-depth>1</tu-intra-depth>
            <tu-inter-depth>1</tu-inter-depth>
            <me>1</me>
            <subme>2</subme>
            <merange>60</merange>
            <max-merge>2</max-merge>
            <rect>1</rect>
            <amp>1</amp>
            <early-skip>0</early-skip>
            <fast-cbf>0</fast-cbf>
            <signhide>1</signhide>
            <lft>1</lft>
            <tskip>0</tskip>
            <sao>1</sao>
            <weightp>1</weightp>
            <tskip-fast>0</tskip-fast>
        </video_codec_parameters>
    </format>
</query>
<?xml version="1.0"?>
<query>
    <userid><<id>></userid> <!-- required-->
    <userkey><<key>></userkey> <!-- required-->
    <action>[Action]</action> <!-- required-->
    <source>[SourceFile]</source> <!-- required-->
    <format>
        <output>[advanced_dash|fmp4_hls]</output> <!-- required-->
        <stream>
            <video_codec>hevc</video_codec>
            <video_codec_parameters>
                <refresh>1</refresh>
                <rc-lookahead>20</rc-lookahead>
                <b-adapt>2</b-adapt>
                <bframes>4</bframes>
                <b-pyramid>1</b-pyramid>
                <ref>3</ref>
                <ctu>64</ctu>
                <tu-intra-depth>1</tu-intra-depth>
                <tu-inter-depth>1</tu-inter-depth>
                <me>1</me>
                <subme>2</subme>
                <merange>60</merange>
                <max-merge>2</max-merge>
                <rect>1</rect>
                <amp>1</amp>
                <early-skip>0</early-skip>
                <fast-cbf>0</fast-cbf>
                <signhide>1</signhide>
                <lft>1</lft>
                <tskip>0</tskip>
                <sao>1</sao>
                <weightp>1</weightp>
                <tskip-fast>0</tskip-fast>
            </video_codec_parameters>
        </stream>
    </format>
</query>
{
    "query": {
        "userid": "<<id>>", // required
        "userkey": "<<key>>", // required
        "action": "[Action]", // required
        "source": "[SourceFile]", // required
        "format": {
            "output": "[mpeg_dash|mp4|kindle_fire]", // required
            "video_codec": "hevc",
            "video_codec_parameters": {
                "refresh": "1",
                "rc-lookahead": "20",
                "b-adapt": "2",
                "bframes": "4",
                "b-pyramid": "1",
                "ref": "3",
                "ctu": "64",
                "tu-intra-depth": "1",
                "tu-inter-depth": "1",
                "me": "1",
                "subme": "2",
                "merange": "60",
                "max-merge": "2",
                "rect": "1",
                "amp": "1",
                "early-skip": "0",
                "fast-cbf": "0",
                "signhide": "1",
                "lft": "1",
                "tskip": "0",
                "sao": "1",
                "weightp": "1",
                "tskip-fast": "0"
            }
        }
    }
}
{
    "query": {
        "userid": "<<id>>", // required
        "userkey": "<<key>>", // required
        "action": "[Action]", // required
        "source": "[SourceFile]", // required
        "format": {
            "output": "[advanced_dash|fmp4_hls]", // required
            "stream": {
                "video_codec": "hevc",
                "video_codec_parameters": {
                    "refresh": "1",
                    "rc-lookahead": "20",
                    "b-adapt": "2",
                    "bframes": "4",
                    "b-pyramid": "1",
                    "ref": "3",
                    "ctu": "64",
                    "tu-intra-depth": "1",
                    "tu-inter-depth": "1",
                    "me": "1",
                    "subme": "2",
                    "merange": "60",
                    "max-merge": "2",
                    "rect": "1",
                    "amp": "1",
                    "early-skip": "0",
                    "fast-cbf": "0",
                    "signhide": "1",
                    "lft": "1",
                    "tskip": "0",
                    "sao": "1",
                    "weightp": "1",
                    "tskip-fast": "0"
                }
            }
        }
    }
}

Parameter

Definition

Allowed Values

Default Values

SLICE DECISION OPTIONS

refresh

Specify the intra refresh type

0 — none
1 — CDR
2 — IDR

1

rc-lookahead

Specify the number of frames for the frame-type lookahead.

An integer less than or equal to 250 and greater than the maximum consecutive bframes count.

20

b-adapt

Enable adaptive bframe scheduling.

0 — none
1 — fast
2 — full (trellis)

2

bframes

Specify the number of consecutive b-frames.

Positive integer from 0 to 16.

4

b-pyramid

Enable the use b-frames as references.

0 — Disabled
1 — Enabled

1

ref

Specify the max number of L0 references to be allowed.

Positive integer from 0 to 16.

3

weightp

Enable the weighted prediction in P slices.

0 — Disabled
1 — Enabled

1

QUAD-TREE ANALYSIS

ctu

Specify the maximum CU size (width and height).

16,32,64

64

tu-intra-depth

Specify the maximum TU recursive depth for intra CUs.

1,2,3,4

1

tu-inter-depth

Specify the maximum TU recursive depth for inter CUs.

1,2,3,4

1

MOTION SEARCH OPTIONS

me

Specify the motion search method.

0 — dia
1 — hex
2 — umh
3 — star
4 — full

1

subme

Specify the amount of subpel refinement to perform.

Positive integer from 0 to 7 (0: least … 7: most)

2

merange

Specify the motion search range.

Integer from 0 to 32768

60

max-merge

Specify the maximum number of merge candidates.

Positive integer from 1 to 5

2

rect

Specify the number of rectangular motion partitions Nx2N and 2NxN

0 — Disable
1 — Enable

1

amp

Specify the asymmetric motion partitions (requires rect enabled)

0 — Disable
1 — Enable

1

early-skip

Enable early SKIP detection.

0 — Disable
1 — Enable

0

fast-cbf

Enable CBF fast mode.

0 — Disable
1 — Enable

0

RATE CONTROL

rd

Specify level of rate distortion in mode decision.

0 — Least
1 — Lightweight RDO Analysis

0

signhide

Hide the sign bit of one coeff per TU.

0 — Disable
1 — Enable

1

LOOP FILTER

lft

Enable the oop filter.

0 — Disable
1 — Enable

1

INTRA OPTIONS

tskip

Enable intra transform skipping.

0 — Disable
1 — Enable

0

tskip-fast

Enable fast intra transform skipping

0 — Disable
1 — Enable

0

SAMPLE ADAPTIVE OFFSET LOOP FILTER

sao

Enable simple adaptive offset.

0 — Disable
1 — Enable

1