Skip to content

Control Messages

This document specifies the control messages for keyframe requests and FPS changes.

Overview

Control messages allow coordination between components without transferring video data.

Message TypeDirectionPurpose
Keyframe RequestServer → SentinelRequest immediate keyframe
FPS Change RequestServer → SentinelChange capture framerate

Keyframe Request

Allows the Server to request an on-demand keyframe from a Sentinel.

Flow Diagram

Request Message (Server → Sentinel)

FieldTypeRequiredDescription
typestringyesMessage type identifier

Example:

{
  "type": "keyframe.request"
}

Sentinel Behavior

When the Sentinel receives a keyframe request:

  1. The next captured frame becomes an IDR frame (keyframe)
  2. A new join fragment begins with this keyframe
  3. The join fragment is sent to the Server as usual
The keyframe is generated on the next capture, not immediately. The delay depends on the current framerate. At 5 FPS, maximum delay is 200ms. At 1/5 FPS, maximum delay is 5 seconds.

Response

No explicit response message is defined. The Server knows the keyframe request was fulfilled when a new join fragment arrives.

FPS Change Request

Allows the Server to request a framerate change from a Sentinel.

Flow Diagram

Request Message (Server → Sentinel)

FieldTypeRequiredDescription
typestringyesMessage type identifier
frameratenumberyesNew target framerate (0.2 to 5)

Example:

{
  "type": "fps.change",
  "framerate": 2
}

Sentinel Behavior

When the Sentinel receives an FPS change request:

Finish Current Segment

Complete and send the current fragment with the old framerate.

Generate Keyframe

The next frame is an IDR frame, starting a new join fragment.

Apply New Framerate

Begin capturing at the new framerate.

Continue Streaming

New fragments are sent at the new framerate.

Framerate Bounds

BoundValueBehavior if Exceeded
Minimum0.2 fps (1 frame per 5 seconds)Clamp to minimum
Maximum5 fpsClamp to maximum

If the requested framerate is outside bounds, the Sentinel clamps it and applies the bounded value.

Response

No explicit response message is defined. The Server observes the framerate change via fragment metadata.

Server-Initiated vs Proctor-Initiated

MessageWho InitiatesServer’s Role
Keyframe RequestServerOriginates from Server
FPS ChangeServerOriginates from Server

The Proctor cannot directly request an FPS change or keyframe request. These are Server-side decisions based on:

  • Server load
  • Network conditions
  • Administrative policy

Timing Guarantees

MessageTiming
Keyframe RequestKeyframe on next capture (up to 1/framerate delay)
FPS ChangeTakes effect on next join fragment

Error Handling

Keyframe Request Errors

ConditionHandling
Sentinel not foundServer returns error to Proctor
Sentinel offlineServer returns error to Proctor
Request during encodingSentinel queues request for next frame

FPS Change Errors

ConditionHandling
Invalid framerateSentinel clamps to valid range
Sentinel busySentinel applies on next join fragment boundary

Message Type Summary

Type IdentifierDirectionDescription
keyframe.requestServer → SentinelRequest keyframe for a Sentinel
fps.changeServer → SentinelRequest framerate change
The message type identifiers shown are examples. Implementations may use different naming conventions as long as the semantics are preserved.
Last updated on • J.H.F.