2 Commits

2 changed files with 16 additions and 5 deletions
+1 -1
View File
@@ -150,7 +150,7 @@ environment = """
REGISTRY=git.infra.msai.al/mca/parking_solution REGISTRY=git.infra.msai.al/mca/parking_solution
# Lab: pinned to the SAME stage-<sha> as the booth whose bug is being reproduced (bump # Lab: pinned to the SAME stage-<sha> as the booth whose bug is being reproduced (bump
# alongside it). A lab may float, but a reproduction must run the booth's exact image. # alongside it). A lab may float, but a reproduction must run the booth's exact image.
TAG=stage-2c3bdb7 TAG=stage-52354d1
COOKIE_SECURE=0 COOKIE_SECURE=0
# EVERY registered module (apps/server/src/modules + @parking/shared MODULES): parking, # EVERY registered module (apps/server/src/modules + @parking/shared MODULES): parking,
# validation (the Bar), carwash. The compose default is only parking,validation, so the full # validation (the Bar), carwash. The compose default is only parking,validation, so the full
+15 -4
View File
@@ -37,7 +37,7 @@ A tile streams while its camera is active — **30 s after the camera's last veh
moves and every 15–25 s while it stands, so a waiting car keeps it live) — or while the large view moves and every 15–25 s while it stands, so a waiting car keeps it live) — or while the large view
is open on Live. It also stops on ✕, logout, or a dropped booth feed (resumes on reconnect). The is open on Live. It also stops on ✕, logout, or a dropped booth feed (resumes on reconnect). The
camera session closes 5 s after the last viewer anywhere stops (RTSP TEARDOWN). No upper bound. camera session closes 5 s after the last viewer anywhere stops (RTSP TEARDOWN). No upper bound.
The large live view is the 640×360 sub-stream scaled up; the Snapshot side shows the stored The large live view is the 1280×720 sub-stream (the same stream as the tile); the Snapshot side shows the stored
evidence still (full resolution when the camera's snapshot stream is Main). evidence still (full resolution when the camera's snapshot stream is Main).
## Decision ## Decision
@@ -82,6 +82,17 @@ agreement.
- Not measured: several live sessions on one camera at once (the hub opens one), a stream - Not measured: several live sessions on one camera at once (the hub opens one), a stream
alongside a browser left on the camera's web UI, and the G3H model. alongside a browser left on the camera's web UI, and the G3H model.
- `102/picture` returns a 640×360 JPEG after the codec switch. - `102/picture` returns a 640×360 JPEG after the codec switch.
- **Raised to 1280×720 MJPEG** (both cameras, same day, user's approval, for the large view; only
width/height changed). RTSP: `.6` 12.2 fps ≈ 1030 KB/s, frames ≈ 83 KB; `.7` 20 fps ≈ 990 KB/s,
frames ≈ 49 KB; first frame 120–190 ms; RFC 2435 header still type 1, Q 63 / 48. Over a
135 s stream: main-stream stills `.6` 0/169 → 0/251 HTTP 503 (avg 0.16 → 0.23 s per still —
slower, not failing); `.7` 3/159 → 4/330 (the known transient `deviceBusy`); sub-stream stills
638/638 and 757/757 HTTP 200. Server end to end: three viewers `connecting → live` in
95–148 ms, 7–9 fps each, zero malformed JPEGs. Per viewer at the 10 fps cap that is ≈ 0.5–0.8 MB/s.
- **Main stream in the large view: not possible on this transport.** RTP/JPEG carries width and
height as one byte × 8 (ceiling 2040×2040), and 101 is the 4MP/8MP H.264 ANPR/evidence stream.
A true main-stream view would be a separate H.264 pipeline (depacketizer, in-browser decode,
keyframe wait, unverified in the desktop shell).
- **End to end** (server + scratch DB + both cameras, 2026-11-17): a simulated vehicle push → - **End to end** (server + scratch DB + both cameras, 2026-11-17): a simulated vehicle push →
`camera-activity` on `/api/ws`; two viewers on the entry camera and one on the exit camera went `camera-activity` on `/api/ws`; two viewers on the entry camera and one on the exit camera went
`connecting → live` in 151 / 181 ms, 8–10 fps each, zero malformed JPEGs. `connecting → live` in 151 / 181 ms, 8–10 fps each, zero malformed JPEGs.
@@ -93,8 +104,8 @@ Set the camera's **sub-stream (102) video encoding to MJPEG** (web UI: Configura
H.264 the tile says *"camera stream is H264, not MJPEG"* and stays on the snapshot. Added to H.264 the tile says *"camera stream is H264, not MJPEG"* and stays on the snapshot. Added to
[[site-device-installation]] §3. On a camera whose snapshot stream is set to **Sub** (the G3H [[site-device-installation]] §3. On a camera whose snapshot stream is set to **Sub** (the G3H
workaround), the sub-stream resolution is both the ANPR/evidence still and the live view — MJPEG on workaround), the sub-stream resolution is both the ANPR/evidence still and the live view — MJPEG on
the G2 offers 640×360, 640×480 or 1280×720 on channel 102; raising it costs bandwidth (~300 KB/s the G2 offers 640×360, 640×480 or 1280×720 on channel 102; park-lab runs 1280×720 (~1 MB/s per camera
at 640×360). Dahua cameras have no live view yet (tile shows the reason). while live, ~300 KB/s at 640×360). Dahua cameras have no live view yet (tile shows the reason).
## Consequences elsewhere ## Consequences elsewhere
@@ -123,7 +134,7 @@ reconnect); the close rules held.
## Not yet verified ## Not yet verified
- The Tauri/WebKitGTK shell (binary WS frames through `@tauri-apps/plugin-websocket` arrive as a - The Tauri/WebKitGTK shell (binary WS frames through `@tauri-apps/plugin-websocket` arrive as a
number array over IPC — fine at 10 fps × 25 KB, to be measured). Its CSP already allows `blob:` number array over IPC — at 1280×720 that is up to 10 fps × 83 KB, to be measured). Its CSP already allows `blob:`
images. images.
- Through Caddy (`reverse_proxy` upgrades WebSockets; not exercised). - Through Caddy (`reverse_proxy` upgrades WebSockets; not exercised).
- The live → snapshot return 30 s after the last push in the browser (covered by unit tests only). - The live → snapshot return 30 s after the last push in the browser (covered by unit tests only).