Zum Inhalt
HALOWERK

Medienwerk

timestamps shift

Takes SRT or WebVTT subtitles and corrects their timing in one of two ways: either with an offset in seconds and an optional speed factor (new = old × factor + offset, e.g. 25/23.976 for a frame-rate mismatch), or with two anchors — a cue number and the time where it really belongs, for two cues far apart — from which factor and offset are calculated and reported. Cues that would start before zero are clipped to zero and counted. Output in the input format or another one (SRT, WebVTT). Pure.

POST https://medien.halowerk.com/v1/timestamps-shift

Eingaben

Felder des veröffentlichten Eingabeschemas
FeldTypPflichtBeschreibung
subtitlesstringJa
offset_secondsnumberNein
factornumberNein
anchorsarrayNeinTwo cues (1-based number) with the time they should start at. Overrides offset and factor.
output_formatstringNein
Vollständiges Eingabeschema anzeigen
{
  "type": "object",
  "required": [
    "subtitles"
  ],
  "additionalProperties": false,
  "properties": {
    "subtitles": {
      "type": "string",
      "minLength": 10,
      "maxLength": 2000000
    },
    "offset_seconds": {
      "type": "number",
      "minimum": -36000,
      "maximum": 36000,
      "default": 0
    },
    "factor": {
      "type": "number",
      "minimum": 0.5,
      "maximum": 2,
      "default": 1
    },
    "anchors": {
      "type": "array",
      "minItems": 2,
      "maxItems": 2,
      "description": "Two cues (1-based number) with the time they should start at. Overrides offset and factor.",
      "items": {
        "type": "object",
        "required": [
          "cue",
          "correct_start_seconds"
        ],
        "additionalProperties": false,
        "properties": {
          "cue": {
            "type": "integer",
            "minimum": 1
          },
          "correct_start_seconds": {
            "type": "number",
            "minimum": 0
          }
        }
      }
    },
    "output_format": {
      "type": "string",
      "enum": [
        "srt",
        "vtt"
      ]
    }
  }
}

Originalschema öffnen

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 →