{
  "schemaVersion": 1,
  "contentVersion": "ca42e61ede0a24f789d7287a0001244ad22f4abf",
  "id": "docs/tools/software-encoders/hm",
  "collection": "docs",
  "title": "HM",
  "description": "HM is the JCT-VC reference software for HEVC, used for conformance and research; it is far too slow to use as a practical encoder.",
  "canonicalUrl": "https://encode.wiki/tools/software-encoders/hm/",
  "apiUrl": "https://encode.wiki/api/v1/documents/docs/tools/software-encoders/hm.json",
  "markdownUrl": "https://encode.wiki/api/v1/markdown/docs/tools/software-encoders/hm.md",
  "status": "current",
  "tags": [
    "migrated"
  ],
  "license": "CC BY-SA 4.0",
  "dates": {
    "lastVerified": "2026-10-08T00:00:00.000Z"
  },
  "authors": [],
  "sources": [
    {
      "title": "HM-18.0 README (build instructions)",
      "url": "https://vcgit.hhi.fraunhofer.de/jvet/HM/-/blob/HM-18.0/README.md",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "HM-18.0 random-access Main 10 configuration",
      "url": "https://vcgit.hhi.fraunhofer.de/jvet/HM/-/blob/HM-18.0/cfg/encoder_randomaccess_main10.cfg",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "HM-18.0 encoder option parser",
      "url": "https://vcgit.hhi.fraunhofer.de/jvet/HM/-/blob/HM-18.0/source/App/TAppEncoder/TAppEncCfg.cpp",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "VVenC encoder performance (HM is single-threaded)",
      "url": "https://github.com/fraunhoferhhi/vvenc/wiki/Encoder-Performance",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    }
  ],
  "provenance": {
    "originUrl": "https://github.com/av1-community-contributors/codec-wiki/blob/37c3317fd058b23c71a87679bed5619a98f77752/docs/encoders/HM.mdx",
    "originCommit": "37c3317fd058b23c71a87679bed5619a98f77752",
    "migratedAt": "2026-08-21T00:00:00.000Z",
    "modified": true,
    "originPath": "docs/encoders/HM.mdx"
  },
  "headings": [
    {
      "depth": 2,
      "text": "Build",
      "anchor": "build"
    },
    {
      "depth": 2,
      "text": "Encode a raw file",
      "anchor": "encode-a-raw-file"
    }
  ],
  "sections": [
    {
      "id": "_preamble",
      "title": "Page introduction",
      "depth": 0,
      "canonicalUrl": "https://encode.wiki/tools/software-encoders/hm/",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/tools/software-encoders/hm/_preamble.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/tools/software-encoders/hm/_preamble.md",
      "checksum": "5fc71843c954420d4a44c38694d418f549de3762170853d4f7cd781dd3cf4a1b",
      "bytes": 788
    },
    {
      "id": "build",
      "title": "Build",
      "depth": 2,
      "anchor": "build",
      "canonicalUrl": "https://encode.wiki/tools/software-encoders/hm/#build",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/tools/software-encoders/hm/build.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/tools/software-encoders/hm/build.md",
      "checksum": "c2617842437ffda25423946f2c1e2a357c0f759bf18a026931fd0fd3d5849c4f",
      "bytes": 493
    },
    {
      "id": "encode-a-raw-file",
      "title": "Encode a raw file",
      "depth": 2,
      "anchor": "encode-a-raw-file",
      "canonicalUrl": "https://encode.wiki/tools/software-encoders/hm/#encode-a-raw-file",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/tools/software-encoders/hm/encode-a-raw-file.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/tools/software-encoders/hm/encode-a-raw-file.md",
      "checksum": "0b8c1a7329278195156e229fb6b870e68eb8f8719f277970bb10a79b914aa111",
      "bytes": 697
    }
  ],
  "outboundReferences": [
    "/codecs/video/hevc/",
    "/tools/software-encoders/jm/",
    "/tools/software-encoders/vtm/",
    "/tools/software-encoders/x265/",
    "/tools/utilities/ffmpeg/",
    "/tools/utilities/mp4box/",
    "https://vcgit.hhi.fraunhofer.de/jvet/HM",
    "https://vcgit.hhi.fraunhofer.de/jvet/HM/-/releases/HM-18.0"
  ],
  "checksum": "0ec2b04b84b1d74b57629935c13eb9db2de90429dfd49de0ab098da282dc05f9",
  "contentFormat": "markdown",
  "markdown": "> **Repository:** [jvet/HM](https://vcgit.hhi.fraunhofer.de/jvet/HM). HEVC HM reference software. Latest release: [HM-18.0](https://vcgit.hhi.fraunhofer.de/jvet/HM/-/releases/HM-18.0), Apr 20, 2023. Last commit: Jul 27, 2026. License: BSD-3-Clause.\n\nHM (HEVC Test Model) is the reference encoder and decoder for [H.265 / HEVC](/codecs/video/hevc/). It exists for conformance testing and HEVC coding-tool research.\n\nAs an encoder it is a curiosity. HM has no threading and is slower than [x265](/tools/software-encoders/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](/tools/software-encoders/vtm/) and [JM](/tools/software-encoders/jm/).\n\n## Build\n\nThe latest release is `HM-18.0` (April 2023).\n\n```sh\ngit clone --branch HM-18.0 https://vcgit.hhi.fraunhofer.de/jvet/HM.git\ncd HM\ncmake -S . -B build -DCMAKE_BUILD_TYPE=Release\ncmake --build build --parallel\n```\n\nCurrent 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.\n\nThis produces `TAppEncoderStatic` and `TAppDecoderStatic` in `bin/`. The manual is in `doc/software-manual.pdf`.\n\n## Encode a raw file\n\nHM 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):\n\n```sh\n./bin/TAppEncoderStatic -c cfg/encoder_randomaccess_main10.cfg -i input.yuv -b stream.265 -o recon.yuv \\\n  -wdt 1280 -hgt 720 -fr 24 -f 48 --InputBitDepth=10 -q 32\n./bin/TAppDecoderStatic -b stream.265 -o decoded.yuv\n```\n\n`-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](/tools/utilities/mp4box/) or [FFmpeg](/tools/utilities/ffmpeg/).\n"
}
