HEVC

HEVC video support is coming soon to DivX software, and this is where we'll publish our documentation so you can be among the first to learn about DivX HEVC video in HD and 4K resolutions.

Stay tuned for upcoming releases and remember, we want to hear what you think.

DivX HEVC Video Profile

Last updated on Wed, 10/16/2013

It wasn't just hype when we said earlier this year that DivX is among the first to deliver tools for HEVC content and playback. And it all starts with this first look at the new DivX HEVC 4K, 1080p and 720p profiles our team is developing. Keep in mind it only defines the VIDEO portion of the profiles at this time. Audio, features and everything else that make up a DivX profile are still in the works, so check back often or sign up for email alerts when we have something big to announce.

If you’re reading this and excited to start testing out the profiles, you already understand that HEVC, or H.265, is the next big thing in video technology. With the promise of up to 50% compression efficiency compared to today’s best encoding tools (AVC/H.264), we believe HEVC can help to drastically improve video streaming capabilities, particularly in a mobile environment, and facilitate 4K content production and delivery to new Ultra HD displays.

HEVC is a game changer, and we're heavily invested in its adoption across the video industry. To kick it off, over the next few months we'll release DivX HEVC Muxer, Player and Encoder tools right here on Labs to anyone who wants to check them out. The draft profiles we're posting today form the core of this toolset, and should be viewed as a starting point for a range of software and hardware implementations that enable DivX HEVC video creation and playback across multiple platforms and devices.

Still here? Go download the profiles, take them for a spin, and make sure you share your feedback with us. We have a really smart group of people waiting to hear what you think and answer any questions you may have.

AttachmentSize
DivX_HEVC_Profiles.pdf367.26 KB

Using DivX HEVC Community Encoder

The DivX HEVC encoder is a command line tool that is capable of creating HEVC bitstreams. Download the binaries here.

Usage

DivX H.265/HEVC Encoder

Usage: DivX265 -i <infile> -o <outfile> -br <bitrate> -s <w>x<h> (for raw infile)

or: DivX265 -i <infile> -o <outfile> -br <bitrate> (for .avs|.avi infile)

or: DivX265 -h (for help)

Example Usage

from a raw file (yuv/raw, assumes IYUV/I420 colorspace):

  • DivX265.exe -i content_in.yuv -o content_out.hevc -br 3000 -s 1280x720

Piping from stdin through another command line tool:

  • ffmpeg.exe -i content_in.avi -f rawvideo -pix_fmt yuv420p pipe:1 | DivX265.exe -s 1280x720 -br 4000 -i - -o content.hevc
    10 bit raw input format
  • ffmpeg.exe -i content_in.avi -f rawvideo -pix_fmt yuv420p10le pipe:1 | DivX265.exe -s 1280x720 -br 4000 -i - -o content.hevc --format yuv420p10le [ --main10 ]

from an AVS file (make sure AVISynth is installed):

  • DivX265.exe -i content_in.avs -o content_out.hevc -br 3000

from an AVI file:

  • DivX265.exe -i content_in.avi -o content_out.hevc -br 3000

Dual frame rate stream (temporal scalability):

  • DivX265.exe -i content_in.avi -o content_out.hevc -br 3000 --temporal-scalability

Options

Flag Description
-h, --help Help
-v, --verbose Verbose mode, detailed messages output.
-q, --quiet Quiet mode, no messages output.
-i, --input <Input file> Required. (For raw stream from stdin, use -i -)
-F, --fixed-gop-length Disable scene change detection, results in fixed gop intervals
-aqo <1-5> Algorithm quality optimized for:
  • 1: fastest speed
  • 2: faster
  • 3: balanced (default)
  • 4: higher quality
  • 5: highest quality
-10, --main10 Enables Main 10 (10 bit) profile
--no-wpp Disable Wavefront Parallel Processing
-ts, --temporal-scalability Enable two layer temporal scalability, where the frame rate of the baselayer is reduced by 2
-709Selects 709 for colour-primaries, transfer-characteristics and matrix coefficients
--colour-primaries, --transfer-characteristics, --matrix-coefficients Signaling colorspace properties: 709, 2020, ...
-o, --output <Output file> Required.
--format <yuv420p, yuv420p10le, yuv422p10le, I420, V210 > Raw pixel format
-s, --size <height>x<width> Required for raw files. Frame dimensions (e.g. 1920x1080)
-br, --bitrate <bitrate> Target bitrate in kbps
-qp <qp> Constant Quantizer, creates potential non-compliant DivX HEVC Profile streams
-I, --interval <interval> Keyframe interval. 1 to 6 seconds. Default=5
-n, --frames <number> Maximum number of frames to encode
--start <number> Start encode from specified frame
-fps, --framerate <Frame rate> Frame rate. Default=24 Hz (raw files) or derived from file (.avs/.avi)
  • 60 Hz
  • 60000/1001 Hz
  • 50 Hz
  • 48 Hz
  • 30 Hz
  • 30000/1001 Hz
  • 25 Hz
  • 24 Hz
  • 24000/1001 Hz
    --psnr Calculates PSNR metrics

    Notes

    • For more information on bitrate, keyframe intervals, etc., please refer to the DivX HEVC Video Profiles (July 2014).
    • The default colorspace for encoding is assumed to be IYUV or I420 (YUV 4:2:0 planar)

    Playing HEVC in DivX Player (Mac)

    UPDATE: You no longer need to use the special plug-in below to play DivX HEVC. Simply get the latest DivX Player!

    The time has come for ... [drum roll] ... real-time 1080p HEVC video playback in DivX Player for Mac!

    Prerequisites

    • Download and install DivX Player 9.1.3
    • Download our HEVC Plugin v1.1 for DivX Player
    • Verify that the below files are present in the DivXHEVC_Plugins_v1.1_OSX.zip file you downloaded
      • DivXHEVCDecode.bundle
      • DivXMKVSource.bundle
      • ReadMe_forMac.txt
      • WEBM_LICENSE.TXT

      Installing HEVC Support

      • Unzip the contents of the zip file into Applications>DivX Player.app>Contents>Plugins directory
      • Restart DivX Player

      Uninstalling HEVC Support

      • Navigate to Applications>DivX Player.app>Contents>Plugins directory
      • Delete these files:
        • DivXHEVCDecode.bundle
        • DivXMKVSource.bundle
        • ReadMe_forMac.txt
        • WEBM_LICENSE.TXT
      • Restart DivX Player
      Once you're all set up, cruise over to our showcase page to download Tears of Steel film in DivX HEVC.

      Notes

      • This release includes HEVC decoder plugins, for the DivX player 9.1.3, which are HM-11.0 compliant
      • Seeking is now supported during playback
      • We've tested and confirmed real time 1080p playback of the content Tears of Steel. on the below MAC hardware:
        • MacBook Pro w/ Intel Core i7 @ 2.7 GHz, 8 GB RAM running OSX 10.8.3
        • Mac Mini w/ Intel Core i5 @ 2.5 GHz, 4 GB RAM running OSX 10.8.4
        • iMac w/ Intel Core 2 Duo @ 2.8 GHz, 2 GB RAM running OSX 10.7
        • iMac w/ Intel Core 2 Duo @ 2.8 GHz, 2 GB RAM running OSX 10.6.8
      When you're done, share your feedback. We look forward to hearing what you think!

    Playing HEVC in DivX Player (Windows)

    UPDATE: You no longer need to use the special plug-in below to play DivX HEVC. Simply get the latest DivX Player!

    The time has come for real-time up to 1080p HEVC video playback in DivX Player!

    Prerequisites

    • Download and install DivX Player 9.1.3
    • Download our HEVC Plugin v1.1 for DivX Web Player
    • Verify that the below files are present in the DivXHEVC_Plugins_v1.1_Windows.zip file you downloaded
      • DivXHEVCDecode.dll
      • DivXHEVCDecode.xml
      • DivXMKVSource.dll
      • DivXMKVSource.xml

    Installing HEVC Support

    • Unzip the contents of the zip file into C:\Program Files (x86)\DivX\DivX Plus Player\DSEPlugins directory
    • Uninstalling HEVC Support

      • Navigate to C:\Program Files (x86)\DivX\DivX Plus Player\DSEPlugins directory
      • Delete these files:
        • DivXHEVCDecode.dll
        • DivXHEVCDecode.xml
        • DivXMKVSource.dll
        • DivXMKVSource.xml

      Notes

      • This release includes HEVC decoder plugins,for the DivX player 9.1.3, which are HM-11.0 compliant
      • Seeking is now supported during playback
      • We've tested and confirmed real time 1080p playback on a 4-Core i5 with 4GB RAM with content Tears of Steel.
      • Instructions above are based on Windows 7 64 bit operating system. 32 bit Windows operating systems will use "C:\Program Files\..."
      When you're done, share your feedback. We look forward to hearing what you think!

    Using MKVToolNix for HEVC Muxing

    Who's ready to mux? To get started, visit the HEVC Support in MKV page to download the toolset you need to start muxing DivX HEVC video into MKV (binaries and our patched source code). By the time you get through this page, you should have a good understanding of how to use MKVToolNix to make it happen.

    Download HEVC Bitstreams

    First, you'll need some video streams:

    Now let's see MKVToolNix in action!

    Merge HEVC into MKV

    After you download some of the streams (above), then...

    mkvmerge --default-duration 0:24fps --aac-is-sbr 0:1 myVideoIn.hevc myAudioIn.aac -o myMuxedMovie.mkv

    Extract to MKV

    mkvextract tracks myMuxedMovie.mkv 0:myVideoOut.hevc 1:myAudioOut.aac

    The above example is for one of the sample 720p showcase content, whose frame rate is 24. If you use mkvmerge with any other content, use the above command with corresponding file names and parameters.

    Technical Details

    The following section provides some technical details to help you understand our thinking around how HEVC could be stored within the Matroska multimedia container. Consider it a proposal and not a final spec, and please weigh in on our forums or join the discussion over on the Matroska Dev List.

    Normative Reference(s)

    Informative Reference(s)

    Article Conventions

    • An Element will contain children and an Attribute will contain a data
    • ELEM(“name”) – Is used to explicitly denote as an element. e.g. ELEM(“Segment”)
    • ATTR(“name”) – Is used to explicitly denote as an attribute. e.g. ATTR(“CodecPrivate”)

    How it is marked as HEVC?

    The Matroska multimedia container contains the ATTR("CodecID") a child of the ELEM("TrackEntry") that defines the codec used to encode the data of the track.


    The value of ATTR("CodecID") for HEVC is V_MPEGH/ISO/HEVC following the same convention used with AVC that is defined as V_MPEG4/ISO/AVC.

    CodecID Description
    V_MPEGH/ISO/HEVC MPEG-H Part 2 (ISO/IEC 23008-2)

    What is the Codec Specific Information?

    The Matroska multimedia container also contains codec initialization data, ATTR("CodecPrivate") in the ELEM("TrackEntry"). The format of the ATTR("CodecPrivate") has been extended to add HEVC support.


    The format of the ATTR("CodecPrivate") has been modified to include the new video parameter set (VPS) defined in the HEVC standard. The VPS will be included in the ATTR("CodecPrivate") if and only if available in the HEVC stream. The table below defines the format of the ATTR("CodecPrivate") if the ATTR("CodecID") is equal to V_MPEGH/ISO/HEVC.

    Value Bits Description
    configuration_version 8 The value should be 0 until the format has been finalized. Thereafter is should have the specified value (probably 1). This allows us to recognize (and ignore) non-standard CodecPrivate
    general_profile_space 2 Specifies the context for the interpretation of general_profile_idc and general_profile_compatibility_flag
    general_tier_flag 1 Specifies the context for the interpretation of general_level_idc
    general_profile_idc 5 Defines the profile of the bitstream
    general_profile_compatibility_flag 32 Defines profile compatibility, see [HEVC] for interpretation
    general_progressive_source_flag 1 Source is progressive, see [HEVC] for interpretation
    general_interlace_source_flag 1 Source is interlaced, see [HEVC] for interpretation
    general_non-packed_constraint_flag 1 If 1 then no frame packing arrangement SEI messages
    general_frame_only_constraint_flag 1 If 1 then no fields, see [HEVC] for interpretation
    Reserved 44 Reserved Field, Value TBD 0
    general_level_idc 8 Defines the level of the bitstream
    Reserved 4 Reserved Field, value '1111'b
    min_spatial_segmentation_idc 12 Maximum possible size of distinct coded spatial segmentation regions in the pictures of the CVS
    Reserved 6 Reserved Field, value '111111'b
    Parallelism_type 2 0=unknown, 1=slices, 2=tiles, 3=WPP
    Reserved 6 Reserved Field, value '111111'b
    chroma_format_idc 2 See [HEVC] spec for details, table 6-1
    Reserved 5 Reserved Field, value '11111'b
    bit_depth_luma_minus8 3 Bit depth luma minus 8
    Reserved 5 Reserved Field, value '11111'b
    bit_depth_chroma_minus8 3 Bit depth chroma minus 8
    Reserved 16 Reserved Field, value 0
    Reserved 2 Reserved Field, value 0
    max_sub_layers 3 maximum number of temporal sub-layers
    temporal_id_nesting_flag 1 Specifies whether inter prediction is additionally restricted. see [HEVC] for interpretation.
    size_nalu_minus_one 2 Size of field NALU Length – 1
    num_parameter_sets 8 Number of parameter sets
    for (i=0;i<num_parameter_sets;i++) {
    array_completeness 1 1 when there is no duplicate parameter set with same id in the stream, 0 otherwise or unknown
    Reserved 1 Reserved field, Value '1'b
    nal_unit_type 6 Nal unit type, restricted to VPS, SPS, PPS and SEI, SEI must be of declarative nature which applies to the whole stream such as user data sei.
    nal_unit_count 16 Number of nal units
    for (j=0;j<nalu_unit_count;j++) {
    size 16 Size of nal unit
    for(k=0;k < size;k++) {
    data[k] 8 nalu data
      }
     }
    }

    Above table references official [HEVC] spec documents

    How is the HEVC Stream Stored?

    The stream data in Matroska is stored within blocks, either a ATTR("Block") or ATTR("SimpleBlock").


    See the Matroska specification for details on this structure:

    The HEVC stream is stored within MKV using the same convention as AVC with each NAL unit having a 4-byte unsigned integer that precedes the NAL. The value of the unsigned integer is the size of the NAL unit that follows. In contrast the value of the 4-byte unsigned integer with a stream stored using the Annex B syntax does not use a 4-byte size prefix but instead uses a constant 4-byte start code of 0x00000001.

    A HEVC block is considered a keyframe if the HEVC sample is an Instantaneous Decoding Refresh (IDR) picture, a Clean Random Access (CRA) picture, or a Broken Link Access (BLA) picture.