Skip to content
HALOWERK

Tonwerk

video stabilize

Pass 1 runs ffmpeg 6.1 vidstabdetect (vid.stab 1.1, local motion fields), pass 2 vidstabtransform with the chosen smoothing window (frames), border handling (static optimal zoom, adaptive zoom, black or kept borders) or tripod mode, followed by a light unsharp mask as the vid.stab authors recommend, then H.264 (libx264, CRF by quality) with AAC audio. Shake is measured for input and output with the same estimator: vidstabdetect on both clips at an analysis width of at most 640 px, global.

POST https://ton.halowerk.com/v1/video-stabilize

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
video_base64stringNoVideo file 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 video file (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 30; default: to the end of the video).
smoothingintegerNoSmoothing window in frames on each side (larger = steadier, slower camera moves).
shakinessintegerNoExpected shakiness for the motion analysis (1 = little, 10 = very shaky).
bordersstringNoHow to handle the borders that appear when frames are moved back.
tripodbooleanNoLock the camera to the first frame (virtual tripod) instead of smoothing.
qualitystringNoH.264 quality: small (CRF 28), balanced (CRF 23) or high (CRF 19).
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "video_base64": {
      "type": "string",
      "minLength": 16,
      "maxLength": 14000000,
      "description": "Video file 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 video file (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": 30,
      "description": "Length of the analysed range in seconds (at most 30; default: to the end of the video)."
    },
    "smoothing": {
      "type": "integer",
      "minimum": 1,
      "maximum": 60,
      "default": 15,
      "description": "Smoothing window in frames on each side (larger = steadier, slower camera moves)."
    },
    "shakiness": {
      "type": "integer",
      "minimum": 1,
      "maximum": 10,
      "default": 5,
      "description": "Expected shakiness for the motion analysis (1 = little, 10 = very shaky)."
    },
    "borders": {
      "type": "string",
      "enum": [
        "zoom",
        "adaptive_zoom",
        "black",
        "keep"
      ],
      "default": "zoom",
      "description": "How to handle the borders that appear when frames are moved back."
    },
    "tripod": {
      "type": "boolean",
      "default": false,
      "description": "Lock the camera to the first frame (virtual tripod) instead of smoothing."
    },
    "quality": {
      "type": "string",
      "enum": [
        "small",
        "balanced",
        "high"
      ],
      "default": "balanced",
      "description": "H.264 quality: small (CRF 28), balanced (CRF 23) or high (CRF 19)."
    }
  }
}

Open original schema

Published input example

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

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 โ†’