Saving an App-hosted public site as the startup destination currently reopens its expired address after restart. Persist the hosting selection instead and enter the current ready address. External sites retain their existing fixed-address preference and approval checks. The Windows MFT request also uses ordinary Baseline while Piik negotiates Constrained Baseline, causing the AMD startup rejection in #538. Request and validate Constrained Baseline without weakening the emitted-stream check. This phase also clears obsolete launcher errors after readiness and restores compact-menu labels. Refs #538. Review the issue for closure after the release is published; merging this PR alone must not close it. Validation: - Web type-check, 108 test files / 1960 tests, production build, and repository hygiene passed. Actual 390px menu layout and the production launcher component's error-to-ready transition passed; the latter used controlled API responses. - Affected Go App, config, launcher and mobile bridge package tests and Go vet passed. - The current Windows App completed two real Cloudflare startup cycles: it stored the hosting mode rather than the address, restored it without a new launch request, entered the fresh loopback page in Chrome and created a room. Both cycles retired their ports and processes. Public HTTPS requests from this runner failed with TLS IOException / ECONNRESET, so public reachability is not claimed by this test. - The Windows hardware H.264 fixture passed on an RTX 4070 SUPER with 360/360 frames, bitrate down/up recovery, and unchanged SPS validation. The affected RX 7800 XT is covered by the reporter's controlled profile comparison and Browser decode evidence. The local integrated AMD adapter failed during MFT activation, before the profile request; it is not a passing AMD regression test. No wire-version change, dependency update, room-data migration or automatic App-discovery feature is included. ## Release notes ### English This maintenance update fixes Windows H.264 startup and reopening App-hosted sites. - Request the H.264 profile that Piik actually negotiates. This fixes the AMD encoder startup rejection reported in #538 without loosening the encoded-stream checks or changing the negotiated profile. - When an App-hosted site is saved as the startup destination, restart its Local or public-invitation mode instead of reopening an expired temporary address. This applies to desktop and Android Apps. - Clear a stale startup error once the site is ready, and restore only startup modes available in the current App. - Keep action labels visible in compact header menus on narrow screens. Existing 2.x App/site compatibility and saved room data are preserved. Update the App for the Windows encoder and startup fixes. Refresh open site pages after updating a hosted Server; App-local pages use the Web UI included in the updated App package. If a temporary invitation address was saved before this update, start the site again from the App launcher and select “Open this site when Piik App starts” again. Previously saved addresses do not identify which App created them. ### 中文 本次维护更新修复 Windows H.264 启动失败,以及 App 自托管站点的再次打开问题。 - 让 H.264 编码器请求与 Piik 实际协商的编码规格一致,修复 #538 报告的 AMD 编码器启动被拒绝问题;不放宽码流检查,也不改变协商规格。 - 将 App 自己托管的站点设为启动入口后,下次启动会恢复局域网或公网邀请模式,不再打开已经失效的临时网址。桌面和 Android App 均适用。 - 站点已经就绪时清除过期的启动错误,只恢复当前 App 可用的启动模式。 - 保留窄屏顶部菜单中的操作文字,避免按钮只剩图标。 保留现有 2.x App/站点兼容性及已保存的房间数据。Windows 编码器和启动修复需要更新 App。托管 Server 更新后请刷新已打开的页面;App 本地页面使用新版 App 包内的网页。 曾保存过旧临时网址的用户,请从 App 启动页重新开启站点,并重新勾选一次“启动 App 时打开此站点”。旧记录无法判断这个临时网址由哪个 App 创建。
Windows Capture Process
This isolated Windows process provides native capture for Piik App. It enumerates local displays and visible top-level windows, binds each window to its PID and process creation time, and has independent modes for:
- capability discovery (
--probe); - process-tree inclusion/exclusion or default-device loopback PCM
(
--capture-audio); or - WGC/D3D11 screen/window video with adapter-bound Media Foundation H.264 or
libvpx VP8 output (
--capture-video --codec auto|h264|vp8). - bounded 320x180 BMP source previews (
--preview), delivered once per target over the local control connection rather than the media route.
The video command receives the current product resolution, frame-rate, bitrate, and quality preference. A replacement process applies live changes while the Go session retains its Pion source and connections.
Sharing and source previews request borderless access by default when Windows
exposes IsBorderRequired and GraphicsCaptureAccess (build 20348+, including
Windows 11). The probe advertises API availability; the source-picker preference
passes --show-capture-border when the Host wants the sharing border visible.
One capture-local owner applies completed access without waiting
for consent, and cancels pending access on retirement. Unsupported APIs, denial
or failure retain ordinary capture; another capture session may still require a
border. The property value is a preference, not proof that the border is invisible.
Consumer Windows 10 through build 19045 lacks this API; the current WGC capture
path keeps its system border there.
Video and audio run as separate bounded child processes. A source whose audio
loopback cannot be initialized keeps video available and reports audio
unavailable instead of failing the whole source. Process loopback is probed by
activation rather than inferred from a Windows build number; display sources
normally use the standard render-device loopback available on Windows 10 and
later. The optional --capture-audio exclude <pid> <creation-time> mode requires
a successful exclusion-mode probe, without an additional OS-version gate. Windows 10 isolation still
needs physical verification; see the audio evidence.
It captures all output devices
except the selected process tree, and retires when that process exits. The
screen-audio contract
owns selection and failure behavior.
Auto measures delivered frame cadence through the target-profile encoding
pipeline within a four-second selection budget; H.264 that sustains the target
needs no software comparison. The selected codec remains fixed across profile
and source changes. VP8 reads the existing
NV12 surface through one staging texture and uses the same encoded-frame
boundary. The process has no network fallback. The App
consumes the selected process or system-audio stream through its native media
edge when the capability probe reports support. Build to the stable project
build/go-check directory for a bounded capability run:
npm run check:native
The checks include synthetic output-worker replacement and failure cases using WARP and a test codec, plus preview cleanup when WGC rejects a hidden test window. They do not capture a user screen or validate a physical encoder.
On a Windows machine with a physical D3D11 adapter, check SDR and HDR-to-SDR conversion:
powershell -NoProfile -File native/capture/windows/build.ps1 -OutputDirectory build/color-check -CheckColor
This sends synthetic RGB, full/limited-range BT.601/BT.709 NV12 and FP16 HDR bars through the production converters. It checks range/matrix, highlight detail, SDR/HDR replacement, white-level changes and retained-frame ownership without capturing the desktop. Decoded H.264/VP8, Browser reception and real HDR displays remain separate media acceptance; fidelity research records current evidence and limits.
The implementation follows Microsoft's MIT-licensed reference samples and
official API contracts without copying their WIL framework. The retained MF
fixture compiles the same encoder source with PIIK_H264_FIXTURE; there is
not a second product MFT implementation.
Shared local outputs use stock WebRTC source/encoder adaptation. H264 keeps
native NV12 surfaces, while WebRTC VP8 reads back into I420. The existing capture
and output mailboxes retain source/generation ownership; adapted sizes and
timestamps cross the same media envelope. The encoder requests one temporal
layer where supported and low-latency mode where writable; these optional
properties do not replace the actual output and Auto cadence checks.
VBV sizing stays with the encoder, allowing bitrate increases within the active profile.
The build caches the pinned WebRTC SDK and matching official MSVC linker/runtime
libraries under build/encoder-pool. A newer installed MSVC keeps its own linker
and runtime; older installations use that pinned minimum, following
Microsoft's binary compatibility rule.
The SDK supplies libvpx, replacing the
separate source build. Only statically linked code and required notices enter
the package, not the SDK/toolchain or another runtime service.
- https://github.com/microsoft/Windows-classic-samples/tree/main/Samples/ApplicationLoopback
- https://github.com/microsoft/Windows.UI.Composition-Win32-Samples/tree/master/cpp/ScreenCaptureforHWND
- https://learn.microsoft.com/en-us/windows/win32/api/audioclientactivationparams/ns-audioclientactivationparams-audioclient_activation_params
- https://learn.microsoft.com/en-us/windows/uwp/audio-video-camera/screen-capture
- https://learn.microsoft.com/en-us/windows/win32/api/windows.graphics.capture.interop/nf-windows-graphics-capture-interop-igraphicscaptureiteminterop-createforwindow
- https://learn.microsoft.com/en-us/uwp/api/windows.graphics.capture.direct3d11captureframepool.createfreethreaded
- https://learn.microsoft.com/en-us/uwp/api/windows.graphics.capture.graphicscapturesession.isborderrequired
- https://github.com/microsoft/Windows.UI.Composition-Win32-Samples/issues/97#issuecomment-1015962518