SrtCommonInputSettings interface

Settings for an SRT Input node see: NorskInput.srt()

Signature:

export interface SrtCommonInputSettings

Events

Property Type Description

onConnection?

( streamId: string, index: number, remoteHost: string, parsed?: SrtStreamIdParsed) ⇒ SrtConnectionResult

(Optional) On connect callback, notifying that a new caller has connected (in listener mode) and set the source name accordingly

onConnectionRejected?

(rejection: { streamId: string; route: string; user?: string; remoteHost: string; reason: string; }) ⇒ void

(Optional) A connection refused at the CRYPTO layer by the (route, user) passphrase table — the handshake was rejected before could run, so this is the only visibility the application gets (probe / DoS auditing). Reasons: "unknown_route" | "unknown_user" | "no_grants" (the listener has no grants and was created with requireGrants). NB a WRONG passphrase fails later in SRT’s key-material exchange and produces no event; those attempts appear only in the engine’s srt logs.

onConnectionStatusChange?

( status: SrtInputStatus, sourceName: string | undefined, index: number, health?: InputHealthStatus) ⇒ void

(Optional) Called when the connection status has changed (e.g. when the SRT socket is closed)

Properties

Property Type Description

acceptBonded?

boolean

(Optional) Listener mode only: accept bonded callers — SRT connection bonding, SRT’s equivalent of ST 2022-7. A bonded caller dials this port over several links (typically different networks); in broadcast mode every packet travels every link and the first copy to arrive is kept, in backup mode one link carries the stream and the others stand by. Either way the connection survives a link failing, and each link’s health is reported in the connection’s stats (bondLinks).

Every link is checked against the listener’s streamid grants and passphrases, exactly as a single connection is. Callers that do not bond are unaffected. Both ends must support bonding; without this setting a bonded caller is refused.

bonding?

SrtBondingSettings

(Optional) Caller mode only: dial a bonded group of links instead of host/port (which are then not used) — SRT connection bonding, SRT’s equivalent of ST 2022-7. See SrtBondingSettings. Each link’s health is reported in the connection’s stats (bondLinks). Not combinable with resolve.

cta708Charset?

Cta708CharsetSetting

(Optional) Character set used to interpret CTA-708 P16 (16-bit) captions — for East-Asian services whose P16 code set is a legacy DBCS rather than Unicode. The code set is signalled out of band, so it must be chosen per input; it does not affect Latin/ASCII text. Defaults to 'unicode'.

etr290?

boolean

(Optional) ETR 101 290 (TR 101 290) monitoring notifications for this input. Default false.

When true, every ETR 290 indicator the analyser finds (sync loss, CC errors, PAT/PMT intervals, PCR repetition and accuracy, CRC/transport errors, …​) is raised as a notification with code "etr" (the kind in labels.indicator, plus labels.priority and, where it applies, labels.ts_pid / labels.type), at most once a second per kind; a kind that has been quiet for 10 s is retracted with an NorskSettings.onNotificationCleared carrying the matching key (source plus indicator signature; the same key the raise used). The engine also logs a per-kind summary at most every 10 s.

Leave it off for sources that are not broadcast-grade: many cameras (e.g. Mevo, which sends a PCR every 120-160 ms against ETR 290’s 100 ms limit) break the limits continuously and harmlessly. Off, the analyser still runs and the norsk_etr290 metric still counts every indicator; only the notifications and the log are silenced. ts_decode_error notifications are raised either way.

Before this setting existed ETR 290 notifications were always on.

host?

string

(Optional) The IP or hostname of the remote server. Optional in caller mode when SrtCommonInputSettings.resolve is set (the address is discovered).

inputBandwidth?

number

(Optional) Input bandwidth (SRTO_INPUTBW)

listenerSockets?

number

(Optional) Listener mode only: how many sockets the listener binds on its port.

An SRT listener normally receives every connection on its port through a single receive thread, which caps what one port can carry when many sources connect to it. With listenerSockets above 1, the port is shared by that many sockets, each with its own receive and send threads, and incoming callers are spread across them by the operating system. Sources, grants and the port number are unchanged; only the capacity of the port grows.

Linux only (ignored elsewhere). 1—​32; unset or 1 means one socket, as before.

At high aggregate bitrates the host’s UDP receive buffer limit matters as much as the socket count: with the Linux default net.core.rmem_max (about 208 KB) the kernel drops packets before any receive thread sees them. Set it on the host (not in the container), e.g. sysctl -w net.core.rmem_max=33554432, and persist it under /etc/sysctl.d/. The Norsk container warns at start-up when it is low.

maxBandwidth?

number

(Optional) Max bandwidth (SRTO_MAXBW)

mode

SrtMode

The mode to act in (caller or listener)

onBind?

(info: { port: number; }) ⇒ void

(Optional) Called when a listener-mode SRT input binds to the interface

onRecording?

(event: InputRecordingEvent) ⇒ void

(Optional) Events from a recording of a source: see the node’s startRecording, and SourceRecordingSettings

overheadBandwidth?

number

(Optional) Overhead bandwidth (SRTO_OHEADBW)

passphrase?

string

(Optional) Passphrase for encryption

peerIdleTimeoutMs?

number

(Optional) libsrt’s native peer-idle timeout (SRTO_PEERIDLETIMEO), in milliseconds: the connection is declared broken when no packet of any kind (data, keepalive, ACK, control) has been received from the peer for this long — i.e. a link-death detector. Unspecified leaves libsrt’s default (5000ms).

Breaking change: this previously drove an application-level "no media delivered" timer (default 500ms) that closed the socket when media stopped even while the SRT link was healthy. That timer has been removed; because libsrt keepalives keep the native timeout from firing on a media-only stall, this no longer reacts to "connected but no media". To act on a media stall, use the per-connection health event’s InputStreamHealth.lastMediaAgeMs (via RtmpServerInputSettings.onConnectionHealth-style callbacks) or a stalled HealthThresholdsSettings verdict, and call closeConnection.

peerLatency?

number

(Optional) The latency value provided by the sender side as a minimum value for the receiver (SRTO_PEERLATENCY)

port?

number

(Optional) The port to listen on in listener mode, or to connect to in caller mode

In listener mode the port may be given as 0 to bind to an automatically assigned port, which can be retrieved in onBind. Optional in caller mode when SrtCommonInputSettings.resolve is set.

programFilter?

number

(Optional) Optionally filter a single program from MPTS at decode time

receiveLatency?

number

(Optional) The latency value in the receiving direction of the socket (SRTO_RCVLATENCY)

reportTsErrors?

boolean

(Optional) Whether decoded frames carry per-frame TR 101 290 (TS error) metrics. Only NorskInspect.qualityMonitoring() reads them; carrying them makes every frame’s quality-metrics map a per-frame allocation that is copied on each processing hop, so many-stream deployments that do no quality monitoring should set false. Default true.

resolve?

string

(Optional) Caller mode only. When set, the remote endpoint is discovered from the node-local norsk-discovery service by this logical name (an SRT listener output’s ) rather than dialing a fixed host/port. The caller connects to the resolved address, actively reconnects if the binding moves, and holds its current connection through a transient loss of the discovery service. Requires a discovery service to be configured for the instance; host/port are ignored when this is set.

sourceRecording?

SourceRecordingSettings

(Optional) Record each source’s bytes as they arrive, from the start: see SourceRecordingSettings

startupThreshold?

InputThresholdSettings

(Optional) when specified, drop data until the input is ticking at realtime

statsPollIntervalMs?

number

(Optional) Interval in milliseconds at which to sample SRT socket statistics. Stats feed metrics, so tune this to the rate at which you want metric updates. When unspecified a default is used.

statusPollIntervalMs?

number

(Optional) Interval in milliseconds at which to sample the underlying SRT socket’s connection state for the per-connection status metric (visible in the visualiser / metrics). When unspecified a default is used.

Note this does not drive : that callback fires on actual disconnection detection (a receive failure, including libsrt’s native peer-idle timeout breaking the link), not on this poll.

streamId?

string

(Optional) Stream ID to set on the socket when acting in caller mode

timeDomain?

TimeDomain

(Optional) Optional time-domain configuration. When set, the input is placed into a named coordinator and is timestamp-aligned with all other inputs sharing the same domain id within this Norsk instance. Omit for the default (uncoordinated) behaviour.

tlpktdrop?

boolean

(Optional)