← Commit history

README: add a full Recording section — example GIF preview, the two recorders (CDP screencast VP9 vs MediaRecorder), and a WebM/MP4/GIF format comparison with real sizes, pros/cons, and verified ffmpeg convert commands (incl. the H.264 even-dimension gotcha); pkg 1.8.25

John Lauer ·73c0f68cc7 · ·parent 626ceb3
2 files changed +51−1
README.md+50
@@ -43,6 +43,56 @@ adom-desktop browser_readiness '{}'      # → {ready:true, browserKind:"chrome" Full everyday usage (tabs, recording, window ownership, cold-start playbook) is in the `pup` skill (`SKILL.md`). +## Recording++pup can record what it drives — a **single tab/window** or the **whole desktop** — straight from the+cloud, with no HUD and no need to bring the window forward.++![Example pup recording — driving the Adom wiki, captured in the background](https://wiki.adom.inc/api/v1/pages/adom-desktop-puppeteer-bridge/files/pup-recording-demo.gif)++*Above: a GIF preview of a real `browser_record` capture (≈8.6 s, the tab navigating the Adom wiki, recorded in the background on a VM). The native capture is the WebM linked below — this GIF is just an inline preview.*++### Two recorders — pick by what you're capturing++| Verb pair | Captures | How it works under the hood |+|---|---|---|+| **`browser_record_start` / `browser_record_stop`** | ONE pup **tab/window** — the page content | **CDP `Page.startScreencast`** (JPEG frames, up to ~50 fps) piped to **ffmpeg**, encoded to **VP9** in real time → one `.webm`. Tab-scoped at the protocol level, so it captures the exact tab even in the **background** — no `getDisplayMedia`, no picker, no foreground. |+| **`desktop_record_start` / `desktop_record_stop`** | the WHOLE **desktop** (multiple apps, dialogs) | Screen capture via **MediaRecorder** → one `.webm`; ffmpeg remuxes it to stamp a proper Duration. |++```bash+adom-desktop browser_record_start '{"sessionId":"demo-web"}'          # → { recordingId }+# ...drive the scene: navigate, click, type, scroll...+adom-desktop browser_record_stop  '{"sessionId":"demo-web","recordingId":"<id>"}'   # → { path: "...webm" }+```++**ffmpeg** is required for recording. The bridge auto-detects it (a WinGet `Gyan.FFmpeg` install, PATH,+or common dirs) and re-checks **lazily on `record_start`** — so if it's missing you can+`winget install Gyan.FFmpeg` and just retry, no bridge restart. `browser_record_status` /+`browser_record_list` (and the `desktop_record_*` equivalents) report in-flight and finished captures.++### Formats — one native format, easy conversion++pup records to **one** format natively: **WebM (VP9)** — for both recorders. It doesn't offer a format+switch; instead, convert with the bundled ffmpeg when you need MP4 or GIF. Real numbers from the ≈8.6 s+demo above (1264×705):++| Format | Codec | Size | How you get it | Best for | Watch out for |+|---|---|---|---|---|---|+| **WebM** ([view](https://wiki.adom.inc/api/v1/pages/adom-desktop-puppeteer-bridge/files/pup-recording-demo.webm)) | VP9 | **143 KB** | pup's **native** output — no step | Chrome/Edge/Firefox, small + high quality, the source of truth | Older **Safari**, PowerPoint, and some chat apps don't accept VP9/WebM |+| **MP4** ([view](https://wiki.adom.inc/api/v1/pages/adom-desktop-puppeteer-bridge/files/pup-recording-demo.mp4)) | H.264 | **135 KB** | transcode (below) | **Universal** — Safari, iOS, PowerPoint, Slack/Teams, "send it to anyone" | H.264 needs **even width & height** — odd dims (like 705) fail at frame 0; the `scale` filter forces even |+| **GIF** ([view](https://wiki.adom.inc/api/v1/pages/adom-desktop-puppeteer-bridge/files/pup-recording-demo.gif)) | — | **192 KB** | transcode (below) | Auto-playing, looping **inline preview** in any README/chat/GitHub — no player, no click (like the one above) | No audio, capped colors, and it balloons fast at higher fps/resolution/length — keep it short + downscaled |++```bash+# → MP4 (H.264 — universal). The scale filter forces EVEN dimensions (H.264 rejects odd w/h → frame 0).+ffmpeg -i rec.webm -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" -c:v libx264 -crf 23 -pix_fmt yuv420p -movflags +faststart rec.mp4++# → GIF (silent, looping inline preview). Palette pass keeps colors clean; drop fps/scale to shrink.+ffmpeg -i rec.webm -vf "fps=12,scale=640:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" rec.gif+```++**Rule of thumb:** keep **WebM** for archiving + web embeds; make an **MP4** the moment a human on Safari/+PowerPoint/phone needs it; make a short **GIF** only for an inline auto-play preview.+ ## Source & development  This bridge is cloud-owned here (extracted from `adom-desktop/plugins/puppeteer`, mirroring the
package.json+1−1
@@ -1,6 +1,6 @@ {   "slug": "adom-desktop-puppeteer-bridge",-  "version": "1.8.24",+  "version": "1.8.25",   "type": "app",   "description": "CONTAINER-SIDE install \u2014 the pup skill pack in the wiki skillpack layout: the everyday `pup` user skill PLUS two bundled developer sub-skills (pup-bridge-dev, pup-bridge-publish; user-invocable:false, DEVELOPER-only descriptions so they never trigger for everyday users), all dropped into ~/.claude/skills/ AND ~/.codex/skills/ by an explicit install.sh list. It does NOT contain the bridge runtime: the bridge (Node + browser driving) lives on the DESKTOP \u2014 bundled inside Adom Desktop and published on the Releases tab as adom-bridge-puppeteer-v<ver>.zip, which Adom Desktop streams into its bridges-cache. TL;DR: pkg install = the skill pack; the bridge = the Release zip + bundled in Adom Desktop.",   "keywords": [