{
  "schemaVersion": 1,
  "contentVersion": "ca42e61ede0a24f789d7287a0001244ad22f4abf",
  "id": "docs/tools/software-encoders/jm",
  "collection": "docs",
  "title": "JM",
  "description": "JM is the reference software for H.264 / AVC, used for conformance and research; x264 is far faster and more efficient.",
  "canonicalUrl": "https://encode.wiki/tools/software-encoders/jm/",
  "apiUrl": "https://encode.wiki/api/v1/documents/docs/tools/software-encoders/jm.json",
  "markdownUrl": "https://encode.wiki/api/v1/markdown/docs/tools/software-encoders/jm.md",
  "status": "current",
  "tags": [
    "migrated"
  ],
  "license": "CC BY-SA 4.0",
  "dates": {
    "lastVerified": "2026-10-08T00:00:00.000Z"
  },
  "authors": [],
  "sources": [
    {
      "title": "JM-19.1 source tree",
      "url": "https://vcgit.hhi.fraunhofer.de/jvet/JM/-/tree/JM-19.1",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "JM-19.1 baseline encoder configuration",
      "url": "https://vcgit.hhi.fraunhofer.de/jvet/JM/-/blob/JM-19.1/cfg/encoder_baseline.cfg",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "JM-19.1 README (build instructions)",
      "url": "https://vcgit.hhi.fraunhofer.de/jvet/JM/-/blob/JM-19.1/README.md",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    }
  ],
  "provenance": {
    "originUrl": "https://github.com/av1-community-contributors/codec-wiki/blob/37c3317fd058b23c71a87679bed5619a98f77752/docs/encoders/JM.mdx",
    "originCommit": "37c3317fd058b23c71a87679bed5619a98f77752",
    "migratedAt": "2026-08-21T00:00:00.000Z",
    "modified": true,
    "originPath": "docs/encoders/JM.mdx"
  },
  "headings": [
    {
      "depth": 2,
      "text": "Build",
      "anchor": "build"
    },
    {
      "depth": 2,
      "text": "Encode with a config file",
      "anchor": "encode-with-a-config-file"
    }
  ],
  "sections": [
    {
      "id": "_preamble",
      "title": "Page introduction",
      "depth": 0,
      "canonicalUrl": "https://encode.wiki/tools/software-encoders/jm/",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/tools/software-encoders/jm/_preamble.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/tools/software-encoders/jm/_preamble.md",
      "checksum": "1bfe9483f51aed474055cc3dc161c27ffe44ceebde46c517b1ada3bdb78ad0e3",
      "bytes": 697
    },
    {
      "id": "build",
      "title": "Build",
      "depth": 2,
      "anchor": "build",
      "canonicalUrl": "https://encode.wiki/tools/software-encoders/jm/#build",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/tools/software-encoders/jm/build.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/tools/software-encoders/jm/build.md",
      "checksum": "4310b7a6c5cc6a5c328ec30a02810bd876da8719090ece1974725b0c3d5a91f6",
      "bytes": 481
    },
    {
      "id": "encode-with-a-config-file",
      "title": "Encode with a config file",
      "depth": 2,
      "anchor": "encode-with-a-config-file",
      "canonicalUrl": "https://encode.wiki/tools/software-encoders/jm/#encode-with-a-config-file",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/tools/software-encoders/jm/encode-with-a-config-file.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/tools/software-encoders/jm/encode-with-a-config-file.md",
      "checksum": "4a62f0555300f5e0b5133d50c026e3da505ffa29a0b53fa8a8fd29746b8c6aab",
      "bytes": 1070
    }
  ],
  "outboundReferences": [
    "/codecs/video/avc/",
    "/tools/software-encoders/hm/",
    "/tools/software-encoders/vtm/",
    "/tools/software-encoders/x264/",
    "https://vcgit.hhi.fraunhofer.de/jvet/JM",
    "https://vcgit.hhi.fraunhofer.de/jvet/JM/-/releases/JM-19.1"
  ],
  "checksum": "ac1e8b7a6a39f14e7038229852502e2e924386de2b60f1d9c03047d54ecdf1cc",
  "contentFormat": "markdown",
  "markdown": "> **Repository:** [jvet/JM](https://vcgit.hhi.fraunhofer.de/jvet/JM). H.264/AVC JM reference software. Latest release: [JM-19.1](https://vcgit.hhi.fraunhofer.de/jvet/JM/-/releases/JM-19.1), Apr 20, 2023. Last commit: Apr 13, 2026.\n\nJM (Joint Model) is the reference encoder and decoder for [H.264 / AVC](/codecs/video/avc/). It exists for conformance testing and standards work, not for making video people will watch. [x264](/tools/software-encoders/x264/) is far faster and looks better at a given bitrate, thanks to its psychovisual optimizations, adaptive quantization and MB-tree. The HEVC and VVC counterparts are [HM](/tools/software-encoders/hm/) and [VTM](/tools/software-encoders/vtm/).\n\n## Build\n\nThe latest release is `JM-19.1` (April 2023).\n\n```sh\ngit clone --branch JM-19.1 https://vcgit.hhi.fraunhofer.de/jvet/JM.git\ncd JM\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_C_FLAGS=-w -DCMAKE_CXX_FLAGS=-w` to the first `cmake` command to get past them. The encoder and decoder are copied to `bin/lencod_static` and `bin/ldecod_static`.\n\n## Encode with a config file\n\nJM is driven entirely by config files, and it reads raw YUV. The `cfg/` directory ships a tiny QCIF clip and a matching baseline-profile config, which is the easiest way to see it work:\n\n```sh\ncd cfg\n../bin/lencod_static -d encoder_baseline.cfg\n../bin/ldecod_static -d decoder.cfg\n```\n\nThe decoder's `decoder.cfg` reads `test.264`, the encoder's default output name.\n\nFor your own input, copy a config and change `InputFile`, `OutputFile`, `ReconFile`, `SourceWidth`, `SourceHeight`, `FramesToBeEncoded` and `FrameRate` together. `ProfileIDC` picks the profile (66 baseline, 77 main, 88 extended, 100 high, 110 high 10, 122 high 4:2:2, 244 high 4:4:4), and `QPISlice`, `QPPSlice` and `QPBSlice` set the quantizer for I, P and B slices (0–51). They are fixed QPs, not a CRF. JM also has rate control (`RateControlEnable`, `Bitrate` in bits/s). Start from `encoder_main.cfg` (Main profile with B-frames) rather than the baseline one if you want anything beyond baseline tools. To decode another stream, change `InputFile` in `decoder.cfg`.\n"
}
