Skip to content
HALOWERK

Tonwerk

clips normalize join

Each clip (own start_s/duration_s window) is converted to square pixels, fitted into the target frame (pad = letterbox/pillarbox in background_color, crop = fill and cut the overflow centred, stretch = distort), resampled to the target frame rate (ffmpeg fps filter: duplicate/drop frames) and joined with the concat filter. Audio is resampled to 48 kHz stereo; with normalize_audio each clip gets one static gain so that its integrated loudness (ITU-R BS.1770-4 / EBU R 128, measured with ffmpeg.

POST https://ton.halowerk.com/v1/clips-normalize-join

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
clipsarrayYesClips in playback order.
widthintegerNoTarget width (default: first clip, fitted into 1280x720).
heightintegerNoTarget height (default: first clip, fitted into 1280x720).
fpsnumberNoTarget frame rate (default: first clip).
fitstringNoHow clips with another aspect ratio are fitted.
background_colorstringNoColour of the pad bars as #RRGGBB.
normalize_audiobooleanNoLevel every clip to target_lufs.
target_lufsnumberNoTarget integrated loudness in LUFS (EBU R 128; -16 is common for online video, -23 for broadcast).
qualitystringNoH.264 quality: small (CRF 28), balanced (CRF 23) or high (CRF 19).
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "clips"
  ],
  "properties": {
    "clips": {
      "type": "array",
      "minItems": 2,
      "maxItems": 6,
      "description": "Clips in playback order.",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "video_base64": {
            "type": "string",
            "minLength": 16,
            "maxLength": 14000000,
            "description": "Clip 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 clip 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": 60,
            "description": "Length of the analysed range in seconds (at most 60; default: to the end of the video)."
          }
        }
      }
    },
    "width": {
      "type": "integer",
      "minimum": 64,
      "maximum": 1280,
      "multipleOf": 2,
      "description": "Target width (default: first clip, fitted into 1280x720)."
    },
    "height": {
      "type": "integer",
      "minimum": 64,
      "maximum": 1280,
      "multipleOf": 2,
      "description": "Target height (default: first clip, fitted into 1280x720)."
    },
    "fps": {
      "type": "number",
      "minimum": 5,
      "maximum": 60,
      "description": "Target frame rate (default: first clip)."
    },
    "fit": {
      "type": "string",
      "enum": [
        "pad",
        "crop",
        "stretch"
      ],
      "default": "pad",
      "description": "How clips with another aspect ratio are fitted."
    },
    "background_color": {
      "type": "string",
      "pattern": "^#?[0-9A-Fa-f]{6}$",
      "default": "#000000",
      "description": "Colour of the pad bars as #RRGGBB."
    },
    "normalize_audio": {
      "type": "boolean",
      "default": true,
      "description": "Level every clip to target_lufs."
    },
    "target_lufs": {
      "type": "number",
      "minimum": -30,
      "maximum": -10,
      "default": -16,
      "description": "Target integrated loudness in LUFS (EBU R 128; -16 is common for online video, -23 for broadcast)."
    },
    "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

{
  "clips": [
    {
      "video_url": "https://upload.wikimedia.org/wikipedia/commons/2/2c/Rotating_earth_%28large%29.gif",
      "duration_s": 1
    },
    {
      "video_url": "https://upload.wikimedia.org/wikipedia/commons/2/2c/Rotating_earth_%28large%29.gif",
      "start_s": 1,
      "duration_s": 1
    }
  ],
  "width": 320,
  "height": 320,
  "fit": "pad"
}

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