Skip to content

Releases: atelier-socle/swift-srt-kit

0.3.1 — CI modernization: Swift 6.2/6.3 matrix, GitHub Actions node24

Choose a tag to compare

@github-actions github-actions released this 16 May 13:25

What's Changed

CI modernization

  • Swift 6.2 + 6.3 matrix — Build and test matrix on macOS (Xcode 26.2 / Xcode 26.4) and Linux (swift:6.2 / swift:6.3) with fail-fast: false for full coverage of both toolchains
  • Codecov deduplication — Coverage upload restricted to the Swift 6.2 slot to avoid duplicate reports
  • GitHub Actions node24 migration — All actions bumped to the minimum major version running on node24, ahead of GitHub's node20 deprecation:
Action From To
actions/checkout v4 v5
actions/upload-artifact v4 v6
actions/download-artifact v4 v7
codecov/codecov-action v5 v6
actions/upload-pages-artifact v3 v4
actions/deploy-pages v4 v5
softprops/action-gh-release v2 v3
  • Xcode 26.4 — DocC deploy and release workflows now build with Xcode 26.4 (Swift 6.3)
  • Linux release binary — Release workflow builds with swift:6.3 container

No code changes

This release contains CI/infrastructure changes only. The SRTKit library, CLI, and all public APIs are unchanged from 0.3.0.

Compatibility

  • Swift 6.2 (Xcode 26.2) — fully supported
  • Swift 6.3 (Xcode 26.4) — fully supported, zero warnings
  • All 2166 tests pass on both toolchain

New Contributors

Full Changelog: 0.3.0...0.3.1

0.3.0 — Data Packet Fix, ACK/ACKACK & Random ISN

Choose a tag to compare

@github-actions github-actions released this 14 Mar 17:54

Highlights

This release fixes critical protocol-level bugs that prevented data packets from being accepted by SRT receivers (libsrt, MediaMTX, gosrt). The root cause was a combination of duplicate message numbers, missing ACK handling, and static Initial Sequence Numbers. All fixes have been validated end-to-end against MediaMTX v1.16.3 with tcpdump wire-level comparison against the reference libsrt 1.5.4 implementation.

What's New

Data Packet Message Number (ROOT CAUSE)

  • Each send() now increments the message number (was always 0)
  • In SRT Live mode (PP=11, single message per packet), the receiver uses messageNumber for deduplication — all packets with messageNumber=0 were silently dropped as duplicates after the first
  • Wire-validated against libsrt: message numbers now match the baseline (1, 2, 3, ... wrapping at UInt26 max)

ACK/ACKACK Handling

  • Incoming ACK packets are now parsed (ACK CIF: lastACKedSequenceNumber)
  • ACKACK responses sent back to the peer (control type 0x0006, echoing ACK sequence number)
  • Send buffer properly released via pipeline.processACK()
  • Fixes send buffer overflow that occurred after ~47 seconds of streaming

Random Initial Sequence Number (ISN)

  • Caller, Listener, and Rendezvous handshakes now generate a random 31-bit ISN per IETF draft-sharabayko-srt §4.3
  • Separate ISN for send and receive directions (localInitialSequenceNumber for send, initialSequenceNumber for receive from peer)
  • Previously, ISN was always 0 and shared for both directions

Listener Extension Flags

  • Conclusion Response extension flags now dynamically include .kmreq when a KMRSP (Key Material Response) is present
  • Fixes encryption negotiation with callers that send KMREQ

Bug Fixes

Bug Impact Root Cause
messageNumber always 0 Critical All data packets dropped as duplicates by receiver
ACK ignored, no ACKACK Critical Send buffer overflow after ~47s
ISN always 0, shared send/receive Critical Data packets with wrong sequence numbers
Listener extension flags hardcoded High KMRSP not advertised in Conclusion Response

Diagnostic Methodology

The root cause was identified through wire-level tcpdump comparison between libsrt 1.5.4 (baseline) and swift-srt-kit:

Baseline word1: c000 0001 → PP=11, messageNumber=1 ✓
Swift word1:    c000 0000 → PP=11, messageNumber=0 ✗ (all packets dropped)

The receiver (libsrt in MediaMTX) accepted the first packet as message 0, then dropped every subsequent packet as a duplicate of message 0.

Stats

  • 2,166 tests across 204 suites — all passing
  • 0 warnings (swift build, xcodebuild, DocC, SwiftLint, swift-format)
  • E2E validated: 3 min H.264+AAC MPEG-TS → MediaMTX v1.16.3 → ffplay, 0 errors, 0 buffer overflow
  • Wire-validated: tcpdump comparison against libsrt 1.5.4 reference implementation

Server Compatibility

Server StreamID Format Status
MediaMTX v1.16+ publish:path Tested E2E
libsrt receivers #!::r=path,m=publish (SRT Access Control) Compatible
Haivision SRT Gateway #!::r=path,m=publish Compatible

Note: MediaMTX uses its own StreamID format (action:pathname) instead of the SRT Access Control spec (#!::r=pathname,m=action). The StreamID is user-configurable via SRTCallerConfiguration.streamID.

Migration

No breaking API changes. The HandshakeResult struct has a new localInitialSequenceNumber field with a default value of SequenceNumber(0), preserving backward compatibility for existing code.

Full Changelog: 0.2.0...0.3.0

0.2.0 — IPv6 Support & libsrt Interoperability

Choose a tag to compare

@github-actions github-actions released this 11 Mar 14:23

What's New

IPv6 Support

SRTCaller and SRTListener now fully support IPv6 addresses. Previously, connecting to localhost on macOS failed because it resolved to ::1 (IPv6) while the socket was bound to IPv4 only. Both caller and listener now detect the address family and bind accordingly.

StreamID Wire Format Fix

StreamIDExtension encode/decode now correctly inverts bytes per 4-byte chunk as required by the SRT protocol specification. This fixes interoperability with all libsrt-based implementations including MediaMTX, OBS Studio, ffmpeg, and srt-live-transmit. Previously, stream IDs were scrambled when communicating with non-swift-srt-kit peers.

Note: This is a breaking change for swift-srt-kit ↔ swift-srt-kit connections that rely on StreamID. Both peers must upgrade to 0.2.0.

Changes

  • SRTPeerAddress.from(_:) — new static method for proper IPv4/IPv6 socket address extraction
  • SRTCaller.setupTransport() — binds :: for IPv6, 0.0.0.0 for IPv4
  • StreamIDExtension.encode() — each 4-byte group written as UInt32 word per SRT spec
  • StreamIDExtension.decode() — each 4-byte group read as UInt32 word per SRT spec
  • Version bumped across CLI, documentation, and README

Compatibility

  • Swift 6.2+
  • macOS (arm64, x86_64), Linux (x86_64)
  • 2,166 tests passing

Full Changelog: 0.1.0...0.2.0

0.1.0 — Initial Release

Choose a tag to compare

@github-actions github-actions released this 03 Mar 17:34

Pure Swift implementation of the Secure Reliable Transport (SRT) protocol. No C dependencies — this is not a libsrt wrapper.

Highlights

  • Pure Swift — zero C dependencies, complete protocol implementation from UDP up
  • Interop validated — bidirectional encrypted communication with libsrt 1.5.4
  • 2163 tests across 204 suites, 96%+ code coverage
  • Cross-platform — macOS, iOS, tvOS, watchOS, visionOS, and Linux

Connection Modes

  • SRTCaller — connect to a remote SRT listener
  • SRTListener — accept incoming SRT connections
  • Rendezvous — simultaneous peer-to-peer connection

Encryption

  • AES-CTR and AES-GCM cipher modes (128/192/256-bit keys)
  • PBKDF2 key derivation (RFC 2898)
  • RFC 3394 AES Key Wrap for stream encryption keys
  • Automatic even/odd key rotation with pre-announce

Reliability & Error Correction

  • ACK/NAK-based retransmission with configurable intervals
  • Forward Error Correction (FEC) — row, column, and matrix XOR recovery
  • Configurable ARQ modes (always, onreq, never)
  • TSBPD timing with clock drift correction and too-late packet drop

Connection Bonding

  • Broadcast — send to all links simultaneously
  • Main/Backup — automatic failover with stability monitoring
  • Balancing — weighted aggregate across links with packet deduplication

Congestion Control

  • LiveCC — packet pacing for real-time streams
  • FileCC — AIMD with slow start for bulk transfers
  • AdaptiveCC — pattern detection with automatic mode switching
  • Pluggable architecture via CongestionControllerPlugin protocol

Bandwidth Probing

  • Stepped probe engine with quick/standard/thorough presets
  • Auto-configuration generation (recommended bitrate + latency)
  • Real-time bitrate monitoring with hysteresis

Statistics & Monitoring

  • Comprehensive metrics: packets, bytes, RTT, bandwidth, buffers, FEC, encryption
  • 5-metric weighted quality scoring (excellent/good/fair/poor/critical)
  • Prometheus text exposition format
  • StatsD datagram export

Access Control

  • StreamID parsing and generation (#!:: format)
  • Resource, mode, session, user, content type, and custom keys

Configuration

  • SRTConfigurationBuilder with fluent API
  • 6 presets: lowLatency, balanced, reliable, highBandwidth, broadcast, fileTransfer
  • Server presets: AWS MediaConnect, Nimble Streamer, Haivision, OBS, Wowza, vMix, SRT Live Server
  • Full option validation with descriptive errors

Additional Features

  • Auto-reconnect with exponential backoff and jitter
  • Multi-caller for simultaneous multi-destination publishing
  • Multi-stream multiplexing over single listener
  • Stream recording with size/duration-based rotation (MPEG-TS or raw)

CLI

srt-cli with 6 commands: send, receive, probe, stats, test, info

Platforms

Platform Minimum
macOS 14+
iOS 17+
tvOS 17+
watchOS 10+
visionOS 1+
Linux Swift 6.2

Standards

RFC 2898 (PBKDF2), RFC 3394 (AES Key Wrap), NIST SP 800-38A (AES-CTR), NIST SP 800-38D (AES-GCM), IETF Draft SRT Protocol

Full Changelog: https://github.com/atelier-socle/swift-srt-kit/commits/0.1.0