Skip to content
pre-alpha

motio check determinism

Render in two orders and two concurrencies and compare decoded frames.

Terminal window
motio check determinism [entry-point|serve-url] <composition-id>

Flags

Flag Description
--json Print one JSON object on stdout (schema in schemas/).
--log=<value> Log level: trace, verbose, info, warn, error.
--help, -h Show help for the command.
--props=<value> Input props: a JSON object or the path to a JSON file.
--config=<value> Config file (default: motio.config.ts, else remotion.config.ts, in the project root).
--env-file=<value> Dotenv file to read instead of .env.
--public-dir=<value> Public directory (default public/).
--browser-executable=<value> Chrome to use instead of the pinned one.
--timeout=<value> delayRender() timeout per frame, in milliseconds.
--gl=<value> OpenGL backend: angle, egl, swiftshader, swangle, vulkan, angle-egl.
--port=<value> Port of the local bundle server.
--bundle-cache Accepted for compatibility; no effect.
--ignore-certificate-errors Accept invalid TLS certificates.
--disable-web-security Disable CORS and other web security.
--user-agent=<value> User agent of the pages.
--dark-mode Emulate prefers-color-scheme: dark.
--capture-method=<value> Motio: frame capture, auto or screenshot (Page.captureScreenshot), or begin-frame (Linux, deprecated).
--pages-per-browser=<value> Motio: pages sharing one browser process (default: the pages spread over two browsers).
--raster=<value> Motio: cpu (default; the pixels of Remotion’s default setting) or gpu (the pixels of Remotion with –gl=swangle, which selects it; videos take about 2.5 times as long).
--canvas=<value> Motio: how transparent captures draw 2D canvases: software (default; deterministic and faster) or gpu (Remotion’s canvas pixels).
--time-zone=<value> Motio: the time zone of the page’s Date and Intl, an IANA name such as Europe/Rome (default: UTC on every machine).
--locale=<value> Motio: the page’s language (navigator.language, Intl’s default, Accept-Language), a tag such as it-IT (default: en-US on every machine).
--time-model=<value> Motio: frame (only the frame drives the composition) or virtual (Date, timers, requestAnimationFrame and Math.random follow the frame). Default: the composition’s, else frame.
--width=<value> Override the composition width.
--height=<value> Override the composition height.
--fps=<value> Override the composition frame rate.
--duration=<value> Override the composition duration, in frames.
--scale=<value> Scale factor of the output, above 0 and at most 16.
--concurrency=<value> Pages rendering in parallel: a number or a percentage.
--frames=<value> Frames to check: 0-59, 100-, … (default: up to 60 from the start).
--reference=<value> Motio: what each run is compared with: runs (the first run, default) or fresh (every frame on a new page, which also catches pixels that depend on the frames a page rendered before).

JSON output

With --json, motio check determinism prints exactly one JSON object on stdout. On success it has these fields; on failure it is the error object. The schema ships with the CLI as @motiojs/cli/schemas/check-determinism.schema.json.

Field Type Description
ok true
command "check determinism"
composition composition
frames array of integer
reference (optional) "runs", "fresh" What every run is compared with: the first run (runs) or a render with a new page per frame (fresh, the first run). Absent in results of older versions, which mean runs.
runs array of object
runs[].order "ascending", "descending"
runs[].concurrency integer or string
runs[].freshPage (optional) true Every frame of this run was rendered on a new page.
deterministic boolean
mismatches array of object
mismatches[].frame integer
mismatches[].hashes array of string
mismatches[].differingPixels (optional) integer Most pixels any run changed against the first run.
mismatches[].faintPixels (optional) integer Of the differingPixels of the run that changed most, those whose every channel differs by at most 2 levels.
mismatches[].imagePixels (optional) integer Of the differingPixels of the run that changed most, those inside an drawn smaller than its natural size.
mismatches[].region (optional) object Bounding box of the pixels that differ in any run, in captured pixels.
mismatches[].region.x integer
mismatches[].region.y integer
mismatches[].region.width integer
mismatches[].region.height integer
diagnosis (optional) object The likely cause, read from which runs disagree and how much of each frame differs; present when frames differ.
diagnosis.cause "random", "order", "race", "history", "mixed", "raster", "canvas", "image" random: every run differs (Math.random(), a clock); order: ascending and descending differ (a frame depends on the previous one); race: one tab and several tabs differ; history: the runs agree but not with a new page per frame; mixed: more than one; raster: every frame differs in no more than a few lines of pixels, as when Chrome rasterises the same content differently; canvas: every difference lies inside a canvas drawn on the GPU (canvas gpu), where –canvas=software helps; image: the differences lie inside images drawn smaller than their natural size and change by a level or two, as when Chrome draws them from a decoded copy of another size held in its image cache (pattern has what the runs point to otherwise, for raster, canvas and image).
diagnosis.pattern (optional) "random", "order", "race", "history", "mixed" With the raster, canvas or image cause: what the disagreeing runs point to if the composition is the cause.
diagnosis.message string
warnings array of string
renderWarnings (optional) array of object

Exit codes

See exit codes. Run motio check determinism --help for the same list of flags in the terminal.