UdpTsInputSettings interface

Settings for a UDP Transport Stream input see: NorskInput.udpTs()

Signature:

export interface UdpTsInputSettings extends RemoteInputSettings<UdpTsInputNode>, TsCommonInputSettings, StreamStatisticsMixin

Properties

Property Type Description

allowedSourceAddresses?

string[]

(Optional) Only accept datagrams from these source IP addresses (exact match, v4 or v6). Empty/undefined = accept from anywhere. The only admission control a connection-less input can have: datagrams from other sources are dropped before demux (logged engine-side once per source), never delivered.

chaosDropPackets?

DropRandom

(Optional) Drop raw input packets ala NorskTransform.streamChaosMonkey(). Leaving this undefined means don’t drop any packets For testing, you really don’t want this in a live system.

healthSampling?

HealthSamplingSettings

(Optional) Per-input health sampling. Emits periodic TsConnectionHealth events via TsCommonInputSettings.onConnectionHealth. On by default; set enabled: false to disable or intervalSeconds to tune the cadence.

healthThresholds?

HealthThresholdsSettings | "recommended"

(Optional) Opt-in thresholds that turn the health samples into degraded / recovered events on TsCommonInputSettings.onHealthStatusChange, as SrtInputSettings.healthThresholds. Pass "recommended" for sensible defaults. stalledMs is judged as media goes missing, not on the next sample, so it can tell a failed source well before the input times out. Needs healthSampling (on by default).

interface?

string

(Optional) Optional interface to bind to

rtpDecapsulate?

boolean

(Optional) Whether to expect the input TS to be encapsulated in RTP via RFC 2250 (default: false)

seamlessProtection?

SeamlessProtectionSettings

(Optional) ST 2022-7 seamless protection switching. The settings above describe the primary path; this adds a second one carrying an identical copy of the stream, and the two are merged by RTP sequence number so that losing either path is invisible downstream.

Both paths must carry the SAME stream (same SSRC, same sequence numbers). If they do not, the redundant one is ignored and the input runs unprotected on the primary rather than failing.

senderPolicy?

"lockFirst" | "latest"

(Optional) What the input does when a second sender’s datagrams arrive on its port. A UDP port has no connections, so nothing stops two encoders pushing to it at once; demuxed as one stream their interleaved packets are garbage.

- "lockFirst" (default): the first sender admitted (address AND port) holds the input until it goes idle (timeout) or is kicked (UdpTsInputNode.closeSource()); every other sender’s datagrams are dropped and counted, and reported per sender on the connection health (stats.droppedSenders, with the holder as stats.sender). A restarted encoder on a new source port is taken after the idle timeout, as before. - "latest": every admitted datagram is delivered, whoever sent it: the behaviour before the lock existed.

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

timeout?

number

(Optional) Timeout in milliseconds before determining the input is closed