Skip to content
HALOWERK

Tonwerk

motion summary

Samples the video at sample_fps on a 160 px wide grey image and compares each sample with the previous one: a pixel is active when its grey level changes by more than pixel_threshold. Per pair it records the active share, mean absolute difference and per-cell shares on a grid_cols-wide grid. Pairs above active_threshold form active intervals (gaps up to 1 s are bridged); pairs with more than 60 % active pixels are reported as global changes (cut, camera motion or lighting change). Purely.

POST https://ton.halowerk.com/v1/motion-summary

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
video_base64stringNoThe video as base64 (MP4/MOV, WebM/MKV, AVI, MPEG-TS, MPEG-PS, FLV, Ogg or animated GIF; at most 10 MiB decoded; a data: URL prefix is accepted).
video_urlstringNoPublic http(s) URL of the the video (at most 10 MiB; private, local and reserved addresses are refused).
start_snumberNoStart of the analysed range in seconds.
duration_snumberNoLength of the analysed range in seconds (at most 600; default: to the end of the video).
sample_fpsnumberNoFrames analysed per second.
pixel_thresholdintegerNoGrey-level change (0–255) above which a pixel counts as moving.
active_thresholdnumberNoShare of moving pixels above which a sample pair counts as active.
grid_colsintegerNoColumns of the heat map grid (rows follow the aspect ratio).
bucket_snumberNoLength of the time line buckets (default: chosen for at most 60 buckets).
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "video_base64": {
      "type": "string",
      "minLength": 16,
      "maxLength": 14000000,
      "description": "The video as base64 (MP4/MOV, WebM/MKV, AVI, MPEG-TS, MPEG-PS, FLV, Ogg or animated GIF; at most 10 MiB decoded; a data: URL prefix is accepted)."
    },
    "video_url": {
      "type": "string",
      "format": "uri",
      "pattern": "^https?://",
      "maxLength": 2048,
      "description": "Public http(s) URL of the the video (at most 10 MiB; private, local and reserved addresses are refused)."
    },
    "start_s": {
      "type": "number",
      "minimum": 0,
      "maximum": 36000,
      "default": 0,
      "description": "Start of the analysed range in seconds."
    },
    "duration_s": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 600,
      "description": "Length of the analysed range in seconds (at most 600; default: to the end of the video)."
    },
    "sample_fps": {
      "type": "number",
      "minimum": 1,
      "maximum": 10,
      "default": 4,
      "description": "Frames analysed per second."
    },
    "pixel_threshold": {
      "type": "integer",
      "minimum": 5,
      "maximum": 100,
      "default": 20,
      "description": "Grey-level change (0–255) above which a pixel counts as moving."
    },
    "active_threshold": {
      "type": "number",
      "minimum": 0.001,
      "maximum": 0.5,
      "default": 0.01,
      "description": "Share of moving pixels above which a sample pair counts as active."
    },
    "grid_cols": {
      "type": "integer",
      "minimum": 2,
      "maximum": 16,
      "default": 8,
      "description": "Columns of the heat map grid (rows follow the aspect ratio)."
    },
    "bucket_s": {
      "type": "number",
      "enum": [
        0.5,
        1,
        2,
        5,
        10,
        15,
        30,
        60
      ],
      "description": "Length of the time line buckets (default: chosen for at most 60 buckets)."
    }
  }
}

Open original schema

Published input example

{
  "video_url": "https://upload.wikimedia.org/wikipedia/commons/2/2c/Rotating_earth_%28large%29.gif",
  "sample_fps": 4
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub →