Merge branch 'claude/gifted-lovelace-1crlx2' into worktree-agent-a5ecbed1e5dd55ddc
# Conflicts: # tools/voelinctl/src/stream.rs
This commit is contained in:
commit
92344651ca
28 files changed
+2454
-299
No files matched your search
@@ -246,6 +246,44 @@ Transport details of our stream (`voelin-stream`):
|
||||
patch for it (`VOELIN-PATCH.md`). The order is a setting
|
||||
(`Streams::set_srtp_profiles`, `Command::SetSrtpProfiles`) and applies to
|
||||
new connections.
|
||||
- **Media that does not get through**: a connection can come up and carry
|
||||
nothing (an SRTP library that negotiates a profile it cannot use, a
|
||||
streamer without an encoder for the codec the answer took). Each peer
|
||||
checks once per connection: a viewer's reports `PeerEvent::NoVideo`
|
||||
(with whether audio came) when no video arrived within
|
||||
`PeerConfig::stall_timeout` (5 s); a streamer's reports
|
||||
`PeerEvent::NoFeedback` when, after twice that, no receiver report (or
|
||||
REMB) of the viewer mentioned our video. Keyframe requests do not count:
|
||||
a viewer that gets nothing keeps asking. The sessions then ask for a new
|
||||
connection with the next lower set and log the step: without the SRTP
|
||||
profile that was negotiated (both AEAD profiles when it was one of
|
||||
them), or without the video codec when audio came and video did not. A
|
||||
viewer sends `reconnect`; a streamer sends a `reconnectOffer` of its own,
|
||||
for viewers that do not step down (it waits twice as long, so a Voelin
|
||||
viewer goes first). One layer up, the app's `media::Viewer` judges by
|
||||
decoded pictures: video of one codec that keeps coming (10 s, at least
|
||||
60 frames) without a single picture, every decoder of the codec's
|
||||
ladder having failed, makes it send `Command::StreamUndecodable`, and
|
||||
the viewer asks for a connection without that codec
|
||||
(`Streams::video_undecodable`). What was left out stays out for that
|
||||
viewer or watched stream; when nothing is left, that is logged and
|
||||
nothing loops.
|
||||
- **mDNS candidates**: host candidates behind `<uuid>.local` names (how
|
||||
browsers and other libwebrtc builds hide host addresses) are resolved by
|
||||
a multicast DNS query (`voelin_stream::mdns`, from port 5353 shared with
|
||||
the system's responder: Chromium's answers nothing else) and added as
|
||||
plain candidates, from offers, answers and trickled candidates alike.
|
||||
- **Losses**: each peer socket asks for 4 MB of receive and send buffer
|
||||
(`PeerConfig::udp_buffer`; Linux caps it at `net.core.rmem_max`, and
|
||||
what was granted is logged, with a hint when it is less): the default
|
||||
208 KB overflowed under a 1440p keyframe on loopback (118-209 datagrams
|
||||
per 5 s of a 9 Mbit/s stream), the larger buffer dropped none
|
||||
(`tests/loopback.rs` `high_bitrate_bursts`). What is still lost is
|
||||
repaired by NACK and retransmission (RTX), which our answers keep for
|
||||
every video codec; str0m waits up to 30 complete frames for a
|
||||
retransmission before it hands a frame over as non-contiguous
|
||||
(`losses_are_repaired_by_retransmission`: one packet in 25 lost, every
|
||||
frame whole).
|
||||
- **Bandwidth estimation and pacing**: each viewer connection of our stream
|
||||
runs str0m's send-side estimation (transport-cc feedback; REMB if a viewer
|
||||
sends only that) and paces packets to it. Estimates are per viewer
|
||||
@@ -299,6 +337,62 @@ does not answer. Our own stream registers itself in the directory when it
|
||||
goes live (title, kind, channel, client), updates its viewer count, and is
|
||||
removed when it ends.
|
||||
|
||||
## Negotiation: best first, then fall back
|
||||
|
||||
Wherever Voelin agrees on parameters with a peer or a system component, it
|
||||
tries the best choice first and steps down towards the most compatible one
|
||||
when the better one is not accepted. "Not accepted" is either refused in
|
||||
the negotiation itself (SDP, handshake, a backend's start) or found failing
|
||||
at runtime. The second matters: the official client answers H.264 it
|
||||
cannot decode and then shows nothing, so for codecs "accepted" is not
|
||||
"works", and a streamer cannot see a viewer's decoder. Audit of
|
||||
2026-10-03:
|
||||
|
||||
| Point | Ladder (best → most compatible) | Not accepted means | State |
|
||||
|---|---|---|---|
|
||||
| Video codec, streamer offer | stream codec (configured, else the first of the encoder preference every TeamSpeak client decodes) → AV1, VP9, VP8 of hardware encoders and VP8 of libvpx → H.264 of hardware → HEVC | SDP: the answer lists what the viewer takes; our first one it took is sent (`PeerEvent::VideoCodec`), one encoder per format. At runtime undetectable for the official client: without OpenH264 it answers H.264, decodes nothing and reports success (libwebrtc's `NullVideoDecoder`, no PLI) | already so; deliberately not best-first for H.264: codecs every client decodes come before it, because the streamer cannot see that failure |
|
||||
| Video codec, viewer answer | the offer's order, limited to what we decode; each codec's decoders hardware → FFmpeg software → built-in ([media.md](media.md)) | SDP: no codec in common → refused with the reason (`PeerError::NoCommonCodec`); an official streamer that does not encode our pick re-offers on the same connection (`Peer::renegotiate`). Runtime: audio comes, video does not for `stall_timeout` (`PeerEvent::NoVideo { audio: true }`), or video comes and no picture decodes for 10 s and 60 frames, every decoder of the ladder having failed (`media::Viewer`, `Command::StreamUndecodable`) → `reconnect` without that codec | renegotiation already so; both runtime steps **changed now** (`viewer_falls_back_to_another_codec`, `undecodable_video_falls_back_to_another_codec`, `undecodable_video_is_noticed_through_the_pipeline`) |
|
||||
| H.264 profile | Constrained High (PT 112) → Constrained Baseline (PT 108) | SDP: the answer takes only the Baseline entry (headless Chromium 152) → that viewer's frames come from an encoder in Constrained Baseline | **changed now** (`a_baseline_only_viewer_gets_the_fallback_profile`, `an_encoder_per_h264_profile_viewers_chose`, browser: 90 of 90 frames, SPS profile 66). Android's MediaCodec encoder makes High only |
|
||||
| H.264 level, packetization | the level the stream needs (at least 3.1); packetization mode 1 | `level-asymmetry-allowed=1`; a peer without mode 1 does not take H.264 and gets the next codec | level: unchanged, not a ladder. The app offers 3.1 whatever the share's size (its peer configuration is made before the share starts; `voelinctl` sets the level): open issue |
|
||||
| SRTP profile | AES_CM_128_HMAC_SHA1_80 → AEAD_AES_128_GCM → AEAD_AES_256_GCM | handshake: the DTLS server (we are, with official clients and browsers) takes the first of its order the client offers. Runtime: connected, nothing gets through (`NoVideo { audio: false }` at the viewer, `NoFeedback` at the streamer) → a new connection without the negotiated profile (without both AEAD ones if it was AEAD) | runtime ladder **changed now** (`viewer_falls_back_when_srtp_fails`, `streamer_falls_back_when_its_viewer_gets_nothing`, `browser_srtp_failure_is_noticed`). The order stays most-compatible-first, see below |
|
||||
| DTLS version, cipher suite | 1.2 (str0m's default); ECDHE-ECDSA AES-128-GCM, AES-256-GCM (dimpl) | in the handshake: Chromium 152 offers 1.3 and 1.2 and gets 1.2; the server picks the suite from the client's list | already so; 1.3 not turned on, see below |
|
||||
| ICE | host (configured, else the primary IPv4) → server-reflexive (TeamSpeak's STUN, trickled) → peer-reflexive; remote `<uuid>.local` names resolved by mDNS | pairs that fail their checks drop out, the best working pair is used; an mDNS name nobody answers within 3 s is dropped (debug log) | mDNS **changed now** (`browser_mdns_candidates_connect`); the rest already so. No TURN (TeamSpeak runs none), no IPv6 gathering |
|
||||
| Stream connection | renegotiation on the running connection (a new `offer` signal) → a new connection (`reconnect` / `reconnectOffer`), each fallback step one more → the watch ends | a viewer whose connection closes asks again, three times, then the watch ends with `Failed`; fallback steps do not count against those three | renegotiation and reconnect already so, fallback steps **changed now**; no automatic `joinstreamrequest` again: a streamer may have to accept it by hand, so the user decides |
|
||||
| Simulcast | one layer per viewer by its bandwidth estimate (TeamSpeak); RID simulcast only with `PeerConfig::simulcast` (SFU, WHIP) | an answer without `a=simulcast` leaves a RID peer without video | not changed: RID is opt-in and only `voelinctl --simulcast` turns it on; offer it only to peers that take it |
|
||||
| Bandwidth feedback | transport-cc → REMB | a viewer without transport-cc feedback: its REMB estimates are used | already so |
|
||||
| Socket buffers | 4 MB → what the system grants (`rmem_max`) | the kernel caps `SO_RCVBUF`; logged, once with a hint | **changed now** (`high_bitrate_bursts`: 118-209 drops per 5 s before, none after) |
|
||||
| Loss repair | NACK + retransmission → after 30 complete frames, the frame is handed over non-contiguous → keyframe request | the depacketizer gives up waiting | already so, verified now (`losses_are_repaired_by_retransmission`) |
|
||||
| Opus | 48 kHz stereo, 128 kbit/s music mode, 20 ms, in-band FEC on (5 %), DTX off; SDP `minptime=10;useinbandfec=1` | fmtp differences do not refuse a codec (str0m scores the match), and every Opus decoder takes every mode | already so, no ladder needed. Our answers lack `stereo=1`, so libwebrtc streamers send us mono; our playback is mono anyway |
|
||||
| WHIP output | the studio's one codec + Opus; one host candidate | the service refuses → the output fails with its answer | not changed: a second codec would need a second encode; no STUN/TURN yet ([studio.md](studio.md)) |
|
||||
| Gateway protocol | subprotocol `tsgw.v1+json`; features by `capabilities` | a gateway without a feature: the client hides it; unknown fields are ignored, unknown message types answered `unknown_type` | already so; a `v2` would be offered first as a second subprotocol once it exists |
|
||||
| TeamSpeak client version | the configured signed version, else the vendored default (`Windows_3_X_X__1`); the legacy UDP protocol on TS3 and TS6 | a server that refuses the version ends the connection with its error | not done: no server here refuses the default; retrying with the newest signed version (`Versions.csv`, only `voelinctl` reads it) needs that refusal recognised first. TS6's protobuf transport is not implemented |
|
||||
| Capture buffers | DMA-BUF in the sink's tiled modifiers → LINEAR DMA-BUF → shared memory | the compositor fixates the format; a LINEAR mapping slower than 1 ns per pixel over 30 frames renegotiates to shared memory; a failed GPU conversion or an encoder that needs frames in memory declines DMA-BUFs | already so |
|
||||
| Capture backend | Android's provider → the ScreenCast portal (Wayland) → X11 (`DISPLAY`) → Windows Graphics Capture; or the backend set | the backend that cannot start fails the share with its reason; a cancelled portal dialog is not a failure | not changed: falling back from the portal to X11 on Wayland would capture XWayland only (black for Wayland windows); wlroots screencopy is the candidate for compositors without a portal |
|
||||
| Encoder backend | the preference: hardware (VA-API, NVENC, Quick Sync, AMF, VideoToolbox, Media Foundation, MediaCodec) → libvpx VP8 → x264, OpenH264 → libvpx VP9 → SVT-AV1, libaom; a named backend first | at start-up each backend's self-test (one keyframe) leaves out what fails, with the reason; at runtime an encoder that fails logs and tries again with the next frame | start-up already so; switching backends after runtime failures not done |
|
||||
|
||||
Not turned on, with the evidence:
|
||||
|
||||
- **AEAD-first SRTP order.** AES-GCM is the better profile, and the
|
||||
fallback works: when SRTP fails after an AES-GCM handshake, our streamer
|
||||
notices (`NoFeedback`, also with headless Chromium as the viewer) and
|
||||
offers AES_CM_128_HMAC_SHA1_80, and our viewer asks for it. But the
|
||||
streamer's half needs the viewer to answer a `reconnectOffer` it did not
|
||||
ask for, and nothing shows that the official client does; how official
|
||||
clients failed with AES-256-GCM is only reported; and streams between
|
||||
official clients reportedly use AES_CM_128_HMAC_SHA1_80, which suggests
|
||||
they offer nothing else, where the order changes nothing. The gain (a
|
||||
cheaper cipher) does not justify the risk until the official client is
|
||||
tried (steps under the open questions of
|
||||
[protocol-notes/ts6-streaming.md](protocol-notes/ts6-streaming.md#open-questions)).
|
||||
- **DTLS 1.3.** With dimpl allowed to (str0m's `DtlsVersion::Auto`),
|
||||
headless Chromium 152 negotiates DTLS 1.3 (`FEFC`, `TLS_AES_128_GCM_SHA256`)
|
||||
and decodes 90 of 90 frames, and its ClientHello also offers 1.2, which
|
||||
is what our 1.2-only peers get. But a DTLS handshake that fails closes
|
||||
the connection without a version step (a reconnect uses the same
|
||||
settings), the official client's DTLS 1.3 is untried, and all 1.3 would
|
||||
save is one round trip while connecting, nothing for the stream. It
|
||||
stays off.
|
||||
|
||||
## Settings
|
||||
|
||||
`voelin-core::settings::Settings` is the settings service. Keys are typed
|
||||
|
||||
+38
-20
@@ -155,16 +155,20 @@ viewer: Engine::subscribe_frames ─ VideoPipeline (thread) ─ VideoDecoder
|
||||
retime, the portal renegotiates the rate with the compositor).
|
||||
- One encoder per codec viewers chose: the offer lists several codecs (see
|
||||
`peer_config` below), the streamer's peer reports the codec each answer
|
||||
chose (`PeerEvent::VideoCodec`), and the session sends a video frame only
|
||||
to viewers of its codec (`StreamerSession::write_frame_in`) and tells the
|
||||
encoders which codecs are wanted (`LayerFeedback::set_codecs`,
|
||||
`MediaSink::video_codecs`). Each layer's encoder thread keeps the stream
|
||||
codec's encoder and makes one more per other wanted codec when a viewer
|
||||
needs it (with the streamer's current `Codecs` and preference), drops it
|
||||
when none does, and skips the stream codec while nobody takes it; frames
|
||||
go out through `MediaSink::send_video(frame, codec)`. Sinks that do not
|
||||
tell codecs apart (`EncodedSource`, a `FrameSource`) get the stream codec
|
||||
only, so their offers must list it alone (`voelinctl stream start` does).
|
||||
chose, H.264 with its profile (`PeerEvent::VideoCodec(VideoFormat)`), and
|
||||
the session sends a video frame only to viewers of its format
|
||||
(`StreamerSession::write_frame_in`) and tells the encoders which formats
|
||||
are wanted (`LayerFeedback::set_codecs`, `MediaSink::video_codecs`).
|
||||
Each layer's encoder thread keeps the stream codec's encoder and makes
|
||||
one more per other wanted format when a viewer needs it (with the
|
||||
streamer's current `Codecs` and preference; for H.264 Constrained
|
||||
Baseline with `EncoderConfig::h264_profile` set), drops it when none
|
||||
does, and skips the stream codec while nobody takes it; frames go out
|
||||
through `MediaSink::send_video(frame, format)`. So an H.264 stream runs a
|
||||
second H.264 encoder only while a viewer took the Baseline entry of the
|
||||
offer. Sinks that do not tell formats apart (`EncodedSource`, a
|
||||
`FrameSource`) get the stream codec only, so their offers must list it
|
||||
alone, H.264 in Constrained High only (`voelinctl stream start` does).
|
||||
A studio's outputs count as viewers too: the stream codec always runs
|
||||
for its recordings and replay buffer, and an output that needs a codec of
|
||||
its own (RTMP: H.264) gets an encoder of the layer it takes
|
||||
@@ -198,13 +202,18 @@ viewer: Engine::subscribe_frames ─ VideoPipeline (thread) ─ VideoDecoder
|
||||
decodes H.264 only with an OpenH264 library it downloads at start-up; when
|
||||
that fails it still answers H.264 and shows nothing (see
|
||||
`docs/protocol-notes/ts6-streaming.md`), so H.264 never comes before a
|
||||
codec it always decodes. H.264 is offered as one variant, Constrained High
|
||||
(packetization mode 1) at the level the stream needs
|
||||
(`PeerConfig::set_h264_format(profile, width, height, fps, bitrate)`:
|
||||
macroblocks per second and per frame, and bitrate, per H.264 Table A-1;
|
||||
never below 3.1, the level offered before); str0m's other H.264 variants
|
||||
are only accepted, never offered, so a viewer cannot answer a profile we
|
||||
do not send.
|
||||
codec it always decodes. H.264 is offered in two variants, best first:
|
||||
Constrained High (payload type 112), then Constrained Baseline (108) for
|
||||
peers that list no High profile (headless Chromium 152's libwebrtc lists
|
||||
only Baseline, Constrained Baseline and Main), both packetization mode 1
|
||||
at the level the stream needs (`PeerConfig::h264_profile_level_ids`,
|
||||
`set_h264_format(width, height, fps, bitrate)`: macroblocks per second
|
||||
and per frame, and bitrate, per H.264 Table A-1; never below 3.1, the
|
||||
level offered before). A viewer that takes both answers High (the
|
||||
streamer writes the first of its own order the answer lists); one that
|
||||
takes only Baseline gets frames from an encoder in Constrained Baseline
|
||||
(above). str0m's other H.264 variants are only accepted, never offered,
|
||||
so a viewer cannot answer a profile we do not send.
|
||||
- `VideoPipeline` decodes on its own thread, with the first decoder of the
|
||||
stream codec's ladder that opens (`Codecs::decoders_for`, see
|
||||
[FFmpeg decoders](#ffmpeg-decoders-loaded-at-runtime)). It starts at a
|
||||
@@ -233,8 +242,15 @@ viewer: Engine::subscribe_frames ─ VideoPipeline (thread) ─ VideoDecoder
|
||||
which runs in the app, not sent as engine events: the engine never sees
|
||||
the decoded pictures.
|
||||
- `Viewer` feeds a `VideoPipeline` from the engine and sends
|
||||
`RequestStreamKeyframe`; `LocalPreview` runs capture → encoder → decoder
|
||||
without a server (the desktop app's `VOELIN_DEMO_STREAM`).
|
||||
`RequestStreamKeyframe`. When video of one codec keeps coming (10 s, at
|
||||
least 60 frames: time for every decoder of the ladder to fail) and not a
|
||||
single picture decodes, it sends `Command::StreamUndecodable` once: the
|
||||
stream session asks for a new connection without that codec, if the
|
||||
streamer offered another we take (the negotiation ladder in
|
||||
[architecture.md](architecture.md#negotiation-best-first-then-fall-back)).
|
||||
A codec that decoded once is never reported. `LocalPreview` runs capture
|
||||
→ encoder → decoder without a server (the desktop app's
|
||||
`VOELIN_DEMO_STREAM`).
|
||||
- Viewer counts come from the server: `StreamInfo::viewers` in
|
||||
`Event::StreamsChanged` is TeamSpeak 6's own count (`viewer` of
|
||||
`notifystreaminfo`), counted up from `notifystreamclientjoined` and
|
||||
@@ -1258,7 +1274,9 @@ has not run on Windows yet.
|
||||
| AMF never loaded on Linux by default; AMF opens serialised | `ffmpeg::encoder::tests::amf_is_opt_in_on_linux`, `tests/ffmpeg.rs` `probe_reports_every_backend` (no `libamfrt` in `/proc/self/maps`), `amf_encoders_open_in_parallel` (`--ignored`, with `VOELIN_FFMPEG_AMF=1`) | tested: the probe crash (SIGSEGV in `libamfrt64`, 10 of 420 concurrent probes under Xvfb) reproduced, then none in 600 with serialised opens |
|
||||
| Encoder preference (auto, software, named, hardware off), report ranks | `codec::tests::encoder_preference` | tested |
|
||||
| An encoder per codec viewers chose (made, dropped, stream codec skipped, preference change) | `voelin-core` `media::tests::an_encoder_per_codec_viewers_chose` | tested |
|
||||
| Answer's codec reported to the streamer, H.264 level in the offer, HEVC offered | `voelin-stream` `peer::tests::streamer_learns_the_answered_codec`, `h264::tests` | tested (str0m on loopback) |
|
||||
| An encoder per H.264 profile viewers chose: Constrained High and Baseline side by side (SPS `profile_idc` 100 and 66), High dropped when only Baseline viewers are left | `voelin-core` `media::tests::an_encoder_per_h264_profile_viewers_chose` | tested (FFmpeg's H.264 encoders here) |
|
||||
| Answer's codec reported to the streamer, H.264 levels and both profiles in the offer, a Baseline-only viewer answering the fallback entry, HEVC offered | `voelin-stream` `peer::tests::streamer_learns_the_answered_codec`, `a_baseline_only_viewer_gets_the_fallback_profile`, `h264::tests` | tested (str0m on loopback) |
|
||||
| The H.264 ladder against libwebrtc: headless Chromium 152 answers the Constrained Baseline entry and decodes frames from an encoder in that profile | `voelin-core/tests/browser_codecs.rs` `real_encoders_decode_in_browser` (`VOELIN_INTEROP=1`) | tested: `h264_vaapi` (from memory and from DMA-BUFs) and `libx264`, 90 of 90 frames at 1280x720, SPS profile 66 |
|
||||
| x264 / SVT-AV1 / libaom in the streamer pipeline | `voelinctl stream bench --encoder ...` | 720p30: x264 8.7 ms per frame, SVT-AV1 1.3 ms, libaom 37 ms; 1.1 allocations per encoded frame |
|
||||
| Hardware encoders VA-API and AMF (H.264, HEVC, AV1) in the streamer pipeline | `voelinctl stream bench` on a Radeon RX 7900 GRE, 1080p60 / 1440p60 / simulcast | tested: full frame rate, 0.20-0.52 cores against 1.16-2.55 for software, 1.02 allocations per encoded frame, every backend within 2 % of the target bitrate once `av1_vaapi` got a two-second buffer (it overshot by 3.5-8 %; see the tables above) |
|
||||
| Hardware encoders → our decoders: `h264_vaapi` / `h264_amf` → OpenH264, `av1_vaapi` / `av1_amf` → dav1d (PSNR > 28 dB, decoded size, keyframes at start and on request, timestamps, bitrate change) at 320x240 and 1920x1080 | `tests/ffmpeg.rs` `hardware_encoders_roundtrip` (`VOELIN_OPENH264_LIB`, `--features av1`) | tested on the Radeon RX 7900 GRE: it found the AV1 encoder padding 1080 rows to 1082 (and other sizes to 64x16), now cropped (see above). HEVC is decoded by FFmpeg's decoders in `tests/ffmpeg_decoders.rs` |
|
||||
|
||||
@@ -272,9 +272,14 @@ libwebrtc, the stack the official client is built on:
|
||||
strings (e.g. `fhs`), not `0`. Our `iceCandidate` signals use the peer's
|
||||
first mid and `sdpMLineIndex` 0; Chromium's `addIceCandidate` accepts them.
|
||||
- Without camera/microphone permission Chromium hides host candidates behind
|
||||
mDNS names (`<uuid>.local`), which str0m cannot resolve. The test disables
|
||||
that; the official client may send mDNS candidates, which would then need a
|
||||
resolver (or its server-reflexive candidates) on our side.
|
||||
mDNS names (`<uuid>.local`), which str0m cannot use. Our peers resolve them
|
||||
with a multicast DNS query (`voelin_stream::mdns`, 2026-10-03). Chromium
|
||||
152's responder answers queries sent from port 5353 (with multicast
|
||||
answers on every interface) and ignores "legacy" queries from other
|
||||
ports, so the query goes out from 5353, shared with the system's
|
||||
responder. `browser_mdns_candidates_connect` keeps our candidates from the
|
||||
browser, so only a resolved name can connect: it does, both ways. The
|
||||
official client may send such names too.
|
||||
- str0m answers in its own codec order and the offerer sends the answer's
|
||||
first codec, so `Peer::answer` orders the viewer's codecs like the offer.
|
||||
- SRTP profile: libwebrtc answers our `setup:actpass` offer as DTLS client
|
||||
@@ -287,6 +292,18 @@ libwebrtc, the stack the official client is built on:
|
||||
`srtpCipher: AES_CM_128_HMAC_SHA1_80` (DTLS 1.2,
|
||||
`TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256`). Whether this was what broke the
|
||||
official client is still to be confirmed with it.
|
||||
- When SRTP fails after the handshake (a relay that lets STUN and DTLS
|
||||
through and drops SRTP once AES-GCM was selected), Chromium 152 decodes
|
||||
nothing and its receiver reports never mention our video; our streamer
|
||||
peer reports that (`PeerEvent::NoFeedback`) and the session offers a new
|
||||
connection without AES-GCM (`browser_srtp_failure_is_noticed`; the
|
||||
AES_CM_128_HMAC_SHA1_80 connection then decodes 90 of 90 frames). A
|
||||
working connection raises no such report.
|
||||
- DTLS: Chromium 152's ClientHello offers 1.3 and 1.2. Our peers use 1.2
|
||||
(str0m's default) and get it; allowed 1.3, dimpl negotiates it with
|
||||
Chromium 152 (`FEFC`, `TLS_AES_128_GCM_SHA256`) and the stream decodes
|
||||
(tried 2026-10-03, not turned on: see "Negotiation" in
|
||||
[architecture.md](../architecture.md)).
|
||||
- With bandwidth estimation on our streamer peer, Chromium's transport-cc
|
||||
feedback gives estimates; the offer is the same as without (str0m always
|
||||
offers transport-cc and abs-send-time).
|
||||
@@ -313,7 +330,11 @@ while it watched a Voelin stream, and the symbols of its binary:
|
||||
- It answers with the first codec of the offer it lists, like Chromium.
|
||||
|
||||
Voelin now offers codecs every client decodes first (`decoded_everywhere`)
|
||||
and H.264 only in the profile it encodes. The real encoders' streams (VA-API
|
||||
and H.264 only in the profiles it encodes: Constrained High, then
|
||||
Constrained Baseline (both packetization mode 1). A client that answers
|
||||
the Baseline entry (headless Chromium 152; the official client's own
|
||||
answer above was a Baseline profile too) gets frames from an encoder in
|
||||
that profile. The real encoders' streams (VA-API
|
||||
H.264 and AV1, from memory and from DMA-BUFs; libvpx VP8 and VP9; x264,
|
||||
SVT-AV1, libaom) decode in Chromium 152's libwebrtc at full size
|
||||
(`crates/voelin-core/tests/browser_codecs.rs`). Watching such a stream with
|
||||
@@ -378,6 +399,18 @@ itself with these decoders is still to be confirmed.
|
||||
- [ ] Interop with the official TS6 client (its offer/answer details, whether
|
||||
it trickles candidates, mDNS host candidates). The codecs it picks and
|
||||
decodes are known (see above); Chromium's WebRTC stack interoperates.
|
||||
- [ ] Whether the official client, as a viewer, answers a `reconnectOffer`
|
||||
it did not ask for (our streamer sends one when the viewer's receiver
|
||||
reports show none of our video), and whether it offers AES-GCM at all.
|
||||
To find out: Voelin streams to it with
|
||||
`voelinctl ... stream start --synthetic --auto-accept --srtp
|
||||
AEAD_AES_128_GCM,AES_CM_128_HMAC_SHA1_80` and `RUST_LOG=voelin_stream=debug`;
|
||||
the viewer list prints the SRTP profile per viewer. AES-GCM selected
|
||||
and a picture: the official client handles it, and AEAD-first could
|
||||
become the default. AES_CM_128_HMAC_SHA1_80 selected: it does not
|
||||
offer AES-GCM, and the order does not matter. No picture: after 10 s
|
||||
the log says "offering a new connection without SRTP"; a picture after
|
||||
that proves it answers our `reconnectOffer`.
|
||||
- [ ] Whether stream audio can be sent without video.
|
||||
- [ ] The WebRTC/protobuf transport some TS6 clients use on UDP 9987
|
||||
(`client_protocol_format=proto`, reported in community reverse engineering).
|
||||
|
||||
Reference in new issue
Block a user