messageadd carries the recipient's unique id as bytes (base64 on the
wire); the engine passed the base64 text itself, which the server
refused as an invalid client id.
voelinctl engine can now wait for an icon or a flagged poke (listen
--expect matches pokes, chat and icons), for a friend to be seen online
(contacts ls --expect-online), and identity show prints the unique id a
TeamSpeak 6 server knows the identity by (uid6), which offline messages
there need. Contacts commands wait for the stored contacts to load
instead of for an event they could miss.
Verified against 3.13.8 and 6.0.0-beta13.1: file upload, listing,
download, a chat link downloaded by another client, avatars (the a-p
file name on both), channel icons, pokes, private messages, offline
messages, friend presence and blocked pokes (flagged and hidden).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
Manual and smoke testing of the engine's voice features needs a driver:
`voelinctl engine <address> <action>` runs one engine voice session and
does files (ls, upload with an optional chat link, download, rm, mkdir,
mv), avatar (set, clear, wait for someone's and check its MD5), poke,
dm, offline (send, read with --expect and --delete), contacts (set, rm,
ls in --db) or listen (pokes, chat, file links, which it can download).
It prints one line per event and fails on errors or when time is up.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
Chats show their stored history at once and sync what the gateway kept
while we were away; messages seen over voice and the gateway are
stored once. Pins, reactions, topics, events, the stream directory,
activity and gateway administration are engine commands and events.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
`voelinctl gateway --engine` runs one engine session against a gateway,
optionally with voice, and prints every history batch, gateway update
and stream event as a line: --chat opens chats (with --db, stored
history), --older pages back, --request sends any gateway request as
JSON (admin config, permission rules, events, ...), --roundtrip posts,
pins, reacts, starts a topic from the post, posts into it and reads it
back, --stream-seconds streams synthetic frames (registering in the
directory) and --watch-streamer watches a stream once found.
it-smoke adds three steps with the gateway running: messages sent while a
user is offline reach its stored history on the next connect (the admin
sets relay.pinned_channels at runtime for it); the pin/react/topic round
trip as a normal user with a permission rule the admin sets; and on
TeamSpeak 6 a stream registered in the directory found and watched by a
viewer that connects later. The gateway's port can be moved
(TSGW_PORT_TS3/TS6), and default builds go to $CARGO_TARGET_DIR.
A chat's first stored page is no longer marked complete while its
gateway is still connecting.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
Capture, conversion and encoding on their own threads with latest-wins
handoffs and frame pools, one encoder per simulcast layer, portal
DMA-BUF, a wlroots capture backend, tuned libvpx, per-stage statistics,
Streamer::reconfigure and voelinctl stream bench. Conflicts: the root
manifest (dimpl patch next to the release profile) and voelinctl's
command list (probe-stream next to the stream tools).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
The streamer converted and encoded on one thread, one frame after the
other, with the frame rate clamped to 1..=60 and one encoder. It is now
a pipeline of threads connected by latest-wins handoffs:
capture thread (backend) ── convert + scale (pool of all cores)
── Handoff per layer ── encoder thread per layer ── MediaSink
- The capture backend calls the pipeline's `FrameSink` with the frame
still in its capture buffer. Frames beyond the frame-rate cap are
skipped before anything is read. The `Pyramid` converts the frame once
and derives every due layer's size (`LayerSpec::output_size`) from
the nearest larger one, in recycled frames.
- Each layer (`StreamerConfig::layers`; empty: one layer at
`bitrate_kbps`) has its own encoder thread and encoder, its share of
the CPUs, its own frame-rate cap (`max_fps`, paced by timestamps),
and gets the newest frame through a one-slot handoff; frames it was
too busy for are dropped and counted, never queued.
- Keyframes: `take_layer_keyframes` is polled by whichever encoder
thread gets to it and each requested layer is flagged, so exactly the
requested layers encode a keyframe (kept due until one is produced).
A still screen sends no frames, so a request is answered by encoding
the last picture again.
- Bitrate: every frame, each layer follows `layer_bitrate(id)` when the
sink knows it (capped by `max_bitrate`), else its configured bitrate;
libvpx changes it in place, without a keyframe.
- `Streamer::reconfigure(&codecs, StreamerConfigUpdate { fps,
bitrate_kbps, codec, layers })` applies from the next frame without
restarting the capture: new encoders are created first (errors change
nothing), layers keep their encoder when their id stays, new ids get
threads, removed ones stop, a codec change swaps every encoder (first
frame a keyframe), the frame-rate cap reaches the capture backend.
- No built-in limits: any fps >= 1, any bitrate, any size; threads from
the CPU count.
- `StreamerStats` gains capture fps, convert time, convert threads,
dropped frames, codec and per-layer `LayerStats` (size, frames,
keyframes, dropped, fps, kbit/s, encode time, target bitrate, threads,
encoder speed); counters are atomics, rates are computed once a second
by a stats thread, which logs a one-line summary every 5 s at debug
level. `StreamerStats` is no longer `Eq` (it has rates).
- `EncodedSource` answers `request_layer_keyframe`; the local preview
shows the first layer.
- In steady state nothing is allocated per frame between capture and
encoder; the one allocation per encoded frame is the `Arc<[u8]>` of
`EncodedFrame` (encoded sizes vary, so it cannot be recycled).
`voelinctl stream bench` prints the new per-stage and per-layer numbers
and allocations per captured and per encoded frame.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
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
Layer ids given by position were assigned after the placeholder source was
created, so its frames carried id 65535 and no viewer got video. Found
streaming placeholder layers through the TeamSpeak 6 dev server.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
Official TeamSpeak 6 clients use AES_CM_128_HMAC_SHA1_80, while our peers
negotiated AES-256-GCM. PeerConfig::srtp_profiles now sets the order (default
AES_CM_128_HMAC_SHA1_80, then the GCM profiles for peers without it); a
DTLS provider wrapping str0m's dimpl DTLS applies it and records the
negotiated profile. It can be changed at runtime (Streams::set_srtp_profiles,
Command::SetSrtpProfiles) for new connections.
Streamer peers now run str0m's bandwidth estimation and pacer. Each viewer
gets the simulcast layer its estimate allows (down at once, up after 2 s
above the next layer's minimum plus 20%), switching at a keyframe of the new
layer, which is requested. Keyframe requests and bitrate targets (lowest
estimate of a layer's viewers) are per layer and reach the encoders
lock-free through LayerFeedback (StreamSink::take_layer_keyframes,
layer_bitrate). Peers that negotiate RID simulcast (PeerConfig::simulcast,
for SFUs/WHIP) get every layer with its RID. Layers can change while live.
voelinctl stream start takes --layer, --simulcast, --srtp and --placeholder
(layered synthetic frames without an encoder) and prints each viewer's
layer, estimate and SRTP profile.
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 server announces a stream only to the clients in the streamer's channel
when it starts; clients that arrive later see only client_is_streaming. To
find out what the server offers instead, probe-stream runs two clients:
A creates a channel and starts a stream, B arrives afterwards and tries
candidate commands from another channel and from A's channel
(requeststreaminfo spellings, clientgetvariables, clientinfo, list-like
command names, joinstreamrequest with the learned id), A tries updatestream
and client_meta_data. Every command both clients exchange is printed raw
through a listener on the tsproto connection (tsclientlib's unstable API),
so notifications the declarations do not know yet show up too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
`voelinctl stream bench [--res WxH] [--fps N] [--codec vp8|vp9|h264]
[--layer SPEC ...] [--seconds N]` runs the streamer's real pipeline on the
test pattern without a server, into a sink that counts frames, keyframes
and bytes per layer, and prints frame and bit rates, CPU use and heap
allocations per frame in the steady state. Allocations are counted by a
global allocator in voelinctl only (one relaxed atomic add each).
The flat test pattern costs an encoder next to nothing, so it cannot show
how the pipeline copes with real screens. `Pattern::Desktop` looks like a
desktop with a code editor (gradient title bar, side bar, coloured lines
of text) whose document scrolls three pixels per frame; it is rendered
once and copied per frame, so drawing it stays cheap. The bench uses it by
default (`--pattern simple` for the old one); `StreamerConfig` gets
`synthetic_pattern`. Drawing the pattern now reuses a buffer
(`SyntheticScreen::render`) and fills rows by copying.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
LayerSpec describes one encoding (size or scale, fps cap, bitrate range,
minimum estimate, RID); LayerSet is a growable set of layers. Encoded
frames carry their layer, FrameSource and MediaSink gain per-layer
keyframe requests and bitrate targets, and StreamerOptions and
StreamerConfig take the layer list. Behaviour is unchanged: one layer, 0.
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
`media` uses whatever tsc-media backends are enabled (MediaCodec and a
registered capture source on Android); `media-desktop` adds tsc-media's
default backends (libvpx, OpenH264, X11, PipeWire). The default features
no longer include media, so crates that depend on tsc-core with defaults
do not pull libvpx into Android builds.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
`stream start` captures through tsc-core's Streamer: `--synthetic` (or
`--source synthetic`) is the moving test pattern with a tone, `--source
x11[:N]`, `screen[:N]`, `window:<id>` or `portal` capture the desktop,
`--bitrate` sets the encoder and setupstream. `stream watch` decodes the
video, counts decoded pictures for `--expect-frames` and can save the
last one with `--save-frame out.png`. Offers carry the codec we encode
and answers accept what we decode.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
tsctl connect <addr> stream [--loopback|--stun X|--no-stun]
start --synthetic [--name] [--auto-accept] [--seconds N] [--fps]
[--frame-size] [--no-audio]
Streams SyntheticSource frames through tsc-stream's sessions.
Without --auto-accept, join requests are answered on stdin
(accept/deny/kick <clid>, stop). frame_source() is the seam for
real capture and encoders.
list Streams announced in our channel, plus clients whose
client_is_streaming is set but whose stream id we were not told.
watch [--id] [--streamer-nick] [--expect-frames N] [--timeout S]
Joins the matching stream (or the first one); exits 0 once N video
frames arrived.
it-smoke.sh (TS6 only): a viewer waits for a uniquely named streamer,
which then streams 10 s of synthetic VP8 + Opus over loopback; also runs
the engine's stream_live test.
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
- tsc-query: ServerQuery codec (escaping, rows, errors, notifications,
command builder/parser), line client for raw TCP and SSH (russh) with
events, flood-limit token bucket and keepalive, HTTP WebQuery client.
- tsc-model: Presence (snapshot/delta/diff), ChannelInfo, ClientInfo,
ChatMessage, relay formatting and message splitting.
- tsc-observer: Observer (snapshot, events or polling, resync,
reconnect) and RelayPool (one query session per channel, reads channel
chat and posts as [Nick] text, unique nicknames, polite quit).
- tsctl query/observe/relay; smoke test covers presence and relay on
TS3 (raw) and TS6 (SSH). Dev servers enable all query interfaces with
a fixed dev password.
- docs: query clients are hidden by clients, not the server.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
- tsc-audio: Opus voice/music encoder producing TeamSpeak voice packets,
framer, rubato resampling, WAV I/O, tone/Goertzel helpers, cpal
capture/playback over lock-free ring buffers; the vendored
AudioHandler is the jitter buffer/mixer.
- tsc-store: SQLite (bundled, WAL, 0600) with migrations for identities,
bookmarks, settings and paged chat history; Secrets trait with memory
and OS keyring backends.
- tsctl voice send (WAV or tone, real time) / record (mix to WAV,
--expect-tone check). The smoke test now includes a voice round-trip:
1 kHz tone ratio ~0.95 on TS3 and TS6.
- Dev profile: no debug info for dependencies (target/ 16 GB -> 2.4 GB).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
- curve25519-dalek-ng -> curve25519-dalek 4.
- fuzz/: cargo-fuzz targets for packets, commands and the license chain,
plus a nightly workflow. Fixes for the panics they found: empty
license, unchecked license property bounds, wrong index in the C2S
audio invalid-codec error.
- tsc-model: ServerVersion/ServerFlavor/Capabilities parsed from
virtualserver_version; tsctl shows the flavor in the tree header.
- CI lints every non-vendored crate via scripts/own-crates.sh.
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
- dev/docker-compose.yml: TeamSpeak 3.13 and TeamSpeak 6 beta13.1,
pinned by digest, REGISTRY override for the Docker Hub mirror.
- scripts/it-smoke.sh: tree, server chat and channel chat
round-trips on both servers; redeems the one-time ServerAdmin key.
- tsctl raw: send an arbitrary command (used to relax anti-flood on
the dev servers; later for probing TS6 stream commands).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
- identity new/show (JSON identity files with hash-cash level)
- versions: list signed client versions from Versions.csv
- connect <addr> tree | chat server|channel|client | listen | repl
with --client-version, --privilege-key, --server-password,
--channel and --log-commands
Verified against local TeamSpeak 3.13 and TeamSpeak 6.0.0-beta13.1
containers: connect, subscribe-all tree, server and channel chat
round-trips between two clients.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G