Commit Graph
90 Commits
Author SHA1 Message Date
selikhovandClaude Opus 5.5 b393175333 docs: the studio screenshots as the studio looks now
They were taken before the Share button's menu took over from the
separate Stream Studio buttons and before the phone's studio lost the
bottom bar, so they showed a top-bar button that is gone, the bar and
the old Chat tab. Taken again headless (desktop 1440x1000, its window
1600x1000, phone 390x844 and 390x1250).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 22:57:08 +03:00
selikhovandClaude Opus 5.5 995ea204a6 Android: build with the build-tools the workflows install; this wave in the docs
The release workflow and the Docker build install build-tools 36.0.0, as
docs/android.md asks, but AGP 8.13 wanted its default, 35.0.0: it
installed that one itself where the SDK licences were accepted, and
elsewhere the build stopped. app/build.gradle.kts now pins 36.0.0, and
the debug APK (arm64-v8a and x86_64) builds with an SDK that has only
platform 36, build-tools 36.0.0 and the NDK 27.3: the Gradle 8.14.3
wrapper on Temurin JDK 17, Kotlin without warnings.

docs/android.md had none of this wave: the voice notification as the
app's voice card (Mute, Deafen, Leave, tap to open the voice screen), the
live stream's notification, the screen drawn straight into the encoder's
input surface and the reader for simulcast, the app picker with icons,
Camera2 cameras with the CAMERA permission, Share to Voelin, what was
tested where (the Rust sides, headless screenshots, compile-only parts),
a known gap (no camera foreground service) and how to try it on Waydroid.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 22:56:58 +03:00
selikhovandClaude Opus 5.5 318850fcd8 voelin-ui: pick and mix the quick share's sound as the studio does
The "Share screen" dialog had one switch for sound, "Share system audio",
which shared whatever stream.audio_sources held: changing what the
stream carries (an application, the microphone, desktop audio without
Voelin) or how loud meant the Stream Studio or the settings, and a
running share never followed.

The dialog now shows the studio's audio mixer while the switch is on
(off still means no audio at all): the studio's MixerRow for each source
(meter, gain, mute, the menu) and Add, which opens the studio's
PickDialog over the dialog to switch several sources on and off. They
read the main window's StudioBridge, filled without starting the studio
(App::mixer_show). Starting a share hands the sources with their gain
and mute to the capture (CaptureRequest::audio_sources); the stream
announces sound only when there is some. While it runs, the dialog
shows the same rows with the share mixer's meters, about 15 times a
second (the share keeps the timer), and every change of
stream.audio_sources, from the dialog or anywhere else (the settings
change event), goes to the running capture at once through
Capture::follow_audio, which reconfigures the streamer. A share started
without sound has no audio track, so the dialog says so instead.

The studio's rows and meters follow whichever streamer goes out: a quick
share's while one runs, else the studio's encoder. The picker's
application list is let go once neither the dialog nor the studio needs
it. With sample data, VOELIN_OPEN=share:live shares the test pattern
with the sample studio's sources, live at once with sample viewers, and
Stop ends it, as the studio's demo does. On a phone the frame-rate and
bitrate fields of the dialog no longer run past its edge.

Tests: capture_request carries the picked sources with gain and mute,
and nothing with the switch off or no sources; a running capture on the
test pattern follows changed sources, keeps a silent track when all are
removed, and one started without sound stays so. Headless screenshots
of the dialog before and during a share, 1440x900 and 390x844.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 22:45:17 +03:00
selikhovandClaude Opus 5.5 1c6251e7b7 Merge the development branch: streams of every channel
Brings in the streams of every channel (StreamItem::channel, the streams
panel listing other channels' streams after ours, the viewer's channel)
and the answer to a streamer's new offer.

streams.rs keeps both of the viewer's new values: whether the streamer
is an admin (this branch) and the stream's channel (the development
branch). The phone's pieces that list Bridge.streams now say where a
stream of another channel is: the voice screen's stream cards ("Lumen ·
in Gaming") and Home's Live now cards, whose comment and the server
rail's live flag no longer claim they are about our channel only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 22:24:13 +03:00
selikhovandClaude Opus 5.5 d987e397f9 voelin-ui: the phone's Go Live reads Live while the studio streams
The voice screen's Go Live button said "Go Live" while the Stream Studio
was live, as it only followed a quick share: it now reads "Live" for
either.

The phone screenshots in docs/screenshots are taken again for this
wave's screens: the voice channel with the stream on top (mockup 02),
the Activity tab, and Home, Servers, Chats, You and Settings with the
header's voice button and the bottom bar as they are now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 22:14:58 +03:00
selikhovandClaude Opus 5.5 5019bed324 Answer a streamer's new offer on the running connection
Watching a stream from the official client failed. Its log shows why:
after our answer it decided our codec choice did not suit it ("remote peer
is using unsupported codec, realign") and sent a new offer on the same
connection, a renegotiation. Voelin answered every offer with a new peer:
new ICE credentials, new DTLS fingerprint (the official client logged both
answers, they differ), so the connection the official client kept using
was gone and no picture came.

- `Peer::renegotiate` answers a new offer on the running peer (str0m
  `accept_offer` on the same Rtc): same ICE credentials and fingerprint.
- The viewer uses it for an `offer` signal while it has a connection; a
  `reconnectOffer` still starts a new one.
- str0m answers a renegotiation in the codec order the connection was
  built with, so a streamer re-offering another codec first kept sending
  the old one; `order_like_offer` puts the answer's payload types in the
  new offer's order.

Tests: a unit test (a str0m offerer adds audio in a new offer; same ICE
credentials and fingerprint, audio answered) and the order helper; the
browser interop test `browser_renegotiates_with_rust` (Chromium streams
VP8, re-offers VP9 on the same connection, VP9 frames arrive), passing
with Chromium 152.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 22:13:31 +03:00
selikhovandClaude Opus 5.5 5592a3ce1a Find and watch streams in every channel, without a gateway
The server announces a stream only to the clients in the streamer's
channel. Voelin looked up streams that started before it joined
(`requeststreaminfo`), but only in its own channel, so a stream anywhere
else on the server appeared only through a gateway's directory. The
official client lists and joins them without one: `requeststreaminfo`
answers from any channel, and a `joinstreamrequest` from another channel
reaches the streamer (confirmed on the TS6 dev server with the probe).

- Discovery follows every streaming client on the server: it looks up
  the streams of clients in other channels as soon as they stream, keeps
  them when we or they change channels, and drops them when the streamer
  stops or leaves.
- The streams panel lists every channel's streams, ours first, the
  others with their channel ("by X · in Gaming"); clients still being
  looked up show in any channel. The viewer's note names the stream's
  channel instead of claiming it can only be watched from there.
- As a streamer with `stream.permissions = channel` (the default), our
  channel is let in and viewers from other channels are asked, as the
  setting's description ("who may watch without being asked") says;
  they were refused before.

Tested: discovery unit tests for the new rules; the engine's permission
test; the app headless (no gateway) on the TS6 dev server found and played
a stream in another channel and one that started before it joined;
scripts/it-smoke.sh gains a step where a viewer in the default channel
watches a stream in another channel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 22:01:10 +03:00
selikhovandClaude Opus 5.5 4d17c0a2a4 Merge the development branch: share menu, codec order, segmentation
Brings in the Share button's menu (Share screen / Stream Studio) and the
removal of the separate Stream Studio button from the headers, the
codecs every TeamSpeak client decodes ahead of H.264, the portal fix
and person segmentation.

The phone header keeps this branch's voice-channel button and hides the
bell on the voice screen, and loses the Stream Studio button as the
development branch wants. The studio's test table takes the
segmentation rows and the Android camera row. MediaCodec follows the new
codec order with no code change (Codecs orders every hardware factory's
codecs); its description and docs/media.md now say so, including what
that means on a phone without a hardware VP8, VP9 or AV1 encoder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 20:02:47 +03:00
selikhovandClaude Opus 5.5 43ae9d6353 docs/studio.md: the Android cameras
The Camera2 provider landed without its description in the studio's
docs: how its frames reach a camera source (YUV_420_888 planes borrowed,
gathered into I420 only when turned or NV21), mirroring by default for
cameras facing the user, Switch camera, and what was tested where.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 19:51:45 +03:00
selikhovandClaude Opus 5.5 e419f5aeda Android: share the screen into the encoder without a copy
Screen sharing went MediaProjection -> ImageReader -> an owned Vec per
frame -> RGBA to NV12 on the CPU -> MediaCodec's input buffers: two
copies and a conversion of every frame on a phone's CPU.

Now, while it is the only MediaCodec encoder in the process (one
simulcast layer, one codec), an encoder takes GpuFrames: for the first
it starts a codec with an input surface (COLOR_FormatSurface,
max-fps-to-encoder at the stream's rate, repeat-previous-frame-after so
a still screen answers keyframe requests) and publishes it, and the
capture points its virtual display at that surface, resized to the
layer's size. The compositor renders the screen into the encoder; a
ticker at the stream's rate hands the sink GpuFrames that only collect
what the codec encoded, on the capture's timeline.

Simulcast keeps working by falling back: a second encoder (another
layer, or another codec a viewer chose) turns the path off for every
encoder and the display goes back to the reader, until it is the only
one again. One display can only render into one surface, and a GL
fan-out to several encoder surfaces is a lot of code for a case phones
rarely need. An encoder whose surface fails stays on frames in memory.

The fallback path no longer copies either: the provider's start_sink
hands the reader's buffer to the stream's sink borrowed. A frame-rate
change restarts the surface codec (its cap is fixed when it starts),
and the display is detached while it is resized, so neither consumer
sees a picture of the other's size.

Compiled for aarch64-linux-android only: there is no device here, so
frames per second and CPU use are not measured.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 19:51:39 +03:00
selikhovandClaude Opus 5.5 49e09dbbcc voelin-ui: open the Stream Studio from the Share button
The studio had a button of its own in the top bar (and the phone's
header), apart from the Share button. The Share buttons (the voice
buttons on the desktop, Go Live on the phone) now open a small menu:
"Share screen", the quick share of a screen or a window as before, or
"Stream Studio". While a share runs they open its dialog directly, as
before; while the studio is live, "Share screen" is off and the button
shows the live state. The separate studio buttons are gone.

Checked headless on the demo UI: the menu opens above the button, and
each entry opens the share dialog or the studio.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 18:59:51 +03:00
selikhovandClaude Opus 5.5 6f0e88d1d5 voelin-media: find the person for the studio's background replacement
Blur, image and colour backgrounds were cut around a centred oval: no
segmentation model was in the build. `segment::HumanSeg` (feature
`segment`, on by default) now runs PP-HumanSeg, PaddleSeg's portrait
segmentation model as OpenCV Zoo ships it (Apache-2.0, 6 MB, bundled in
crates/voelin-media/models with its licence and SHA-256), on the CPU with
tract-onnx: the frame squeezed to 192x192 RGB, the probability of a person
per pixel out as the mask. It is the default segmenter; the model is
parsed and optimised once per process on the segmentation thread, and if
it does not load the oval stands in. Builds without the feature keep the
oval.

One mask takes about 50 ms on one core (tract is optimised in dev builds
too, as voelin-media already is; unoptimised it took 430 ms), so the 10
masks a second cost about half a core. A new test checks the model loads,
the mask size, that an empty evenly lit room has next to nobody in it, and
the time per mask; the frame-path tests now use the oval explicitly, since
they need a mask known in advance. On a photo of a person the mask
follows the silhouette, arms and legs included (checked by eye; the photo
is not committed). Not yet tried with a camera.

The notices list the model and its licence; THIRD_PARTY_NOTICES.md is
regenerated for tract and its dependencies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 18:22:56 +03:00
selikhovandClaude Opus 5.5 0790bb38cf voelin-ui: let "Choose via system dialog" always open the portal's dialog
After a share that granted a portal restore token, every later share
passed the stored token, and xdg-desktop-portal restored the earlier
choice without showing its picker: on Wayland the share dialog's only
source, "Choose via system dialog", never showed a dialog again, and
nothing could change what was shared.

That entry now never sends the token, so the portal always asks (and may
grant a new token, which is stored as before). With a stored token the
share dialog lists a second entry, "Same as last time", which restores
the last choice without the dialog. The studio's portal sources are added
without a token and ask every time; docs/studio.md claimed the token was
written back into the scene, which the UI does not do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 18:07:27 +03:00
selikhovandClaude Opus 5.5 7aa4077479 Offer the codecs every TeamSpeak client decodes before H.264
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>
2026-10-03 17:50:37 +03:00
selikhovandClaude Opus 5.5 a8e87474c0 voelin-media: run the X11 capture test only on a test display
The test maps windows, moves the pointer and captures the screen of
whatever DISPLAY names. On a desktop session (XWayland included) a plain
`cargo test` therefore ran it on the user's real screen. Take the display
from VOELIN_X11_TEST_DISPLAY instead, as the X11 hotkey test of
voelin-platform already does and as CI sets it under xvfb-run, so the
test only ever runs on a display made for it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 17:50:24 +03:00
selikhovandClaude Opus 5.5 28b2bb1925 voelin-ui: keep the demo studio's game capture clear of the LIVE badge
The sample studio's "Game Capture" is the synthetic test pattern, whose
frame counter is drawn large in its top-left corner, exactly where the
preview puts LIVE and the timer: the screenshots showed half-hidden
glyphs there. The sample source now crops the pattern's top 120 rows
away (it still covers the frame), and the studio screenshots are taken
again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 12:24:56 +03:00
selikhovandClaude Opus 5.5 ddc717a9f0 Merge the Stream Studio UI
The studio inside the main window (scenes, sources, preview with LIVE,
timer and viewers, the audio mixer with meters and gains, stream chat,
stream settings with a simulcast layer editor, Share Window/Screen,
Record Clip, Go Live, End Stream), the same studio in its own window,
and a phone layout. Also an engine fix: a camera's new background
effect is applied instead of being kept from the old one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 11:57:48 +03:00
selikhovandClaude Opus 5.5 389b2206f2 Describe the Stream Studio screen in docs/ui.md, with screenshots
What each part shows, how it opens for a screenshot and what of the
engine it uses; how the window of its own shares the controller; the
studio.ui setting; the sample studio; its limits. docs/studio.md points
there and says that another background effect restarts a source's
input. The headless example also drops XDG_SESSION_TYPE, as the script
now does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 11:50:36 +03:00
selikhovandClaude Opus 5.5 6292d16fef Merge the zero-copy GPU path for screen capture
A captured RGB DMA-BUF is converted to NV12 and scaled per simulcast
layer on the GPU, into surfaces the VA-API encoders take as they are;
the CPU never reads the frame. Used while every layer's encoder is
VA-API, with the unchanged CPU path otherwise, and switched on the fly.
The portal offers the GPU's tiled layout ahead of LINEAR. Measured with
the test pattern as DMA-BUFs: 1440p60 h264_vaapi at 0.10 cores instead
of 0.34-0.52; a real portal capture through this path is still to run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 11:48:21 +03:00
selikhovandClaude Opus 5.5 fd783b7151 docs/media.md: the streamer's GPU path, and what it costs
Describe how captured DMA-BUFs now reach VA-API encoders (the GPU path in
the pipeline, GpuConverter and GpuFrame, encode_gpu, the portal's tiled
offer and renegotiation, synthetic_dmabuf and `bench --dmabuf`), and
record the release measurements of the whole streamer on both paths with
the test pattern handed over as DMA-BUFs:

- 1440p60 h264_vaapi: 0.10 cores against 0.34-0.52, every frame on the
  GPU, 2.0-2.7 ms of the capture thread waiting for it;
- simulcast 1440p30 + 720p30 + 360p15: 0.06 cores against 0.26-0.38;
- 1080p60 av1_vaapi: 0.06 cores against 0.29.

The verification table gains the new tests, and says plainly that the
GPU path has not met a real portal capture yet, nor the tiled offer a
compositor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 11:45:20 +03:00
selikhovandClaude Opus 5.5 92f49cdffd Merge the fix for AMF crashing the app during the encoder probe
AMD's AMF runtime is not safe to open on several threads at once; the
probe did exactly that and crashed the app inside avcodec_open2. AMF
opens are serialised, and on Linux AMF is used only on request
(VOELIN_FFMPEG_AMF=1): VA-API drives the same encoder there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 07:22:01 +03:00
selikhovandClaude Opus 5.5 5de0627a45 voelin-media: keep AMF's runtime from crashing the app during the probe
The desktop app died at startup under Xvfb with SIGSEGV in libamfrt64,
inside avcodec_open2 while the encoder probe opened h264_amf, hevc_amf
and av1_amf on parallel threads. Reproduced with the probe alone: 10 of
420 runs crashed with four to eight processes probing at once, every one
in AMF's process-wide AMFFactoryHelper (Init, or Terminate dlclose-ing a
library) while AMFContextImpl::InitVulkan created an encoder's device.
Serialising AMF opens within the process removed it: none of 600 runs
crashed, with the processes still probing together. So the race is
between threads of one process, not between processes.

Two changes:

- AMF encoders are opened and closed one at a time in the process. That
  fixes the race wherever AMF is used: the probe, simulcast layers
  opening together, and Windows, where AMF is the AMD encoder.

- On Linux AMF is not used unless VOELIN_FFMPEG_AMF=1. FfmpegEncoder::new
  refuses it with the reason, so neither the probe, nor the factories, nor
  a direct caller loads the runtime at all. VA-API drives the same VCN
  encoder there, measured as fast with less CPU, and only VA-API takes
  DMA-BUFs without a copy; AMF on Linux is AMD's closed runtime on top of
  Vulkan, and a library that is never loaded cannot crash the app.

Not done: running the self-tests in a child process. A clean child does
not reproduce the state of the process that opens the encoder afterwards
(here the race only showed under load), so it would pass a backend that
can still crash the app, and every binary's main would have to cooperate.

Tests: the AMF refusal through FfmpegEncoder::new, the probe reporting
the reason without libamfrt mapped into the process, and an ignored
stress test that opens every AMF encoder on parallel threads 40 times
(with VOELIN_FFMPEG_AMF=1 it passes; the probe loop it replaces crashed).

On this machine the automatic H.264 encoder changes from h264_amf to
h264_vaapi.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 07:19:41 +03:00
selikhovandClaude Opus 5.5 08162182d4 Merge the server screens of the new design
Chat with author grouping, reactions, file cards and the composer;
a resizable members panel grouped by server group with badges and a
member card; pinned-message and topic drawers; the voice-channel grid
with stream cards; the watch-stream screen with viewers, volume, chat
and a full-window pop-out. Screenshots run headless on Xvfb with
WAYLAND_DISPLAY removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 07:07:08 +03:00
selikhovandClaude Opus 5.5 9960fe106e Describe the server page in docs/ui.md; screenshots of its final state
docs/ui.md gains a section on the server page: each part (chat, members
panel, member card, pins, topics, voice channel, watching a stream), the
`VOELIN_OPEN` switch that shows it, and the engine events and requests
it uses. The settings table lists `ui.members_width`, the switches and
the screenshot script are described as they now work, and the limits say
what the design shows that we leave out (offline members, a quality
picker without layer information, a second window for the pop-out).

The screenshots are taken again so they all show the chat at its newest
message. The user card's avatar has the green ring while our voice goes
out, the speaking indicator of the compact voice controls.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 06:56:37 +03:00
selikhovandClaude Opus 5.5 cf0a0211c1 Merge the GPU validation of the hardware video path
Measured on a real RX 7900 GRE with FFmpeg 9: VA-API and AMF encode
1080p60 and 1440p60 at a quarter to half a core, simulcast included;
RGB DMA-BUFs are converted to NV12 on the GPU; Wayland screen capture
delivers frames again (it delivered none) and switches to shared memory
where reading GPU memory is slow; the H.264 level of the SPS matches
the offer; AV1 is cropped to what this GPU really encodes; FFmpeg 9's
structure offsets are checked against its headers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 06:55:32 +03:00
selikhovandClaude Opus 5.5 eef80b54a2 voelin-ui: open chats at the newest message, and jump to pins
Nothing set the position of the message list, so a chat opened at the
oldest loaded message and new ones arrived out of sight below. The list
now starts at its end and follows new messages while it is there;
scrolling up stops that until the end is reached again, and another tab
starts at its end.

Jumping to a pinned message highlighted it but did not scroll: it now
scrolls to the message (to where an average row would be, as the
standard list estimates it, since rows differ in height) and leaves an
open topic for the chat.

The members panel could be dragged no wider than 420 px; it can now
take what the window allows while the chat keeps 400 px.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 06:49:46 +03:00
selikhovandClaude Opus 5.5 2a75b64465 docs/media.md: the CPU range of the hardware encoders includes the re-run
The summary under the tables still gave 0.20-0.42 cores, the range before
the av1_vaapi re-run added 0.38-0.52.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 06:43:22 +03:00
selikhovandClaude Opus 5.5 0f8db57c71 docs/media.md: av1_vaapi now holds its bitrate
Add the re-measured av1_vaapi rows next to the first ones (5982 kbit/s
for 6000 asked at 1080p60, 9920 for 10000 at 1440p60, against 6211 and
10794 before), with what the encoder-only measurements showed: only the
rate-control buffer moved Mesa's AV1 rate control, and with two seconds
the stream is no burstier than the other hardware encoders'. The CPU
figures of these later runs are given as ranges with a control run,
because the machine was in use and they varied between runs while the
bitrates repeated exactly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 06:42:44 +03:00
selikhovandClaude Opus 5.5 1d7891d9b1 voelin-ui: show how many watch a stream, from the gateway's directory
The viewer count in the player and on the stream cards was never filled
in a real session: the engine subscribes to the gateway's stream
directory, whose entries carry the number of viewers, but the UI dropped
those updates. Keep the counts per session by stream id from
`GatewayUpdate::Streams`, `StreamStarted`, `StreamUpdated`,
`StreamRegistered` and `StreamEnded`, and show them in the player ("12
watching") and on the voice channel's stream cards. The sample data
answers with a directory, like a gateway, instead of setting the count.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 06:40:50 +03:00
selikhovandClaude Opus 5.5 4747756f24 voelin-ui: new screenshots of the server screens
The pictures in docs/screenshots/ showed the server page before the
design's layout. They are taken again with scripts/shots.sh, and the new
screens get their own: the voice channel, the pins, the topics, an open
topic, the member card and the stream popped out.

`VOELIN_OPEN=topic:<id>` now fills the sample topic as the gateway would
when it is opened (it was answered once at start and then cleared), and
the top bar's members button also closes an open drawer, like the chat
header's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 06:33:35 +03:00
selikhovandClaude Opus 5.5 5a64861aaa docs/media.md: the GPU colour conversion and what zero-copy costs
Describe the encoder's half of zero-copy as it now is: RGB DMA-BUFs
converted to NV12 by VA-API video processing on FFmpeg's display, why
libva is driven directly instead of libavfilter, and the colour
description that keeps Mesa from converting the transfer function.
Record the measurement (0.08-0.09 ms of CPU per 2560x1440 frame against
4.3-5.2 ms through shared memory), the checks against the CPU conversion,
the flush crash a failed import exposed, and libva among the licenses.

Say plainly what is still not reached: the streamer's sink does not take
DMA-BUFs, so no captured frame has used this path, and a real capture
through it needs that sink and another portal run. Also correct the
portal threshold, which 9b09e7b moved from 6 to 1 ns per pixel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 02:43:11 +03:00
selikhovandClaude Opus 5.5 7d7e26a397 voelin-media: say how the background mask is really sampled
The segment docs promised a bilinear, feathered mask; the frame path
samples the nearest mask pixel and relies on the mask's own soft edge.
Say so, here and in docs/studio.md, rather than promise a smoothing that
is not there: a model's sharper mask will want it, and that is the place
to add it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 02:29:15 +03:00
selikhovandClaude Opus 5.5 e361156c70 Describe the Stream Studio in docs/studio.md
The studio had module docs but no page saying how its parts fit, what
the UI drives it with, which settings it keeps, and what is tested for
real against what only compiles. docs/studio.md covers the scene format
(with an example), the compositor and its numbers, cameras, background
replacement and the fact that no person segmentation model is in the
build yet, the outputs, the controller's commands and events and the
preview tap, the engine's hooks and settings keys, the voelinctl
commands, and the verification status. docs/media.md points to it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 02:22:57 +03:00
selikhovandClaude Opus 5.5 f826d09e7b docs/media.md: what the GPU encoders' output decodes to
Record the hardware round-trip per encoder and size, the AV1 padding it
uncovered on this GPU (1080 rows sent as 1082, other sizes padded to
64x16) and the crop that replaced it, and that the AV1 decoder has now
decoded the streams of five encoders rather than none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 02:04:44 +03:00
selikhovandClaude Opus 5.5 6d1dd65c17 Take screenshots on the Xvfb server, not on the Wayland desktop
winit prefers Wayland when WAYLAND_DISPLAY is set, so `xvfb-run` in a
Wayland session still opened the window on the desktop, where the
compositor chose its size. That looked like the X server ignoring the
requested size. Remove the variable for the screenshot run, and size the
Xvfb screen like the window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 01:56:31 +03:00
selikhov 5b70c44ba9 Merge branch 'worktree-agent-a7f9f51b4ced7cef7' into worktree-agent-a97633f32fc7a58c8 2026-10-03 01:43:37 +03:00
faumarayandClaude Opus 5 b7534cc128 docs/media.md: what a real Wayland capture costs, before and after
The low screen-share frame rates on Wayland had never been reproduced here.
Record the run that did: what the broken DMA-BUF mapping did, what reading a
discrete GPU's buffers with the CPU costs against shared memory, and where
the threshold that chooses between them now sits.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-29 23:51:11 +03:00
faumarayandClaude Opus 5 91bca224d7 docs/media.md: the DMA-BUF import is tested, the capture path still is not
Separate the two halves of zero-copy that the measurements now tell apart:
the import into a VA-API encoder carries a real tiled buffer on this GPU,
while nothing from screen capture reaches it, because the portal delivers RGB
and because Ingest never accepts DMA-BUFs in the first place.

Also record the layer shape the import expects against the one a driver
exports, which the test uncovered.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-29 23:32:04 +03:00
faumarayandClaude Opus 5 678d46e2b5 docs/media.md: the hardware video path as measured on a real GPU
Everything about the FFmpeg encoders was written without a GPU to run them
on. Record what a Radeon RX 7900 GRE with FFmpeg 9.0.1 actually does:
software against VA-API and AMF at 1080p60 and 1440p60, a simulcast run, and
what the numbers mean (every encoder holds the frame rate, so the difference
is CPU — 0.20-0.42 cores against 1.16-2.55 — and the steady state is 1.02
allocations per encoded frame on hardware as on software).

Also record what the measurements found and changed: the H.264 level the
encoders emit against the one the offer advertises, the probe's startup cost
and the third-party output it used to print, and the libavutil 61 offsets.
The verification table now separates the hardware that was tested here from
the hardware that was not, and says plainly that the zero-copy import has
still never carried a frame because the GPU colour conversion is missing and
that the portal measurement did not run.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-29 18:43:48 +03:00
faumarayandClaude Opus 5 4b26832bcf Say in docs/identity.md what import actually does and does not
The format description was written before the code; bring it in line with what
shipped, and be explicit about the two costs a reader would otherwise discover
the hard way: `immutable` means an identity the running client has not yet
checkpointed is not seen, and the Qt secrets file path is best-effort because
no such file existed to develop against.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-29 18:35:08 +03:00
faumarayandClaude Opus 5 90f234cff4 Import identities from the official clients
Switching to Voelin should not mean starting over on every server: the unique
id is the key pair, and a user who cannot bring it along loses every server
group they have. So read the forms the official clients keep it in — the
TeamSpeak 3 `.ini` export, the `ProtobufItems` items both clients write, and
the older `Identities/<n>/…` rows — and store them through voelin-store,
skipping unique ids the store already has instead of adding a second copy.

Export back to the `.ini` form in the same module: an importer without an
exporter traps people here, which is the thing being fixed.

The clients' databases hold private keys and may be open in a running client,
so they are opened read-only and `immutable`: no lock, no shared-memory file,
no write-ahead log replay, nothing of the user's changed to read it. The cost
is that an identity written but not yet checkpointed is not seen, which is the
right way round.

Three field numbers do not earn a protobuf dependency; the wire reader is
twenty lines and skips what it does not understand. An item is taken as an
identity only when its declared type says so, never because a field number
happens to match.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-29 13:44:41 +03:00
faumarayandClaude Opus 5 840d9ce366 Describe where TeamSpeak keeps identities
Both official clients store identities in a `ProtobufItems` table of their
`settings.db`, not in the settings rows: one protobuf item per object, the item
type in field 6 selecting which payload field carries the body, and type 1
(field 17) holding the TeamSpeak 3 export string plus a nickname. Working that
out is the prerequisite for importing, so write it down before the code.

The myTeamSpeak account record sits in the same database and is easy to mistake
for an identity store; note that it carries no key pair and that the account
service stays out of scope, so the question is not reopened.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-29 13:36:40 +03:00
Claude 2f19a340f7 Merge video encoders through FFmpeg loaded at runtime
H.264, HEVC, AV1, VP9 and VP8 on VA-API, NVENC, Quick Sync, AMF, Media
Foundation, VideoToolbox and the software encoders the system FFmpeg
has, found at runtime without a version allow-list and self-tested per
backend. Viewers get the codec they answered, with one encoder per codec
only while someone needs it, and H.264's level follows the stream.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-29 06:11:26 +00:00
Claude 9cdc336c2d voelin-media: bitrate increases reach encoders that cannot change it running
VA-API, AMF, SVT-AV1 and the other wrappers without a live bitrate change
applied a new target only at the next keyframe, so a still screen kept
the bandwidth estimate's low start value for good. An increase of half or
more now reopens the session (a keyframe) once it is five seconds old;
smaller ones still wait for a keyframe, drops below half apply at once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-29 01:13:44 +00:00
Claude c4021b9859 voelin-core: live test of a viewer that answers another codec
Against the TeamSpeak 6 dev server: the streamer offers VP9 (its stream
codec) and VP8, a viewer that decodes only VP8 answers VP8 and decodes
pictures from the encoder made for it, and the VP9 encoder, wanted by
nobody, idles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-29 01:12:15 +00:00
Claude d769ab8910 docs: FFmpeg encoders, per-viewer codecs, how to install FFmpeg
docs/media.md: how FFmpeg is found (VOELIN_FFMPEG_DIR, VOELIN_FFMPEG,
any major version), which struct fields are read and how they are
checked, the backends and their realtime settings, runtime bitrate and
size changes, buffers, what is zero-copy and what is missing (the GPU
colour conversion), installing FFmpeg per OS, the offer with several
codecs and an encoder per codec viewers chose, the computed H.264 level,
the new API, voelinctl, licenses and what was tested how.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-29 01:10:26 +00:00
Claude 71d51d1271 Merge the stream audio mixer into the engine gaps branch
settings.rs: both sides added built-in keys; the list keeps the stream
audio sources and adds the cache, file transfer and privacy keys (20).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-29 01:00:34 +00:00
Claude f60d06e367 docs: server details, files, avatars, messages and contacts
The architecture document describes what the engine now offers for the
new UI: client and server details and groups in the presence, channel
files and chat file links, the avatar and icon cache, pokes, private and
offline messages, and contacts with friends' presence and blocking, with
the protocol facts they rest on (avatar file names, icon ids, TS6 unique
ids for offline messages, the transfer port).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-29 00:57:41 +00:00
Claude ba69a4f62d Merge the stream audio mixer and application audio sources
Stream audio is mixed from any number of sources (desktop, chosen apps,
the shared window's app, the processed microphone), each with gain,
mute and meters, changeable while live. Desktop audio now leaves out
Voelin's own playback on Linux, Windows and Android.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-28 19:49:51 +00:00
Claude 757d7c6382 docs/media.md: stream audio sources, the mixer, application capture
A "Stream audio" section covers the source kinds, how the mixer
behaves (latency, underruns, drift, limiter, meters), the audio thread's
clock and RTP time, live reconfiguration and per-source errors, the
stream.audio_sources setting, and per platform how application audio is
captured (all but ours, one app, the app list). The PipeWire note no
longer says our voices reach viewers, the pipeline diagram and streamer
bullets name the mixer, and the verification table lists the new tests
and what is only type-checked (WASAPI) or only compiled (Android).

The link manager's module doc also covers the marker property used in
sandboxes and the skipping of loopback and filter outputs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-28 19:25:57 +00:00