Zum Inhalt
HALOWERK

Medienwerk

keyframes

Takes a video by URL or inline base64 and reports where the picture changes. FFmpeg measures the difference between consecutive frames; every jump above the threshold starts a new scene, and the answer lists each scene with start, end, duration and the fraction of the running time it covers, plus the raw detection score positions.

POST https://medien.halowerk.com/v1/keyframes

Eingaben

Felder des veröffentlichten Eingabeschemas
FeldTypPflichtBeschreibung
sourceobjectJaThe video. Either url or content_base64.
duration_minutesintegerNeinLength of the video in started minutes — this is what you are billed for. A longer video is refused with its real duration and nothing is charged; a shorter one simply costs what you declared, and the answer says how much less it would have been.
scene_thresholdnumberNeinFrame-to-frame difference above which a new scene starts. Lower finds more, higher finds fewer.
max_scenesintegerNeinCeiling on returned scenes. What is dropped is counted and reported.
min_scene_secondsnumberNeinMerge cuts closer together than this. Guards against flicker being read as a cut.
include_thumbnailsbooleanNeinRender one JPEG per scene and return it base64.
thumbnail_widthintegerNeinWidth of the thumbnails; height follows the aspect ratio.
max_thumbnailsintegerNeinCeiling on rendered thumbnails, independent of the scene count.
Vollständiges Eingabeschema anzeigen
{
  "type": "object",
  "required": [
    "source"
  ],
  "additionalProperties": false,
  "properties": {
    "source": {
      "type": "object",
      "additionalProperties": false,
      "description": "The video. Either url or content_base64.",
      "properties": {
        "url": {
          "type": "string",
          "maxLength": 2048,
          "description": "Public http(s) URL of the video."
        },
        "content_base64": {
          "type": "string",
          "maxLength": 12000000,
          "description": "The video inline, base64. Larger files must come by url."
        },
        "filename": {
          "type": "string",
          "maxLength": 260
        }
      }
    },
    "duration_minutes": {
      "type": "integer",
      "minimum": 1,
      "maximum": 30,
      "default": 1,
      "description": "Length of the video in started minutes — this is what you are billed for. A longer video is refused with its real duration and nothing is charged; a shorter one simply costs what you declared, and the answer says how much less it would have been."
    },
    "scene_threshold": {
      "type": "number",
      "minimum": 0.05,
      "maximum": 0.95,
      "default": 0.35,
      "description": "Frame-to-frame difference above which a new scene starts. Lower finds more, higher finds fewer."
    },
    "max_scenes": {
      "type": "integer",
      "minimum": 1,
      "maximum": 400,
      "default": 100,
      "description": "Ceiling on returned scenes. What is dropped is counted and reported."
    },
    "min_scene_seconds": {
      "type": "number",
      "minimum": 0,
      "maximum": 60,
      "default": 0.4,
      "description": "Merge cuts closer together than this. Guards against flicker being read as a cut."
    },
    "include_thumbnails": {
      "type": "boolean",
      "default": false,
      "description": "Render one JPEG per scene and return it base64."
    },
    "thumbnail_width": {
      "type": "integer",
      "minimum": 32,
      "maximum": 640,
      "default": 160,
      "description": "Width of the thumbnails; height follows the aspect ratio."
    },
    "max_thumbnails": {
      "type": "integer",
      "minimum": 1,
      "maximum": 60,
      "default": 20,
      "description": "Ceiling on rendered thumbnails, independent of the scene count."
    }
  }
}

Originalschema öffnen

Veröffentlichtes Eingabebeispiel

{
  "source": {
    "url": "https://example.com/film.mp4"
  },
  "duration_minutes": 3,
  "scene_threshold": 0.35,
  "include_thumbnails": true
}

Ergebnis & Dokumentation

Maschinenlesbare Dokumentation dieses Hubs

Quelle dieser Seite: der veröffentlichte HALOWERK-Katalog. Stand: 2026-11-01, 15:19 UTC.

Weitere Endpunkte dieses Hubs

Alle Endpunkte dieses Hubs →