Skip to content

HM

currentMigrated from docs/encoders/HM.mdx at 37c3317fd058; modified for Encode Wiki · CC BY-SA 4.0

jvet/HM

vcgit.hhi.fraunhofer.de

HEVC HM reference software

Latest release
HM-18.0
Last commit
License
BSD-3-Clause

HM (HEVC Test Model) is the reference encoder and decoder for H.265 / HEVC. It exists for conformance testing and HEVC coding-tool research.

As an encoder it is a curiosity. HM has no threading and is slower than x265’s slowest presets, it places keyframes on a fixed IntraPeriod rather than detecting scene changes, and it takes only raw YUV. Use x265 for real work. The VVC and AVC counterparts are VTM and JM.

The latest release is HM-18.0 (April 2023).

Terminal window
git clone --branch HM-18.0 https://vcgit.hhi.fraunhofer.de/jvet/HM.git
cd HM
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --parallel

Current GCC (16) stops on new warnings because the project builds with -Werror; add -DCMAKE_CXX_FLAGS=-w to the first cmake command to get past them.

This produces TAppEncoderStatic and TAppDecoderStatic in bin/. The manual is in doc/software-manual.pdf.

HM needs raw planar YUV plus the size, frame rate and frame count. Settings come from a config file in cfg/ (encoder_randomaccess_main10.cfg, encoder_lowdelay_main10.cfg, encoder_intra_main10.cfg and so on):

Terminal window
./bin/TAppEncoderStatic -c cfg/encoder_randomaccess_main10.cfg -i input.yuv -b stream.265 -o recon.yuv \
-wdt 1280 -hgt 720 -fr 24 -f 48 --InputBitDepth=10 -q 32
./bin/TAppDecoderStatic -b stream.265 -o decoded.yuv

-q is a fixed QP, not a CRF equivalent. The decoder output should match recon.yuv bit for bit. The result is a bare HEVC elementary stream; mux it with MP4Box or FFmpeg.