testing-web-capture
FreeNo executable scriptsNot checkedEnd-to-end testing of the StreamKit web-capture gateway demo (examples/web-capture) with the native servo plugin. Use when verifying clip/cast endpoints…
by streamer45★ 24 GitHub starsAbout this skill
Testing the web-capture gateway demo
Setup
- Go toolchain is required for the gateway (
/usr/local/go/bin/go); install from go.dev tarball if missing. - Build + deploy the servo plugin:
just build-plugin-native-servo && just copy-plugins-native.- Verify freshness:
md5sum target/plugins/release/libservo_web.so .plugins/native/servo/libservo_web.somust match and have a recent timestamp. Stale.sofiles are a known source of white frames / cross-request corruption. - skit loads plugins only at startup — restart
just skitafter copying.
- Verify freshness:
- Start backend:
just skit(127.0.0.1:4545; auth Auto disables auth on loopback, no token needed locally). - Start gateway:
cd examples/web-capture && go run ./cmd/gateway --listen :8080 --skit-url http://127.0.0.1:4545.--load-timeout-secs N/GATEWAY_LOAD_TIMEOUT_SECS(default 5) sets servo'sload_timeout_secsin both pipeline templates. It must stay below the gateway's hard-coded 8smseReadyTimeout, or cast viewers 503.- To test a non-default value, run a second gateway on another port (e.g.
--listen :8081 --load-timeout-secs 2); both can share one skit.
Endpoints
- Finite clip:
http://127.0.0.1:8080/clip/dur=20s,res=1280x720/<target-url>→ MP4 (h264-sw). - Live cast:
http://127.0.0.1:8080/cast/<target-url>→ WebM (vp9-sw). curl with-H 'Accept: video/webm'to grab raw stream. - SSRF guard blocks loopback/private targets — use public sites (streamkit.dev is dark-themed, example.com light-themed: a good high-contrast pair for leak checks).
Verifying frames (don't trust playback alone)
- Extract frames:
ffmpeg -i clip.mp4 -vf "select='eq(n,30)+eq(n,300)'" -vsync 0 f_%d.png - Live cast WebM files have no cues —
ffmpeg -ss/-sseofseeking silently returns the first frame. Extract frames withselect='eq(n,N)'full decodes instead, and beware lexicographic sorting of%d-numbered frame files. - Pixel stats with PIL: min/max grey and dark-pixel fraction distinguish blank white (min≈255), blank black/pre-paint (max≈0), and real content.
- Since the first-load gate (plugin >= 0.2.2), clips/casts should show page content from frame 0 (the node holds emission until the page is ready, capped by
load_timeout_secs, default 30s). Pre-0.2.2 builds may show all-black cold-start clips or blank lead-ins. - Since plugin >= 0.2.3, "ready" is load-complete OR ~2s after first paint — ad-heavy pages that never fire their load event no longer stall the full timeout. The gateway also caps
load_timeout_secsat 5s (GATEWAY_LOAD_TIMEOUT_SECS), so worst-case time-to-first-byte through the gateway is ~5s plus one GOP (~1s). - Some pages (e.g. streamkit.dev) may still show a single white first frame — the page's own pre-theme paint, not a gate failure.
- Testing the load-timeout expiry path via the gateway is hard: SSRF blocks local hanging servers and public "slow" endpoints (httpstat.us sleep, closed ports) fail fast rather than hang. In practice pages release via load-complete or the post-paint branch, so the expiry warn may never fire — say so rather than claiming that branch was covered.
- The gate branch that fired is visible in the skit log (plugin logs,
grep emission /tmp/skit.log):Initial page loaded; starting frame emission(load-complete),Initial page painted but load still pending after 2s; …(the >=0.2.3 post-paint branch — expect this on ad-heavy pages like cnn.com/theverge.com, ~2.2s after servo init), orPage did not finish loading within Ns; …(timeout cap).
Verifying which params actually reached the pipeline
- Cast sessions: the gateway logs
cast: session <id> created (key="<url>|WxH"); thencurl http://127.0.0.1:4545/api/v1/sessions/<id>/pipelinereturns the deployed graph JSON — grep thewebnode's params forload_timeout_secs,fps,width/height.GET /api/v1/sessionslists live session ids. - Cast dedupe/refcount evidence is in the gateway log: one
session … createdline perurl|WxHkey plusviewer left … (viewers=N)on disconnect. Note the gateway logs a request only when it completes, so still-streaming viewers do not appear yet — cross-check withGET /api/v1/sessions(count must stay 1).
Browser playback checks
- Pointing the browser address bar at
/cast/<url>does serve the gateway autoplay player page, but the browser-automation tool times out on navigate/view because a live stream keeps the pageloadevent pending. Workaround: serve a tiny local page (python3 -m http.server 8090) whose<video src>is the gateway URL, plus asetIntervalreadout ofreadyState/currentTime/buffered/paused/error. The media path is identical and the page load completes, so screenshots work — and the on-screencurrentTimeis proof playback advances. - Autoplay may land paused in this environment: click the play control, then compare
currentTimeacross two views. - A cast joined mid-session starts at a non-zero
currentTime(live stream)
Install testing-web-capture in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the testing-web-capture skill do?
End-to-end testing of the StreamKit web-capture gateway demo (examples/web-capture) with the native servo plugin. Use when verifying clip/cast endpoints, servo page rendering, or cross-session pixel isolation.
How do I install the testing-web-capture skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the testing-web-capture skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
by Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
by Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
by Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
by Anthropic