Skip to content
HALOWERK

Tonwerk

picture in picture

The speaker clip is scaled to size_percent of the screen width (height from its display aspect ratio; circle = centre square crop), masked with an anti-aliased rectangle, rounded-rectangle (corner radius 12 % of the shorter side) or circle mask, optionally framed by a border of border_px in border_color, and overlaid with ffmpeg 6.1 at the chosen corner with margin_px from the frame edge to the outer border. The overlay starts at speaker_offset_s of the screen window and disappears when the.

POST https://ton.halowerk.com/v1/picture-in-picture

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
screen_base64stringNoMain video (screen recording) 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).
screen_urlstringNoPublic http(s) URL of the main video (screen recording) (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 60; default: to the end of the video).
speaker_base64stringNoSpeaker (camera) 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).
speaker_urlstringNoPublic http(s) URL of the speaker (camera) video (at most 10 MiB; private, local and reserved addresses are refused).
positionstringNoCorner of the picture-in-picture.
size_percentnumberNoWidth of the speaker picture as percent of the screen width.
margin_pxintegerNoDistance from the frame edges to the outer edge (border included).
shapestringNoShape of the speaker picture.
border_pxintegerNoBorder width in pixels.
border_colorstringNoBorder colour as #RRGGBB.
speaker_offset_snumberNoTime in the screen window at which the speaker picture starts.
audiostringNoWhich audio to keep.
qualitystringNoH.264 quality: small (CRF 28), balanced (CRF 23) or high (CRF 19).
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "screen_base64": {
      "type": "string",
      "minLength": 16,
      "maxLength": 14000000,
      "description": "Main video (screen recording) 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)."
    },
    "screen_url": {
      "type": "string",
      "format": "uri",
      "pattern": "^https?://",
      "maxLength": 2048,
      "description": "Public http(s) URL of the main video (screen recording) (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)."
    },
    "speaker_base64": {
      "type": "string",
      "minLength": 16,
      "maxLength": 14000000,
      "description": "Speaker (camera) 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)."
    },
    "speaker_url": {
      "type": "string",
      "format": "uri",
      "pattern": "^https?://",
      "maxLength": 2048,
      "description": "Public http(s) URL of the speaker (camera) video (at most 10 MiB; private, local and reserved addresses are refused)."
    },
    "position": {
      "type": "string",
      "enum": [
        "top_left",
        "top_right",
        "bottom_left",
        "bottom_right"
      ],
      "default": "bottom_right",
      "description": "Corner of the picture-in-picture."
    },
    "size_percent": {
      "type": "number",
      "minimum": 10,
      "maximum": 50,
      "default": 25,
      "description": "Width of the speaker picture as percent of the screen width."
    },
    "margin_px": {
      "type": "integer",
      "minimum": 0,
      "maximum": 200,
      "default": 24,
      "description": "Distance from the frame edges to the outer edge (border included)."
    },
    "shape": {
      "type": "string",
      "enum": [
        "rectangle",
        "rounded",
        "circle"
      ],
      "default": "rectangle",
      "description": "Shape of the speaker picture."
    },
    "border_px": {
      "type": "integer",
      "minimum": 0,
      "maximum": 20,
      "default": 0,
      "description": "Border width in pixels."
    },
    "border_color": {
      "type": "string",
      "pattern": "^#?[0-9A-Fa-f]{6}$",
      "default": "#FFFFFF",
      "description": "Border colour as #RRGGBB."
    },
    "speaker_offset_s": {
      "type": "number",
      "minimum": 0,
      "maximum": 3600,
      "default": 0,
      "description": "Time in the screen window at which the speaker picture starts."
    },
    "audio": {
      "type": "string",
      "enum": [
        "auto",
        "screen",
        "speaker",
        "mix"
      ],
      "default": "auto",
      "description": "Which audio to keep."
    },
    "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

{
  "screen_url": "https://upload.wikimedia.org/wikipedia/commons/2/2c/Rotating_earth_%28large%29.gif",
  "speaker_url": "https://upload.wikimedia.org/wikipedia/commons/2/2c/Rotating_earth_%28large%29.gif",
  "duration_s": 2,
  "size_percent": 30,
  "shape": "circle",
  "border_px": 3
}

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