SRT¶
media.ingest.srt
Description¶
Sapsan connects to a remote SRT server and pulls MPEG-TS in caller mode. The input opens an ephemeral local UDP port, separate from listeners and publishing ports. host and port identify the remote server. See SRT publishing for incoming source connections.
Configuration¶
Configure the stream through the central API. Stream configuration fragment:
streams:
- name: source1
inputs:
- srt:
host: origin.example.com
port: 9000
stream_id: '#!::r=studio,m=request'
latency_ms: 120
peer_timeout_ms: 5000
Parameters¶
| Parameter | Description |
|---|---|
host |
remote server IP or DNS name |
port |
its UDP port. |
stream_id |
stream_id is sent when connecting. |
passphrase |
agreed encryption password. |
latency_ms |
receive latency and loss-recovery budget. |
handshake_timeout_ms |
connection timeout |
peer_timeout_ms |
data inactivity timeout. |
Authentication¶
The passphrase must match the sender. The remote server defines the stream_id format, including any access token it requires.
Transport options¶
-
UDP — client connection to the remote SRT listener.
-
ACK/ACKACK — delivery acknowledgements.
-
NAK/ARQ — retransmission requests and recovery.
-
Latency buffer — packet ordering.
-
Too-late drop — discarding late packets.
-
Keepalive — connection monitoring.
Supported codecs¶
- H.264
- HEVC / H.265
- AV1
- JPEG 2000
- MPEG-2 Video
- AAC (ADTS)
- AC-3
- E-AC-3
- MPEG Audio (Layer II / III)
- SMPTE ST 302M
MPEG-TS is the container; SRT, RIST, UDP and HTTP are delivery transports. This list describes extracting frames from MPEG-TS, not decoding them or player support.
AV1 requires stream_type 0x06 and the AV01 registration descriptor in the PMT; one PES must contain a complete temporal unit. AV1 in MPEG-TS without this signaling is not supported. AAC parsing uses ADTS; recognizing stream_type 0x11 does not establish LATM support. Opus can be identified in the PMT, but the current PES decoder does not emit its frames.
Error handling¶
Input state and failure cause are available in stream statistics. Connection loss or missing frames uses the shared retry and failover mechanisms.
Applying changes¶
Changing the address, port, passphrase, or stream_id restarts the source; changing only the timeouts applies in place.
Counters¶
The tables give exact protocol statistics field names, including event counters and current-value gauges. Zero fields may be omitted. API and Prometheus expose different projections; the full list is not necessarily present in one Admin API response. Detailed statistics depend on the counter license.
Common input totals: bytes, frames, errors, warnings. They aggregate protocol data and must not be added to protocol counters again.
Srt¶
| Field | Type |
|---|---|
incoming_bytes |
counter |
outgoing_bytes |
counter |
incoming_packets |
counter |
outgoing_packets |
counter |
incoming_lost_packets |
counter |
outgoing_lost_packets |
counter |
incoming_retransmitted_packets |
counter |
outgoing_retransmitted_packets |
counter |
incoming_recovered_packets |
counter |
missing_packets |
counter |
incoming_ack_packets |
counter |
outgoing_ack_packets |
counter |
incoming_ackack_packets |
counter |
outgoing_ackack_packets |
counter |
incoming_drop_request |
counter |
incoming_drop_requests |
counter |
outgoing_drop_requests |
counter |
incoming_nak_packets |
counter |
outgoing_nak_packets |
counter |
outgoing_drop_too_late_packets |
counter |
incoming_drop_late_seq |
counter |
incoming_drop_late_time |
counter |
incoming_drop_far_time |
counter |
incoming_drop_too_late |
counter |
incoming_drop_buffer_full |
counter |
loss_tracking_overflows |
counter |
keepalive_timeouts |
counter |
receive_buffer_size |
gauge |
send_buffer_size |
gauge |
rtt_us |
gauge |
rtt_var_us |
gauge |
source_clock_drift_us |
gauge |
memory_bytes |
gauge |
Mpegts¶
| Field | Type |
|---|---|
bytes |
counter |
sync_bytes |
counter |
packets |
counter |
frames |
counter |
errors |
counter |
errors_ts_pat |
counter |
errors_ts_service_lost |
counter |
broken |
counter |
memory_bytes |
gauge |
MpegtsPid¶
| Field | Type |
|---|---|
pid |
label |
pnr |
label |
packets |
counter |
frames |
counter |
empty_packets |
counter |
errors_adaptation_broken |
counter |
errors_ts_scrambled |
counter |
errors_ts_pmt |
counter |
errors_ts_cc |
counter |
errors_ts_tei |
counter |
errors_ts_psi_checksum |
counter |
errors_pid_lost |
counter |
broken_pes_count |
counter |
broken_pes_sum |
counter |
time_corrections |
counter |
corrected_backward_pts |
counter |
discarded_buffer_count |
counter |
discarded_buffer_sum |
counter |
fillers_count |
counter |
fillers_sum |
counter |
unpaired_fields |
counter |
warning_invalid_sibling_frames |
counter |
padding_pes_count |
counter |
padding_pes_sum |
counter |
orphan_pes_count |
counter |
dts_goes_backwards |
counter |
dts_jump_forward |
counter |
too_large_dts_jump |
counter |
pcr_resync |
counter |
pcr_jitter_ok_0 |
counter |
pcr_jitter_ok_500ns |
counter |
pcr_jitter_fail_500us |
counter |
pcr_jitter_fail |
counter |
hrd_buffer_min |
gauge |
hrd_buffer_max |
gauge |
hrd_buffer_underrun |
counter |
ad_marks |
counter |
errors_ad_marks_dropped |
counter |
warning_ad_mark_descriptors_dropped |
counter |
Other details¶
Alongside video and audio, MPEG-TS carries:
-
DVB teletext.
-
KLV metadata.
-
SCTE-35 markers.
-
Track language descriptors and DVB subtitle descriptors from the PMT.