Skip to content
HALOWERK

File Formats and Conversion

media playlist boundary snap

HLS cut planning finds the nearest segment boundary to a requested cut time, choosing the earlier boundary on ties. Use it when an agent needs a segment-aligned edit point.

POST https://format.halowerk.com/v1/media-playlist-boundary-snap

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
playliststringYes
cut_secondsnumberYes
Show full input schema
{
  "type": "object",
  "properties": {
    "playlist": {
      "type": "string",
      "maxLength": 18000,
      "minLength": 1
    },
    "cut_seconds": {
      "type": "number",
      "minimum": 0,
      "maximum": 8640000
    }
  },
  "required": [
    "playlist",
    "cut_seconds"
  ],
  "additionalProperties": false
}

Open original schema

Published input example

{
  "playlist": "#EXTM3U\n#EXT-X-VERSION:3\n#EXT-X-TARGETDURATION:2\n#EXT-X-MEDIA-SEQUENCE:10\n#EXT-X-PLAYLIST-TYPE:VOD\n#EXTINF:2.005333,\nstudio-tone-010.ts\n#EXTINF:2.005333,\nstudio-tone-011.ts\n#EXTINF:2.005333,\nstudio-tone-012.ts\n#EXTINF:0.526667,\nstudio-tone-013.ts\n#EXT-X-ENDLIST\n",
  "cut_seconds": 3
}

Result & documentation

Show published result schema
{
  "type": "object",
  "required": [
    "measured_at",
    "source",
    "data",
    "limitations"
  ],
  "properties": {
    "measured_at": {
      "type": "string"
    },
    "source": {
      "type": "object",
      "required": [
        "reference",
        "retrieved_at"
      ],
      "properties": {
        "reference": {
          "type": "string"
        },
        "retrieved_at": {
          "type": "string"
        }
      }
    },
    "data": {
      "type": "object",
      "properties": {
        "boundary_seconds": {
          "type": "number"
        },
        "error_seconds": {
          "type": "number"
        },
        "following_sequence": {
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "required": [
        "boundary_seconds",
        "error_seconds",
        "following_sequence"
      ]
    },
    "limitations": {
      "type": "string"
    }
  }
}

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-12-05 UTC.

More endpoints in this hub

All endpoints in this hub โ†’