Skip to content

armgit / Piik

Public Imported from GitHub
0

Free, open-source screen sharing for private live streams with friends. Watch together in a browser or self-host Piik. 免费开源的私密屏幕共享,支持游戏直播、一起看电影与自部署。

docs: record adaptive H264 production candidate

AAA6abd5c803046
diff --git a/docs/adr/0007-path-isolated-representation-quality.md b/docs/adr/0007-path-isolated-representation-quality.md
index 7a3b2f0b..aac3c2dd 100644
--- a/docs/adr/0007-path-isolated-representation-quality.md
+++ b/docs/adr/0007-path-isolated-representation-quality.md
@@ -1,6 +1,7 @@
# ADR-0007: Framework-Owned Media Quality Adaptation
-- Status: Accepted; adaptive Browser codec implementation pending
+- Status: Accepted; deployed candidate under production acceptance, canonical
+ integration pending
- Date: 2026-08-19
- Last reviewed: 2026-08-26
diff --git a/docs/deployment.md b/docs/deployment.md
index e6a5d56e..98c11ffa 100644
--- a/docs/deployment.md
+++ b/docs/deployment.md
@@ -3,7 +3,7 @@
Last verified against upstream documentation: 2026-08-24.
This page records production running exact deployed application/runtime revision
-`b6a8a5fa7fe622dd1a61a2455f7151dcfc27ad55`, release `b6a8a5f`, and the single
+`55511773b2f9118802440fdec90ad06080b19772`, release `5551177`, and the single
Browser `screener-v12` contract. Product direction and pending work are owned by
[project memory](./project-memory.md) and [the TODO ledger](./todo.md).
@@ -25,22 +25,23 @@ ICE/UDP only. Ordinary peer ICE remains STUN-only and production coturn uses the
tracked STUN-only configuration with TCP/TLS disabled. The source and production
configure no TURN, ICE/TCP, media TCP, or TLS-relayed media.
-Production runs exact `b6a8a5fa7fe622dd1a61a2455f7151dcfc27ad55`, release
-`b6a8a5f`, from `/opt/screener/releases/b6a8a5f`. The immutable runtime tar
+Production runs exact `55511773b2f9118802440fdec90ad06080b19772`, release
+`5551177`, from `/opt/screener/releases/5551177`. The immutable runtime tar
SHA-256 is
-`cb5b91b46e9b213e9228bb5b6319df8f3f8865c5b5b39e8b1460830892fdc8e0`.
+`3688b348fd8757e19fc1acb5523d2ecc90aa3553a30cd3a640e0a9a011e696e3`.
Its 39-file path/size/hash manifest SHA-256 is
-`810f0dac7fcbe9d762da0502594d49b9ce7475a3b9f780eb602cee83ca609b06`.
+`279fb808ccff21c0fa07d0ff7f7afddc1d33de09446ca8446489e4970ee6d8d5`.
Local and public `/healthz` return 200; Screener, LiveKit, coturn, and nginx are
active with `NRestarts=0`. The public main Browser asset is
-`assets/index-vyrTbru-.js` with SHA-256
-`96755b2bdfdc46f68be3c74d27eb9b310593cb472fb473f4406b4461f9107ee1`.
+`assets/index-uQk7n3NE.js` with SHA-256
+`14012100209475b3fc8851774a1985b3fb17de18a1f80e6fb0c0cf773dcfe0ff`.
-The release deploys the single Browser `screener-v12` wire, fixed VP8 for Browser
-direct, browser-relay, and SFU video, pinned LiveKit default screen-share
+The release deploys the single Browser `screener-v12` wire and one internal,
+content-independent H.264 sender gate with VP8 fallback across Browser direct,
+browser-relay, and SFU video. It retains pinned LiveKit default screen-share
representations, Dynacast and server send-side BWE without an application layer
selector, video `contentHint = "motion"`, no
-codec UI/state/wire, random four-digit memory rooms with a 24-hour dormant lease,
+codec selector/state/wire, random four-digit memory rooms with a 24-hour dormant lease,
a room-lived 22-character grant,
orthogonal `open | private` grant/code admission,
20-Viewer room admission, the uniform endpoint media-copy cap `2`, and the
@@ -281,7 +282,7 @@ lifetime. An actively connected Host prevents expiry; explicit stop or Host
disconnect starts the lease, and only the exact Host token renews it before
expiry. Viewer activity never renews ownership. `ROOM_DATABASE_PATH` and
`ROOM_TTL_SECONDS` fail startup even when blank.
-Production `b6a8a5f` accepts 1 through 20 and explicitly selects 20. This is an
+Production accepts 1 through 20 and explicitly selects 20. This is an
admission limit, not evidence that every publisher, network, or quality profile
can sustain that many streams.
`ENDPOINT_MEDIA_COPY_CAPACITY` defaults to 2 and accepts only 1, 2, or 3. It is
@@ -294,7 +295,7 @@ must fail or wait before a fourth endpoint copy is issued.
Supplying the removed `MAX_PEER_RELAY_DOWNSTREAM_EDGES`, even blank, fails
startup.
-Production release `b6a8a5f` runs the deployed server and Browser assets
+Production release `5551177` runs the deployed server and Browser assets
atomically on `screener-v12`; every stale Browser or executable-sender wire fails
before room authority. Native senders and helpers are outside this release.
diff --git a/docs/project-memory.md b/docs/project-memory.md
index 91c06463..a01ec539 100644
--- a/docs/project-memory.md
+++ b/docs/project-memory.md
@@ -69,14 +69,15 @@ Last updated: 2026-08-26
## Media Quality
-- Current source and production still use VP8 only. The accepted next Browser
- contract runs one sender-scoped actual-sender preflight with a deterministic
- moving probe track sized to the current share target, so captured-content
- motion cannot decide encoder capability. Proved senders prefer
+- Production candidate `5551177` runs one sender-scoped actual-sender preflight
+ with a deterministic moving probe track sized to the current share target, so
+ captured-content motion cannot decide encoder capability. Proved senders prefer
H.264 with native VP8 fallback, while failed/inconclusive senders remain
VP8-only. Codec UI/state/wire, persistent codec cache, parallel codec media,
backup publication, and active-edge codec switching remain absent. Display
video uses `contentHint = "motion"` and display audio uses `contentHint = "music"`.
+ Canonical `main` has accepted this contract but its application tree remains
+ fixed VP8 until production acceptance and integration.
- Windows Chrome 151 uses software VP8 and exposes no Web control for selecting
NVENC, AMF, QSV, a GPU, or an MFT. Edge, non-Windows paths, and real-game CPU
contention remain evidence-specific.
@@ -85,8 +86,9 @@ Last updated: 2026-08-26
advanced FPS and bitrate remain independent.
- WebRTC owns direct/peer media adaptation. The Host reapplies the selected video
profile after answer negotiation; no periodic application controller exists.
-- The SFU publisher sets VP8 and the selected ceiling but no custom simulcast
- layers. Pinned LiveKit defaults own representations, Dynacast owns aggregate
+- The production SFU publisher uses the Host's H.264/VP8 decision and selected
+ ceiling but no custom simulcast layers. Pinned LiveKit defaults own
+ representations, Dynacast owns aggregate
demand, and server send-side BWE owns subscriber forwarding. AdaptiveStream
stays disabled because any Viewer may relay its received track.
- Screen audio requests capture by default and offers live 64/128/192 kbps
@@ -128,9 +130,8 @@ Last updated: 2026-08-26
## Current Priority
-1. Implement and verify the accepted adaptive Browser H.264 sender gate without
- changing the deployed VP8 release, then simplify the local preferred-room
- record while retaining the server lease.
+1. Validate and integrate production candidate `5551177`, then simplify the
+ local preferred-room record while retaining the server lease.
2. Complete the mobile Viewer lifecycle matrix and representative real-network
route/media acceptance.
diff --git a/docs/research/browser-background-capture.md b/docs/research/browser-background-capture.md
index b1e51a4d..fe76fdbd 100644
--- a/docs/research/browser-background-capture.md
+++ b/docs/research/browser-background-capture.md
@@ -46,13 +46,13 @@ does not say that minimizing the separate capturing page must reduce capture.
Capture constraints are post-selection preferences and allow frame decimation,
so requested `maxFramerate` is not proof of actual source or encoded frame rate.
-The accepted Browser video codec is fixed VP8. Every run still records the
-actual negotiated codec and encoder rather than inferring either from
-configuration. Encoder implementation is a diagnostic variable only after a
-stable baseline exists; neither codec nor encoder choice is a page-keepalive
-mechanism.
+Production candidate `5551177` may select H.264 or VP8 through its bounded sender
+gate. Every run still records the actual negotiated codec and encoder rather than
+inferring either from configuration. Encoder implementation is a diagnostic
+variable only after a stable baseline exists; neither codec nor encoder choice
+is a page-keepalive mechanism.
-The accepted Browser path uses VP8 and `contentHint = "motion"`. A controlled
+The accepted Browser path uses `contentHint = "motion"`. A controlled
probe showed that this standard game-motion hint can spatially downscale to
preserve cadence; that quality tradeoff is independent from page lifecycle and
does not explain a state-dependent background report. The physical baseline
@@ -67,9 +67,10 @@ not inherit this desktop Host result.
## Current Source Boundary
-Current source and production use fixed VP8, video `contentHint = "motion"`,
-audio `contentHint = "music"`, and no codec UI, quality state, or wire field;
-their exact identity is owned by [status](../status.md).
+Canonical source remains fixed VP8 while production candidate `5551177` uses the
+content-independent H.264 gate with VP8 fallback. Both use video
+`contentHint = "motion"`, audio `contentHint = "music"`, and no codec selector or
+wire field; their exact identity is owned by [status](../status.md).
The current path does not claim or implement a page-keepalive mechanism, and
deployment health supplies no physical background-capture evidence.
diff --git a/docs/research/realtime-quality-adaptation.md b/docs/research/realtime-quality-adaptation.md
index 4c0e33e3..e47fce0d 100644
--- a/docs/research/realtime-quality-adaptation.md
+++ b/docs/research/realtime-quality-adaptation.md
@@ -7,11 +7,13 @@
## Current Conclusion
-Browser video is fixed VP8. Display video uses `contentHint = "motion"`, and
-display audio uses `contentHint = "music"`. The three recommended profiles and
-advanced settings are ceilings, not delivery guarantees. WebRTC owns direct and
-peer congestion control; LiveKit owns SFU representations, Dynacast, subscriber
-bandwidth estimation, and layer forwarding.
+Production candidate `5551177` uses a content-independent H.264 sender gate with
+VP8 fallback; canonical source remains fixed VP8 until acceptance and integration.
+Display video uses `contentHint = "motion"`, and display audio uses
+`contentHint = "music"`. The three recommended profiles and advanced settings
+are ceilings, not delivery guarantees. WebRTC owns direct and peer congestion
+control; LiveKit owns SFU representations, Dynacast, subscriber bandwidth
+estimation, and layer forwarding.
On current Windows Chrome, Browser WebRTC VP8 is a software path. Chromium 151's
Windows hardware encoder backends do not enumerate VP8, and the measured Edge
diff --git a/docs/status.md b/docs/status.md
index 2cc1aed1..1a8c37b4 100644
--- a/docs/status.md
+++ b/docs/status.md
@@ -8,15 +8,15 @@ This is the current execution index. Git history owns completed timelines;
## Production
- `https://share.bonfire.icu` runs exact application/runtime revision
- `b6a8a5fa7fe622dd1a61a2455f7151dcfc27ad55`, release `b6a8a5f`, wire
- `screener-v12`, from `/opt/screener/releases/b6a8a5f`. The immutable runtime
+ `55511773b2f9118802440fdec90ad06080b19772`, release `5551177`, wire
+ `screener-v12`, from `/opt/screener/releases/5551177`. The immutable runtime
tar SHA-256 is
- `cb5b91b46e9b213e9228bb5b6319df8f3f8865c5b5b39e8b1460830892fdc8e0`;
+ `3688b348fd8757e19fc1acb5523d2ecc90aa3553a30cd3a640e0a9a011e696e3`;
its 39-file manifest SHA-256 is
- `810f0dac7fcbe9d762da0502594d49b9ce7475a3b9f780eb602cee83ca609b06`.
-- The served Browser entry references `assets/index-vyrTbru-.js`; the public
- asset is 492898 bytes with SHA-256
- `96755b2bdfdc46f68be3c74d27eb9b310593cb472fb473f4406b4461f9107ee1`.
+ `279fb808ccff21c0fa07d0ff7f7afddc1d33de09446ca8446489e4970ee6d8d5`.
+- The served Browser entry references `assets/index-uQk7n3NE.js`; the public
+ asset is 500228 bytes with SHA-256
+ `14012100209475b3fc8851774a1985b3fb17de18a1f80e6fb0c0cf773dcfe0ff`.
Public `/healthz` returns 200. The release postflight found Screener, LiveKit,
coturn, and nginx active with zero restarts.
- Production uses process-memory four-digit rooms, a 24-hour dormant lease,
@@ -26,8 +26,10 @@ This is the current execution index. Git history owns completed timelines;
ingress is TCP 80/443; Node 8787 and LiveKit control/signaling 7880 are
private. TURN, ICE/TCP, media TCP, TLS relay, port 5349, and relay ranges are
disabled.
-- Browser video is fixed VP8 with `contentHint = "motion"`; audio uses `music`.
- The SFU publisher leaves representation construction to pinned LiveKit,
+- Browser video uses the content-independent H.264 sender gate with VP8
+ fallback and retains `contentHint = "motion"`; audio uses `music`. The SFU
+ publisher uses the Host's one codec decision, leaves representation
+ construction to pinned LiveKit,
enables Dynacast, uses server send-side BWE, keeps AdaptiveStream disabled,
and configures no external ICE servers on Browser SFU PCs.
- Screen audio provides live 64/128/192 kbps ceilings with 128 default. SFU
@@ -36,9 +38,10 @@ This is the current execution index. Git history owns completed timelines;
## Current Source
-- Canonical root `main` is clean and its application/runtime tree matches exact
- production revision `b6a8a5f`. Auxiliary branches and worktrees do not
- supersede it.
+- Canonical root `main` is clean at `376be27`; its application/runtime tree still
+ matches `b6a8a5f`. Production is the separately verified rapid-iteration
+ candidate `5551177`; that candidate does not supersede canonical truth and is
+ not yet integrated.
- One event-driven controller owns the committed graph and one room-serial child
operation. Initial direct acquisition uses a five-second foreground window;
exact transport-connected progress may retain that candidate through the
@@ -56,10 +59,9 @@ This is the current execution index. Git history owns completed timelines;
## Current Milestone
-1. Implement the accepted content-independent Browser H.264 sender preflight
- and VP8 fallback across direct, Browser relay, and the Host's single SFU publication. Current
- source and production remain fixed VP8 until that candidate is integrated and
- separately released.
+1. Validate production candidate `5551177` across real Host, Browser relay and
+ SFU paths, then integrate the accepted content-independent H.264 gate and VP8
+ fallback into canonical `main`.
2. Remove the client-side preferred-room expiry/renewal timer while keeping the
server dormant lease; the explicit replace-room UI follows the codec work.
3. Finish the Android Chrome and iOS Safari Viewer lifecycle matrix.
diff --git a/docs/todo.md b/docs/todo.md
index 7d670c1a..3823d009 100644
--- a/docs/todo.md
+++ b/docs/todo.md
@@ -7,12 +7,13 @@ later topic is not implementation authority by itself.
## Now
-1. **Adaptive Browser H.264.** Implement the accepted sender-scoped actual-sender
- preflight with a deterministic moving probe track at the current share target.
- Proved Host/relay senders prefer H.264 with native VP8 fallback;
- failed or inconclusive senders use VP8. The Host decision owns its one SFU
- publication with backup codec disabled. Add no codec UI, wire state,
- persistent cache, parallel codec route, or active-edge churn.
+1. **Adaptive Browser H.264 acceptance and integration.** Validate deployed
+ candidate `5551177` with real Host, Browser-relay and SFU paths, then integrate
+ it into canonical `main`. The content-independent sender probe prefers H.264
+ only when target cadence is proved and otherwise uses VP8. Keep codec selector,
+ wire state, persistent cache, parallel codec route, backup publication and
+ active-edge churn absent; connection details may display the actual negotiated
+ codec.
2. **Preferred room simplification and replacement.** Keep the server dormant
lease unchanged, but store the latest preferred code without a client expiry
or renewal timer. After H.264, add the Host refresh-icon action immediately
diff --git a/docs/verification-status.md b/docs/verification-status.md
index 4b132126..64e814ab 100644
--- a/docs/verification-status.md
+++ b/docs/verification-status.md
@@ -8,14 +8,14 @@ may be interpreted. Git and pull requests own routine completed checks.
## Current Production Identity
- Production runs exact application/runtime revision
- `b6a8a5fa7fe622dd1a61a2455f7151dcfc27ad55`, release `b6a8a5f`, wire
- `screener-v12`, from `/opt/screener/releases/b6a8a5f`.
+ `55511773b2f9118802440fdec90ad06080b19772`, release `5551177`, wire
+ `screener-v12`, from `/opt/screener/releases/5551177`.
- Runtime tar SHA-256:
- `cb5b91b46e9b213e9228bb5b6319df8f3f8865c5b5b39e8b1460830892fdc8e0`.
+ `3688b348fd8757e19fc1acb5523d2ecc90aa3553a30cd3a640e0a9a011e696e3`.
The 39-file manifest SHA-256 is
- `810f0dac7fcbe9d762da0502594d49b9ce7475a3b9f780eb602cee83ca609b06`.
-- Public Browser asset `assets/index-vyrTbru-.js` is 492898 bytes with SHA-256
- `96755b2bdfdc46f68be3c74d27eb9b310593cb472fb473f4406b4461f9107ee1`.
+ `279fb808ccff21c0fa07d0ff7f7afddc1d33de09446ca8446489e4970ee6d8d5`.
+- Public Browser asset `assets/index-uQk7n3NE.js` is 500228 bytes with SHA-256
+ `14012100209475b3fc8851774a1985b3fb17de18a1f80e6fb0c0cf773dcfe0ff`.
Public `/healthz` returns 200. Release postflight found Screener, LiveKit,
coturn, and nginx active with zero restarts.
@@ -43,20 +43,28 @@ may be interpreted. Git and pull requests own routine completed checks.
evidence close the measured Chrome VP8 path as software. Short local controls
held 1080p30, while 1080p60 was primarily bandwidth-limited and spatially
adapted. Edge and real-game contention remain open in realtime-quality research.
+- The content-independent sender gate selected VP8 on the measured Chrome 151
+ AMD path and H.264 on Chrome 153 NVIDIA with both moving and static shared
+ content. Static content therefore no longer prevents a codec decision; these
+ two local cohorts do not replace broader real-game/device acceptance.
- Direct, Browser-relay, and SFU paths advanced video plus screen audio at
- 64/128/256 kbps ceilings and after source replacement. The old constant
+ 64/128/192 kbps ceilings and after source replacement. The old constant
active-audio `1 kbps` display is closed. Exact SFU weak-network behavior after
RED was disabled remains open.
- Browser SFU publisher/subscriber PCs use empty external ICE-server lists while
ordinary peers retain deployment STUN. The reported Host/Viewer TUN conflict
was closed by that isolation without adding TURN or TCP media.
-## Current Source Evidence
+## Current Source And Candidate Evidence
-- Current `b6a8a5f` uses Browser VP8 with `contentHint = "motion"`, reapplies the
+- Canonical application tree `b6a8a5f` uses Browser VP8 with
+ `contentHint = "motion"`, reapplies the
selected video profile after answer negotiation, leaves SFU representation
construction to pinned LiveKit, keeps Dynacast/send-side BWE, disables
AdaptiveStream, and disables SFU audio RED.
+- Production candidate `5551177` adds the content-independent H.264 sender gate,
+ VP8 fallback and actual negotiated codec details without codec wire state,
+ cache, parallel media or active-edge switching.
- Viewer page-resume decoded-stall rebaselining, current-frame presentation
authority, hidden-page stall suppression, retryable failure reporting, native
controls, and same-route manual reconnect are current source behavior. Mobile