Server Location
HLS Analyzer Monitoring API

HLS Analyzer Monitoring API (2.0)

Download OpenAPI specification:

REST-APIs for interfacing with the HLS Analyzer monitoring service

HLSAnalyzer.com is an online HLS analyzer and monitoring service. We follow the official HTTP Live Streaming specification (RFC 8216) and check for a variety of error conditions as well as HLS conformance points. For any HLS stream, the monitoring engine initializes the playlist buffer with segment durations greater than three times the target duration. It maintains this buffer with the arrival of each new segment while accumulating the elapsed time in the playlist refresh cycle. In addition to stream monitoring, HLSAnalyzer.com also tracks and saves all advertisement cues (SCTE-35) appearing in HLS playlists and embedded in transport streams, as well as closed captions (CEA-608/708) from video segments.

Our monitoring service will recognize a variety of SCTE-35 marker formats (shown below). When a duration field is available, the analyzer will confirm that the individual segment lengths for the advertisement match the expected duration:

Supported SCTE-35 Formats

#EXT-X-CUE-OUT:DURATION=60

...

#EXT-X-CUE-IN


#EXT-X-CUE-OUT:120

...

#EXT-X-CUE-IN


#EXT-X-CUE-OUT

...

#EXT-X-CUE-IN


#EXT-X-DATERANGE:ID="22",START-DATE=START_DATE,SCTE35-OUT=...

...

#EXT-X-DATERANGE:ID="22",START-DATE=START_DATE,SCTE35-IN=...


SCTE-35 cues embedded in the transport stream



Caption Extraction (CEA-608/708)

Our service automatically extracts and decodes closed captions from HLS video segments:

CEA-608 - Legacy line 21 closed captions

  • Standard Definition captions
  • Extracts caption text from MPEG-TS user data
  • Compatible with older broadcast standards

CEA-708 - Digital Television (DTV) closed captions

  • High Definition captions
  • Extracts caption text from MPEG-TS user data

Captions are extracted from MPEG-TS segments in real-time and made available via polling or streaming (SSE) APIs. Both JSON and SRT (SubRip) output formats are supported for easy integration with video players and transcription workflows.

The RESTful APIs documented here can add and remove HLS streams, configure stream-alerting features, and enable or disable alerts on individual streams. Our monitoring process will generate email and HTTP-based alarms when media streams encounter delivery problems or SCTE-35 cues disappear from the playlist or transport stream. These APIs enable a high level of automation that help integrate our service into your production pipeline or a CICD development and testing environment.

All API-based streams are private and can only be accessed and monitored with a corresponding API key.

Alerts

Get Global Alert Configuration

Read the global alert configuration settings.

query Parameters
apikey
required
string

Unique API key

Responses

Response samples

Content type
application/json
{
  • "email": "noname@example.com",
  • "enable": true,
  • "notifyclear": false,
  • "sensitivity": 3
}

Update Global Alert Configuration

Specify the global alert destinations, which will be used in case an alert is raised. When specified, the parameters will be tested for validity: a test email will be sent to the address provided, and the callback link will be confirmed via an HTTP POST. Alerts may also be enabled and disabled using this command.

The alert descriptions will be in JSON format, which will be emailed and POSTed when an alarm is triggered.

There are 3 sensitivty levels, increasing from least sensitive to most.Alerts are generated when 1) no data is being received (total outage), 2) when segments are slower than realtime and a specific outage duration has been accumulated (outage accumulation), or 3) when segments are delivered slower than realtime for a minimum amount of time (poor delivery).

To avoid excessive email communication, for any single stream only 10 email “STREAM Outage” alerts will be sent in 24 hours, with an additional 10 “Clear” email messages when enabled. No limits shall exist for HTTP callbacks or SCTE-35 outage alerts.

query Parameters
apikey
required
string

Unique API key

email
string

Email address to which alert messages will be sent, or “none” to remove an existing email address. Up to 3 email addresses (separated by commas) may be specified

callback
string

An HTTP address to which alert messages will be POSTed, or “none” to remove existing HTTP callback address

enable
string

enable or disable alerting [default: false]

notifyclear
string

enable or disable sending an email when an alert condition has cleared [default: false]

sensitivity
number

set alert sensitivity from 1 (least) to 3 (most)

Responses

Response samples

Content type
application/json
{}

Update Stream Outage Alert Thresholds

Specify alert limits for delivery outages in all streams. An outage condition is entered when the stream playback buffer reaches 0 seconds, or if the Media Playlist contains an “#EXT-X-ENDLIST” tag. If an outage condition continues for more than outage_seconds, an alert will be raised. The alert condition must be cleared for a contiguous clear_seconds, before a new alert may be raised for the same stream.

query Parameters
apikey
required
string

Unique API key

outage
required
integer

minimum seconds of the outage before an alert is raised [default: 120, minimum: 30; maximum: 3600]

clear
required
integer

minimum seconds for which an alert must be contiguously resolved, after which a new alert may be raised for the same outage stream [default, minimum: 300; maximum: 3600]

Responses

Response samples

Content type
application/json
{
  • "outage": 120,
  • "clear": 300
}

Get Stream Outage Alert Thresholds

Read the delivery outage alert parameters for all streams.

query Parameters
apikey
required
string

Unique API key

Responses

Response samples

Content type
application/json
{
  • "outage": 120,
  • "clear": 300
}

Get SCTE-35 Outage Alert Thresholds

Read the SCTE-35 outage alert parameters for all streams.

query Parameters
apikey
required
string

Unique API key

Responses

Response samples

Content type
application/json
{
  • "outage": 15,
  • "clear": 30
}

Update SCTE-35 Outage Alert Thresholds

Specify alert limits for SCTE-35 outages in all streams. An outage condition is entered when consecutive SCTE-35 Cue-out and Cue-in playlist parameters have not been observed for outage_minutes. The alert condition must be cleared for a contiguous clear_minutes before a new alert may be raised for the same stream.

query Parameters
apikey
required
string

Unique API key

outage
required
integer

minimum minutes of the outage before an alert is raised [default: 30, minimum: 15, maximum:720]

clear
required
integer

minimum minutes of minutes for which an alert must be contiguously resolved, after which a new alert may be raised for the same outage stream [default, minimum: 30, maximum: 720]

Responses

Response samples

Content type
application/json
{
  • "outage": 15,
  • "clear": 30
}

Update Individual Stream Outage Alert Mode

Enable or disable the stream outage alert mode for an individual link. If alerts are globally disabled, individual alerts cannot be enabled. Once a link is removed, its alert state will also be erased.

query Parameters
apikey
required
string

Unique API key

mode
required
string

mode 0: alerts disabled, mode 1: alerts enabled [default]

m3u8
string

URI of the link being monitored

linkid
string

ID of the link being monitored

Responses

Response samples

Content type
application/json
{
  • "mode": "0",
  • "linkid": "d421d046"
}

Get Individual Stream Outage Alert Mode

Get the currently enabled or disabled stream outage alerts for individual streams.

query Parameters
apikey
required
string

Unique API key

Responses

Response samples

Content type
application/json
{
  • "mode": {
    }
}

Get Individual SCTE-35 Outage Alert Mode

Get the current individually enabled or disabled SCTE-35 outage alerts.

query Parameters
apikey
required
string

Unique API key

Responses

Response samples

Content type
application/json
{
  • "mode": {
    }
}

Update Individual SCTE-35 Outage Alert Mode

Enable or disable the SCTE-35 outage alert mode for an individual link. SCTE-35 alerts are disabled by default, so they must be enabled individually for each stream. If alerts are globally disabled, individual alerts will not be enabled. Once a link is removed, its alert state will also be reset.

query Parameters
apikey
required
string

Unique AP key

mode
required
string

mode 0: alerts disabled [default], mode 1: alerts enabled

m3u8
string

URI of the link being monitored

linkid
string

ID of the link being monitored

Responses

Response samples

Content type
application/json
{
  • "mode": "0",
  • "linkid": "d421d046"
}

Records

Alert Events

Get all alert records between the start and end timestamps for the specified LinkID. Timestamps are specified in Unix timestamp mode (UTC).

query Parameters
apikey
required
string

Unique API key

linkid
required
string

ID of the stream being monitored

start
required
string

UTC timestamp

end
required
string

UTC timestamp

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    }
]

SCTE-35 Cues

Get all SCTE-35 cue records between the start and end timestamps for the specified LinkID. Timestamps are specified in Unix timestamp mode (UTC).

SCTE-35 Source Types:

  • playlist (default): SCTE-35 cues found in HLS playlist tags (#EXT-X-CUE-OUT, #EXT-X-CUE-IN, #EXT-X-DATERANGE)
  • stream: SCTE-35 cues extracted directly from the MPEG transport stream segments (when present)

Requirements for Transport Stream Extraction:

  • Segment downloading must be enabled (via /api/stream/segment?enable=true) when using source=stream
  • Playlist-based SCTE-35 (source=playlist) does not require segment downloading

Both sources support the same time-based filtering using start and end timestamps. Transport stream extraction provides more detailed SCTE-35 information including splice commands and segmentation descriptors that may not be present in playlist tags.

query Parameters
apikey
required
string

Unique API key

linkid
required
string

ID of the stream being monitored

start
required
string

UTC timestamp

end
required
string

UTC timestamp

source
string
Default: "playlist"
Enum: "playlist" "stream"

Source of SCTE-35 cues: 'playlist' (default, from HLS playlist tags) or 'stream' (extracted from transport stream)

Responses

Response samples

Content type
application/json
Example
[
  • {
    },
  • {
    },
  • {
    },
  • {
    }
]

Stream Errors

Retrieve all current errors associated with the specified LinkID and the duration between start and end UTC timestamps, for up to the 1000 most recent occurrences. LinkIDs may only be specified for both Master as well as Media playlists.

query Parameters
apikey
required
string

Unique API key

linkid
required
string

ID of the stream being monitored

start
required
string

UTC timestamp

end
required
string

UTC timestamp

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    }
]

Stream Warnings

Retrieve all current warnings associated with the specified LinkID and the duration between start and end UTC timestamps, for up to the 1000 most recent occurrences. LinkIDs may only be specified for both Master as well as Media playlists.

query Parameters
apikey
required
string

Unique API key

linkid
required
string

ID of the stream being monitored

start
required
string

UTC timestamp

end
required
string

UTC timestamp

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    },
  • {
    }
]

Streams

Add Individual Streams

Add a Master or Media HLS playlist (.m3u8). Monitoring will start immediately after the HLS URI has been added. An internal LinkID will be generated, unless it has been specified on the query string (between 6 and 32 alphanumeric characters), in which case it will be applied to the Master playlist. All variants and their generated LinkIDs will be returned in the JSON response. The available monitoring quota for the API key will be updated.

Custom HTTP Headers can be specified by adding "#http-custom-header=HeaderName:HeaderValue" to the end of any playlist URIs. The custom header will be stripped from the URI link and automatically added as an HTTP header when requesting the URIs and associated segments.

query Parameters
apikey
required
string

Unique API key

m3u8
required
string

HLS URI accessible over the public internet

linkid
string

Specify an identifier for this stream (between 6 and 32 alphanumeric characters)

Responses

Response samples

Remove Individual Streams

Remove a stream by specifying either the URI or the LinkID of the stream being monitored. Removing a stream will completely delete all its log and alert history from the system. Removing a Master playlist will also affect all of its variants. Only the top-level LinkID for a stream can be specified (individual variants within a Master playlist cannot be removed).

query Parameters
apikey
required
string

Unique API key

m3u8
string

The URI of the stream to be removed

linkid
string

The identifier of the link to be removed

Responses

Response samples

Content type
application/json

Reset Individual Stream Statistics

Reset stream statistics by specifying either the URI or the LinkID of the stream being monitored. Resetting a stream will initialize all monitoring parameters and alerts. Similar to the remove process, reseting a Master playlist will also affect all of its variants. Only the top-level LinkID for a stream can be specified (individual variants within a Master playlist cannot be reset).

query Parameters
apikey
required
string

Unique API key

m3u8
string

The URI of the link to be reset

linkid
string

The identifier of the link to be reset

Responses

Response samples

Content type
application/json

Remove All Streams

Remove all streams and their associated log and alert records from the system. This API will not wait for the completion status. Use the stream status API to determine all streams have been successfully removed.

query Parameters
apikey
required
string

Unique API key

Responses

Response samples

Content type
application/json

Individual Stream Status

Get the current status of individual Master or Media playlists. LinkIDs for individual Media playlists, or the top-level Master playlist can be specified. If no parameters are specified, the status for all streams will be returned.

query Parameters
apikey
required
string

Unique API key

m3u8
string

The URI of the link

linkid
string

The identifier of the link

Responses

Response samples

Content type
application/json
{
  • "status": {
    }
}

Segment Download Enable

Enable or disable downloading of segments for all streams of the specified API key. When disabled, only HLS playlists are monitored for outages and underflows. Segment downloading is enabled by default and is required to monitor VOD streams.

Important: Segment downloading is required for:

  • Caption extraction (CEA-608/708)
  • Transport stream SCTE-35 cue extraction

Attempting to disable segment downloads when caption extraction is enabled will result in an error. Use the force=true parameter to override this protection.

query Parameters
apikey
required
string

Unique API key

enable
required
string

enable (true) or disable (false) segment downloads [default: disabled]

force
string

Force disable segment downloads even when caption extraction is enabled (optional, default: false)

Responses

Response samples

Content type
application/json
{
  • "enable": true
}

Get Segment Download Status

Read the current segment download mode for the specified API key.

query Parameters
apikey
required
string

Unique API key

Responses

Response samples

Content type
application/json
{
  • "enable": true
}

Transport Stream Information

Retrieve detailed information about the MPEG Transport Stream (MPEG-TS) structure from HLS video segments. This endpoint provides access to Program Association Table (PAT), Program Map Table (PMT), and Packet Identifier (PID) mappings.

Transport Stream Components:

PAT (Program Association Table):

  • Lists all programs in the transport stream
  • Maps program numbers to their PMT PIDs
  • Always transmitted on PID 0

PMT (Program Map Table):

  • Describes the elementary streams for each program
  • Specifies which PIDs carry video, audio, and data
  • Includes stream type information (H.264, AAC, etc.)
  • Indicates the PCR (Program Clock Reference) PID for timing

PID Information:

  • Comprehensive mapping of all Packet Identifiers
  • Stream types: Video (H.264/H.265), Audio (AAC/AC3/MP3), Captions (CEA-608/708)
  • Special PIDs: PAT (0), PMT, PCR, and others

Use Cases:

  • Transport stream structure analysis
  • Validation of elementary stream composition
  • Debugging encoding and muxing issues
  • Automated stream monitoring and compliance checking
  • Integration with video processing pipelines

Note: This endpoint requires that transport stream parsing is enabled for your API key. Information is extracted from the most recently downloaded segment.

query Parameters
apikey
required
string

Unique API key

linkid
required
string

Unique Link ID for the HLS stream

Responses

Response samples

Content type
application/json
{
  • "pids": {
    },
  • "pat": {
    },
  • "pmt": {
    }
}

Captions

Extract and stream closed captions (CEA-608/708) from HLS video segments

Closed Captions - Polling Mode

Retrieve all currently available closed captions (CEA-608 or CEA-708) extracted from HLS video segments. This endpoint returns a snapshot of captions and closes the connection immediately.

Requirements:

  • Segment downloading must be enabled (via /api/stream/segment?enable=true)
  • Caption extraction feature must be enabled for your API key

Rate Limiting: To prevent excessive API calls, this endpoint enforces a minimum of 30 seconds between requests for the same stream.

Output Formats:

  • json: Structured JSON with sequence numbers, timestamps, duration, and content
  • srt: SubRip subtitle format compatible with most video players

Caption Types:

  • 608: Legacy CEA-608 closed captions (Line 21, CC1-CC4) for Standard Definition
  • 708: CEA-708 Digital Television captions for High Definition with enhanced formatting

Captions are extracted in real-time from MPEG-TS segments and cached for quick retrieval. For real-time streaming of captions as they arrive, use the /api/stream/captions/sse endpoint instead.

query Parameters
apikey
required
string

Unique API key

linkid
required
string

Stream identifier (LinkID) from which to retrieve captions

type
string
Default: "608"
Enum: "608" "708"

Caption type: 608 (legacy SD captions) or 708 (HD digital captions)

format
string
Default: "json"
Enum: "json" "srt"

Output format: json (structured data) or srt (SubRip subtitle format)

Responses

Response samples

Content type
Example
{
  • "linkid": "a9095a8e6ddb",
  • "type": "608",
  • "format": "json",
  • "captions": [
    ],
  • "count": 2,
  • "last_update": 1641355125
}

Closed Captions - Real-time SSE Streaming

Establish a persistent Server-Sent Events (SSE) connection for real-time caption streaming. Unlike the polling endpoint (/api/stream/captions), this maintains an open connection and pushes captions to the client as they are extracted from the video stream.

Requirements:

  • Segment downloading must be enabled (via /api/stream/segment?enable=true)
  • Caption extraction feature must be enabled for your API key

Connection Behavior:

  • Connection opens with a status message confirming stream details
  • Initial captions (if any) are sent immediately upon connection
  • New captions are pushed in real-time as they arrive from the video stream
  • Heartbeat comments (: heartbeat) sent every 10 seconds to keep connection alive
  • Connection automatically closes after 60 seconds if the stream is removed
  • Client disconnect is detected and handled gracefully

Event Types:

  • data: - Caption data in JSON or SRT format
  • : - Comment lines for heartbeats and connection status
  • Stream removal notification sent before closure

Output Formats:

  • json: Each caption as a JSON object with sequence, timestamp, duration, and content
  • srt: Each caption as SRT-formatted text blocks

Caption Types:

  • 608: Legacy CEA-608 closed captions (Line 21, CC1-CC4) for Standard Definition
  • 708: CEA-708 Digital Television captions for High Definition with enhanced formatting

Use Cases:

  • Real-time caption display in video players
  • Live transcription services
  • Closed caption monitoring and quality assurance
  • Accessibility features requiring low-latency caption delivery

Client Implementation Example:

const eventSource = new EventSource('/api/stream/captions/sse?apikey=KEY&linkid=ID&type=608&format=json');

eventSource.onmessage = (event) => {
  const caption = JSON.parse(event.data);
  console.log('New caption:', caption);
};

eventSource.onerror = (error) => {
  console.error('SSE error:', error);
  eventSource.close();
};
query Parameters
apikey
required
string

Unique API key

linkid
required
string

Stream identifier (LinkID) from which to stream captions

type
string
Default: "608"
Enum: "608" "708"

Caption type: 608 (legacy SD captions) or 708 (HD digital captions)

format
string
Default: "json"
Enum: "json" "srt"

Output format: json (structured data) or srt (SubRip subtitle format)

Responses

Response samples

Content type
text/event-stream
: connected to caption stream

data: {"status":"connected","linkid":"a9095a8e6ddb","type":"608","format":"json"}

data: {"sequence":1,"timestamp":1641355121.5,"duration":3.5,"content":"Welcome to our broadcast"}

data: {"sequence":2,"timestamp":1641355125.0,"duration":4.0,"content":"Today's top story..."}

: heartbeat

data: {"sequence":3,"timestamp":1641355129.0,"duration":3.0,"content":"Breaking news update"}

System

Global API Status

List all associated information about the API, such as the number of variants being monitored, API key expiration, remaining variant quota, etc.

query Parameters
apikey
required
string

Unique API key

Responses

Response samples

Content type
application/json
{
  • "StreamLimit": 120,
  • "TimeRemaining": "30 days",
  • "ActiveStreams": 12
}

System Health Status

Check the health status of the various system services, in addition to information about the number of streams being monitored and the aggregate download rate of all segments in kilobits per second (KBPS). This API can be called at most once every 30 seconds.

query Parameters
apikey
required
string

Unique API Key

Responses

Response samples

Content type
application/json
{
  • "StatusAlertService": "OK",
  • "StatusEmailService": "OK",
  • "StatusMonitorService": "OK",
  • "InfoDownloadRate": 11016,
  • "InfoStreamCount": 8,
  • "InfoStreamErrors": 0,
  • "InfoMonitoringTime": 108413,
  • "InfoCPUPercentage": 30.6
}

HTTP Post Test

Post Data

Use as an endpoint for testing HTTP POST alerts. All post data lengths will be limited to a maximum of 1500 characters, and the system will only keep the most recent 250 POSTs.

query Parameters
apikey
required
string

Unique API Key

Responses

Clear All Posts

Clear all HTTP POST entires from the system.

query Parameters
apikey
required
string

Unique API Key

Responses

Total Post Count

Get the total HTTP POST counts send to the system.

query Parameters
apikey
required
string

Unique API Key

Responses

Response samples

Content type
application/json
{
  • "count": 0
}

Get All Posts

Get all of the HTTP POST data that are available in the system (limited to the most recent 250 POSTs).

query Parameters
apikey
required
string

Unique API Key

Responses

Response samples

Content type
application/json
{
  • "posts": [
    ]
}