The streamer chose each viewer's layer from its bandwidth estimate, and a
viewer could neither see which layers there were nor ask for one: the watch
screen's quality picker only asked for a keyframe.
A Voelin streamer with several layers now lists them in its offer, in a
session-level SDP attribute, `a=x-voelin-layers:<id>/<WxH or
scale>/<bitrate>[/<fps>] ...`, added to the SDP str0m makes (peer.rs is
untouched). A Voelin viewer reports them (WatchEvent::Layers,
Event::WatchLayers) and asks for one with Command::SetWatchLayer, which
sends `{"cmd":"x-voelin-layer","args":{"layer":<id or null>}}` through
streamsignaling. The streamer moves that viewer to the layer at its next
keyframe and keeps it there whatever the estimate says, without letting it
lower the layer's bitrate for everyone else; null ("Auto") hands the
choice back to the estimate. The watch screen's picker now drives it.
Official clients are not affected. libwebrtc skips session attributes it
does not know: headless Chromium 152 answers an offer carrying the line
and decodes as before (browser interop test, which now sends it). A viewer
sends the request only to a streamer whose offer had the attribute, and
only Voelin streamers add it, so official streamers never get the signal;
which codecs are offered does not change.
Tests: two sessions with peers on loopback switch the viewer to layer 1
and back on request; a streamer whose offer lists no layers is never
asked; the attribute round-trips. Through the TeamSpeak 6 dev server,
`voelinctl stream watch --layer 1` against a two-layer placeholder stream
kept the viewer on layer 1 at an estimate that fits layer 0.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The official client could not show a Voelin stream: its decoder was
libwebrtc's NullVideoDecoder. Its log says why. On a machine with a
hardware H.264 encoder our offer put H.264 first, with every H.264
variant str0m knows; the client answered H.264 42e01f, then had no
decoder for it, because it decodes H.264 only with an OpenH264 library it
downloads at start-up, and that download failed (HTTP 403). Its SDP
capabilities list H.264 either way. VP8, VP9 and AV1 it always decodes:
FFmpeg's decoders, dav1d and libaom are built into it.
- The hardware encoder order, the automatic stream codec
(`preferred_codec`) and the offer (`offer_codecs`) now put the codecs
every client decodes (`decoded_everywhere`: AV1, VP9, VP8) before
H.264, HEVC last. A viewer answers with the first codec of the offer it
lists, so official clients take one they can decode; H.264 stays
offered for peers that want it, and `stream.codec` can still choose it
(its description now says what that means for official clients).
- A streamer offers H.264 only as it encodes it (Constrained High,
packetization mode 1), not str0m's other variants, which let a viewer
answer a profile, or packetization mode 0, we never send. Viewers still
accept every variant.
Tests: `crates/voelin-core/tests/browser_codecs.rs` (VOELIN_INTEROP=1)
streams the test pattern through every encoder this machine has, VA-API
also from DMA-BUFs, to headless Chromium's libwebrtc: VA-API H.264 and
AV1, libvpx VP8 and VP9, x264, SVT-AV1 and libaom all decode at
1280x720. A second test makes the offer a share makes here
([AV1, VP8, H264, H265]) and checks the browser picks and decodes a
codec every client decodes. The browser driver now takes playwright-core
with a system Chromium (VOELIN_CHROMIUM), which decodes H.264, and the
interop tests accept Chromium 152's name for the SRTP cipher. The
official client itself could not be run here (its beta needs a
myTeamSpeak sign-in on first start).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The streams list and the watch screen showed how many watch a stream only
when a gateway's directory knew it, although TeamSpeak 6 tells the count
itself: `viewer` in `notifystreaminfo`.
StreamInfo gets `viewers`: the server's count from `notifystreaminfo`, 0
for a stream that just started. Probed on the dev server, the server sends
`notifystreamclientjoined` to the whole channel but `notifystreamclientleft`
only to the streamer and the viewer who left, and no `notifystreamupdated`
for either; so the directory counts joins and leaves itself and the engine
asks `requeststreaminfo` again, one stream of another client every 5 s
round robin, which corrects the leaves it was not told about without
flooding the server however many stream. The app shows that count, and the
gateway's where the server gave none; `voelinctl stream list` prints it.
Against the TeamSpeak 6 dev server, a late `stream list` printed
"1 watching" while a viewer watched and "0 watching" after it left.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflicts with the SRTP/BWE/simulcast work were in the engine's command
loop, session and stream tasks (both sides kept: SRTP order and layers
next to settings and discovery) and in the voelin-stream exports.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
The interop test now reads the transport's getStats() and requires
srtpCipher AES_CM_128_HMAC_SHA1_80 in both directions, and bandwidth
estimates from Chromium's transport-cc feedback. The docs describe the SRTP
profile order, the bandwidth estimation and the simulcast layers of our
stream, and the findings with Chromium 141.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
The server announces a stream (notifystreamstarted) only to the clients in
the streamer's channel when it starts. A client that connects or enters the
channel later saw the streamer's client_is_streaming flag but could not
watch. The probe (docs/research/ts6-late-join.md) found that
`requeststreaminfo clid=<streamer>` answers with notifystreaminfo, one part
per stream of the client, from any channel.
voelin-stream gets a discovery module. Streams::update_clients takes the
clients on the server (channel and streaming flag), keeps the directory to
the streams in our channel, and looks up the streams of streamers in our
channel we were not told about: after connecting, after we or they change
channels, and when an announcement did not come. The answer fills the
directory like an announcement, so Event::StreamsChanged lists the stream
and it is watched like any other. Where streams are looked up is a
StreamLookup trait (the server now; a gateway directory can plug in with
Streams::add_lookup and report through Streams::discovered).
notifystreamupdated (updatestream) now updates the directory.
The engine and `voelinctl stream list/watch` feed the client list in. The
declarations learn the notifystreaminfo answer's fields, notifystreamupdated
and requeststreaminfo. Tests: a fake-server session test and an engine live
test with a viewer that arrives after the stream is live, discovery unit
tests, parsing of the server's answers; it-smoke gets a late-viewer step.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
The product is Voelin (app id io.github.faumaray.Voelin), everywhere:
- crates tsc-* -> voelin-* (and voelin-fuzz), the desktop binary
tsc-desktop -> voelin, the development CLI tsctl -> voelinctl;
- the Android app: applicationId, Kotlin package io.github.faumaray.voelin,
VoelinApp, libvoelin_android.so (JNI class names follow);
- TSC_* environment variables -> VOELIN_*, Gradle properties tsc.* ->
voelin.*, signing secrets VOELIN_SIGNING_*;
- the data/config/cache/state folder tsc -> voelin, the keyring service,
thread names, the dev compose project;
- desktop file, metainfo, icon, Flatpak manifest, NSIS installer, docs.
The gateway keeps its name: bin tsgw (crate voelin-gateway), TSGW_* env
vars, the tsgw.v1+json protocol, the tsgw image. The window title and the
About page show "Voelin <version>" from voelin_platform::APP_NAME.
Packages (scripts/package.sh): the app only (voelin, voelin.exe, APKs,
Flatpak). voelinctl is a development tool and in no package. tsgw is for
servers and now its own Linux package, tsgw_<v>_amd64.deb and
tsgw-<v>-linux-x86_64.tar.gz, with a sandboxed systemd unit
(packaging/linux/tsgw.service; /etc/tsgw config, /var/lib/tsgw state) and
dependencies of its own (no GUI libraries). docs/gateway-admin.md has an
Install section.
Fixes:
- package-windows: makensis on Windows found no file through "D:/a/..."
paths; pass Windows paths (cygpath -w).
- StartupWMClass is the app id, which the app sets as its X11 WM_CLASS
(it was the binary name, so desktops could not match the window).
- Gradle wrapper download timeout 10 s -> 60 s (slow proxies).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
docs/media.md describes tsc-core's media module and what was tested,
docs/audio.md the settings, level meter, client and stream volumes and
global push-to-talk, the protocol notes the confirmed finding that the
server does not announce running streams to clients that connect later.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
New crate tsc-stream for TeamSpeak 6 streams:
- proto: typed StreamNotification from the notifystream* messages and
builders for setupstream, joinstreamrequest, respondjoinstreamrequest,
streamsignaling, removeclientfromstream and stopstream
- signal: the JSON messages inside streamsignaling (offer, answer,
iceCandidate, reconnect), accepting the known key spellings
- stun: minimal STUN binding client for server-reflexive candidates
- peer: a str0m peer connection driven by a tokio task, one UDP socket per
host address; STUN lookups run in the background and found candidates are
reported for trickling
Declarations (verified against 6.0.0-beta13.1): joinstreamrequest; stopstream
and removeclientfromstream require `reason`; is_remove/reason/return_code on
the notifications.
Tests: two peers over loopback exchange VP8 and Opus frames; with TSC_LIVE=1 a
whole stream runs through the TS6 dev server (setup, join, offer, answer,
media, kick, stop). it-smoke.sh runs it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
joinstreamrequest needs id, clid, msg and is_remove (found by probing a
live stream with parameter names from the server binary). The server
embeds the protobuf schema of the new protocol; its enums explain the
setupstream type/accessibility/mode values.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
- tsc-gateway-proto: versioned JSON envelope (tsgw.v1+json), client and
server messages, identity-challenge auth (ECDSA P-256 over a signed
challenge), unique ids for TS3 (SHA-1) and TS6 (SHA-256, verified on
6.0.0-beta13.1), hash-cash level.
- tsc-gateway (tsgw): axum WebSocket server; hub with one observer, a
relay pool and a lookup query session; login by signature or token;
permission mirroring via permoverview (server group/client/channel
group/channel-client levels, skip and negate); per-user filtered
presence (snapshot + diff deltas); channel/server chat relay with
server-known nicknames, rate limit, idle relay teardown, pinned
channels; SQLite tokens, history and audit; Dockerfile; admin guide.
- tsctl gateway client; smoke test covers gateway presence, chat both
ways and refusal of unknown identities on TS3 and TS6.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
- Declarations: client_is_streaming (Client::is_streaming), initserver
virtualserver_address/virtualserver_version_sign, stream
notifications and commands (setupstream, stopstream, ...).
- tsctl: prints stream notifications and streaming state changes, marks
streaming clients in the tree.
- CI: cargo-deny with default features (rug/GMP is benchmark-only).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
- .github/workflows/ci.yml: fmt/clippy (strict for own crates), build and
test on ubuntu-24.04 and windows-2025, cargo-deny, TS3/TS6 smoke test
- deny.toml: permissive licenses only, advisories, sources
- README, docs/architecture.md (design + milestones),
docs/protocol-notes/ts6-streaming.md incl. first probe results
against 6.0.0-beta13.1 (setupstream works for guests,
joinstreamrequest exists)
- tsctl repl: /raw command
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G