Repository navigation
feat: optional real-time monitoring dashboard - #6
Merged
Merged
Conversation
stream.sh --dashboard (or --dashboard-port N, default 8080) serves a web UI from the container: connection state, RTT, packet loss, jitter, bitrate, resolution, frame rate, end-to-end latency, codecs, and a live view of the container's logs. The page is its own MoQ subscriber over WebTransport and measures that session. For end-to-end latency, the proxies before `moq import` record an ingest clock (lib/ingest-clock.mjs, plus the new dashboard/server/ingest-tap.mjs for the base and SGAI pipelines). dashboard/ (React, Vite, Tailwind CSS, Chart.js) is built in its own Containerfile stage; only the static output and a dependency-free Node server reach the image. Without the flag the pipeline is unchanged. Also moves the fMP4 parser from ssai/impression-tracker.mjs to lib/fmp4.mjs (FMP4Inspector) so the tap can share it, and adds the CI job smoke-test-podman-dashboard.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an optional web dashboard, served from the same container as the stream. Without the new flags nothing changes: the pipeline stays exactly
ffmpeg | moq import.What it shows:
--abr-ladder, a selector picks the rendition.How it works:
getStats()where the browser has it, the relay'sPROBERTT, RFC 3550 jitter on the video frames, the catalog for resolution and codecs.moq importrecord when each media time was due at the source (lib/ingest-clock.mjs; the base and SGAI pipelines get a small pass-through tap). The browser compares that with arrival time and corrects for the clock offset between host and podman VM.dashboard/(React, Vite, Tailwind CSS, Chart.js) is built in its ownContainerfilestage. Only the static files and a dependency-free Node server (dashboard/server/) reach the image.--auth/--auth-key, the page uses the viewer token automatically.Also:
ssai/impression-tracker.mjstolib/fmp4.mjs(FMP4Inspector), shared with the tap. No behavior change.smoke-test-podman-dashboard. The.mjssyntax check now skips everynode_modules/.Tested locally in Chrome:
--abr-ladder(incl. switching renditions), CSAI, SSAI, SSAI +--authon a custom port, and a 400px-wide layout.--abr-ladderon a 5-vCPU podman VM shows the encode falling behind live (frame rate under nominal, latency growing). That is the stream's real state, not a dashboard issue.Known limits: SGAI's host-side publisher logs stay in the terminal; packet loss needs WebTransport
getStats()(headless Chrome reports none).