Merge branch 'claude/gifted-lovelace-1crlx2' into worktree-agent-a33c34a3879196dbf
This commit is contained in:
commit
2159b38786
14 files changed
+440
-122
No files matched your search
+16
-8
@@ -160,18 +160,26 @@ viewer: Engine::subscribe_frames ─ VideoPipeline (thread) ─ VideoDecoder
|
||||
- `peer_config(&codecs, config)` makes a viewer accept only what we decode
|
||||
and a streamer offer its stream codec (the first of `config.video_codecs`
|
||||
it can encode) followed by `offer_codecs`: the codecs of hardware
|
||||
encoders, VP8 through libvpx (every TeamSpeak client decodes it), and HEVC
|
||||
encoders and VP8 through libvpx that every TeamSpeak client decodes
|
||||
(`decoded_everywhere`: AV1, VP9, VP8), then H.264 from hardware, and HEVC
|
||||
last. Other software encoders (x264, SVT-AV1, libvpx VP9, ...) are only
|
||||
ever the stream codec, so a viewer's answer never starts an expensive
|
||||
second encoder. Answers keep the offer's order, so viewers take the stream
|
||||
codec when they decode it. `preferred_codec(&codecs, configured)` picks the
|
||||
stream codec: `stream.codec` if encodable, else the preference's first
|
||||
(hardware first when enabled, VP8 in software; never HEVC);
|
||||
`encoder_preference(&settings)` and `configured_codec(&settings)` read the
|
||||
settings. H.264 is offered as Constrained High at the level the stream
|
||||
needs (`PeerConfig::set_h264_format(profile, width, height, fps, bitrate)`:
|
||||
codec every TeamSpeak client decodes (hardware first when enabled, VP8 in
|
||||
software), else any but HEVC; `encoder_preference(&settings)` and
|
||||
`configured_codec(&settings)` read the settings. The official client
|
||||
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).
|
||||
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.
|
||||
- `VideoPipeline` decodes on its own thread. It starts at a keyframe, and
|
||||
after a lost frame (`contiguous == false`, a lagging frame bus, a queue
|
||||
longer than 30 frames) or a decoder error it skips to the next keyframe,
|
||||
@@ -968,7 +976,7 @@ has not run on Windows yet.
|
||||
| OpenH264 download, SHA-256 check, reuse | `tests/openh264.rs -- --ignored` | tested locally (network) |
|
||||
| H.264 library missing / unknown file | unit + integration tests | tested |
|
||||
| AV1 decoder construction, garbage input | unit test (`--features av1`) | tested; streams of SVT-AV1, rav1e, libaom, `av1_vaapi` and `av1_amf` decoded (rows below) |
|
||||
| X11 capture (MIT-SHM and GetImage), sources, window capture → VP8 → decode, cursor | `tests/x11_capture.rs` under Xvfb | tested |
|
||||
| X11 capture (MIT-SHM and GetImage), sources, window capture → VP8 → decode, cursor | `tests/x11_capture.rs` under Xvfb (`VOELIN_X11_TEST_DISPLAY`) | tested |
|
||||
| wlroots capture (wlr-screencopy v3): outputs, pixels, a change arriving as a new frame, queue API | `tests/wlroots_capture.rs` against headless sway 1.9 (`VOELIN_WLROOTS_TEST_DISPLAY`) | tested; the ext-image-copy-capture path is untested (sway 1.9 predates it) |
|
||||
| Converter (strides, unpadded last row, odd sizes, RGBA/I420/NV12), scaler (flat, area average, half), pyramid (sharing, recycling, steady-state pools) | unit tests | tested |
|
||||
| Simulcast layers (sizes, fps caps, per-layer keyframes), reconfigure (codec, layers, fps) | `voelin-core` `media::tests::simulcast_layers_and_reconfigure` | tested |
|
||||
@@ -1008,7 +1016,7 @@ has not run on Windows yet.
|
||||
| Stream mixer (latency, fade on underrun, drift correction, rate conversion, limiter, levels, live source changes), `BlockClock` | `voelin-media` `mix::tests`, `tests/mix_alloc.rs` (no allocation per block) | tested |
|
||||
| Application audio on PipeWire: desktop without our own stream, by name, by pid, a new player linked live, a quit one dropped, a restarted one matched again, the app list | `voelin-media/tests/pipewire_apps.rs` (private PipeWire, WirePlumber and D-Bus; tones told apart by frequency) | tested with PipeWire 1.0 and WirePlumber 0.4; skipped without them |
|
||||
| Streamer audio sources (mix levels, gain, mute, live change, microphone tap, window source error, silence) | `voelin-core` `media::tests::audio_sources_change_live`, `audio_sources_from_settings`, `settings::tests::audio_sources` | tested |
|
||||
| X11 `_NET_WM_PID` of the shared window | `tests/x11_capture.rs` under Xvfb | tested |
|
||||
| X11 `_NET_WM_PID` of the shared window | `tests/x11_capture.rs` under Xvfb (`VOELIN_X11_TEST_DISPLAY`) | tested |
|
||||
| WASAPI per-process loopback, audio sessions, `HWND` owner | – | type-checked for `x86_64-pc-windows-gnu` only |
|
||||
| Android per-app and all-but-ours playback capture | `cargo ndk -t arm64-v8a clippy`, `gradlew compileDebugKotlin` | compiles only (no device or emulator here) |
|
||||
| The same through the TeamSpeak 6 server | `voelin-core/tests/media_live.rs` (`VOELIN_LIVE=1`), `voelinctl stream start --synthetic` / `watch --expect-frames` | tested against 6.0.0-beta13.1 |
|
||||
|
||||
@@ -38,7 +38,8 @@ Transport (**reported**, TeamSpeak staff on community.teamspeak.com):
|
||||
Codecs (**reported**, from the ts6-manager bot's working code):
|
||||
|
||||
- Video: H.264 Constrained High (the only H.264 profile the TS client decodes),
|
||||
VP8, VP9, AV1.
|
||||
VP8, VP9, AV1. H.264 only when the client could download OpenH264 (see
|
||||
"Codecs the official client decodes" below).
|
||||
- Audio: Opus, 48 kHz stereo, payload type 111.
|
||||
|
||||
Commands over the normal client command channel (**reported**, ts6-manager,
|
||||
@@ -253,6 +254,36 @@ libwebrtc, the stack the official client is built on:
|
||||
feedback gives estimates; the offer is the same as without (str0m always
|
||||
offers transport-cc and abs-send-time).
|
||||
|
||||
### Codecs the official client decodes (confirmed, client 6.0.0-beta4.1, 2026-10-03)
|
||||
|
||||
From the official Linux client's log (`~/.cache/TeamSpeak/Default/logs/`)
|
||||
while it watched a Voelin stream, and the symbols of its binary:
|
||||
|
||||
- At start-up it downloads Cisco's OpenH264
|
||||
(`http://ciscobinary.openh264.org/libopenh264-2.6.0-linux64.8.so.bz2`); here
|
||||
the download failed (`Failed to download openh264 binary http code: 403`).
|
||||
- Voelin offered H.264 first (the hardware encoder's codec), with every H.264
|
||||
variant str0m knows. The client answered H.264 `profile-level-id=42e01f`
|
||||
(packetization mode 1), then could not make a decoder for it: `Trying to
|
||||
create decoder for unsupported format. Codec name: H264` — libwebrtc's
|
||||
`NullVideoDecoder`, nothing shown. Its SDP capabilities list H.264 whether
|
||||
or not OpenH264 loaded.
|
||||
- Its decoders: `FFmpegDecoderVP8`, `FFmpegDecoderVP9`, `FFmpegDecoderAV1`
|
||||
(FFmpeg bundled in `/opt/teamspeak`, dav1d and libaom linked in), AMF
|
||||
hardware decoders for H.264 and AV1, and OpenH264 (`H264DecoderImpl`) once
|
||||
downloaded. VP8, VP9 and AV1 therefore always decode; H.264 depends on the
|
||||
download.
|
||||
- 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
|
||||
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
|
||||
the official client itself is still to be confirmed: the beta needs a
|
||||
myTeamSpeak sign-in on first start, so it cannot run from a throwaway
|
||||
profile.
|
||||
|
||||
## Open questions
|
||||
|
||||
- [x] Viewer side: `joinstreamrequest id clid msg is_remove` (see above).
|
||||
@@ -264,9 +295,9 @@ libwebrtc, the stack the official client is built on:
|
||||
- [x] Whether a client that connects later is told about running streams: no (see above).
|
||||
- [x] How a client finds running streams after connecting: `requeststreaminfo`
|
||||
(presumably what the official client does too; not captured from it).
|
||||
- [ ] Interop with the official TS6 client (its offer/answer details, codecs it
|
||||
actually picks, whether it trickles candidates, mDNS host candidates).
|
||||
Chromium's WebRTC stack interoperates (see above).
|
||||
- [ ] 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 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