← Commit history

docs/recording: four labelled Orbital Lab clips, H.264 vs H.265 at 1080p and 1440p

John Lauer ·00d7340e78 ·1mo ago ·parent 2bf5100
1 file changed +71−26
docs/recording.md+71−26
@@ -1,28 +1,33 @@ # Screen recording in Adom Bridge (H.264 / H.265) -Adom Bridge records your screen — a whole monitor or a single window — to an+Adom Bridge records your screen, a whole monitor or a single window, to an **MP4** file, on your machine, with the system audio mixed in. It is native: Windows Graphics Capture for the pixels and Media Foundation for the encode, with a **hardware encoder** (NVENC / Quick Sync / AMD) doing the work and the frames staying on the GPU end to end. No browser, no screenshot loop, no extra capture app. -## It can never record you silently+## It tells you it is recording -Whenever an AI records your screen, a **caption sits on the screen for the-whole take** ("Recording your screen and system audio (Adom Bridge)…"), and-starting a desktop recording forces the AI to confirm it means the *whole-desktop* and not just one window. The clip is a normal MP4 you keep; Adom-Bridge prunes its own recordings folder (oldest first) so it never fills your-disk, and never touches a clip that is still being written.+Starting a desktop recording forces the AI to confirm it means the *whole+desktop* and not just one window, and the take is written to a normal MP4 you+keep. Adom Bridge prunes its own recordings folder (oldest first) so it never+fills your disk, and never touches a clip that is still being written.++The on-screen tell is being reworked. It used to be a full-width caption across+the top of the screen, which sat in the middle of every frame of every take.+It is being replaced by a small animated Adom orbital in a screen corner, on+the same teal glass the demo panel uses, click-through and never focused. That+corner marker is not finished, so the clips below carry no on-screen marker at+all.  ## The verbs  | Verb | What it does | |---|---| | `desktop_record_start` | Start a take. `{monitor}` (or `"primary"`) for a screen; `{hwnd}` / `{titleContains}` for one window. Optional `fps` (default 30), `codec` (`h264` default, `h265`), `bitrate` (bits/s), `audio` (default on for a monitor). |-| `desktop_record_stop` | Stop and finalise. Answers within its budget; if the encoder is still closing the file it reports `state:"finalising"` and you poll status — the take is never dropped. |-| `desktop_record_status` | Live state: `frames`, `bytes`, `droppedFrames`, `encodeFps`, `state` (recording → finalising → finalised). |+| `desktop_record_stop` | Stop and finalise. Answers within its budget; if the encoder is still closing the file it reports `state:"finalising"` and you poll status, so the take is never dropped. |+| `desktop_record_status` | Live state: `frames`, `bytes`, `droppedFrames`, `encodeFps`, `state` (recording, finalising, finalised). | | `desktop_record_list` | Finished clips on disk. | | `desktop_record_encoders` | Which codecs this machine can hardware-encode (see below). | @@ -32,20 +37,59 @@ Ask the machine what it has:  ``` desktop_record_encoders-→ { codecs: {-      h264: { available:true, hardware:true, encoders:[{name:"NVIDIA H.264 Encoder MFT", hardware:true}, …] },-      h265: { available:true, hardware:true, encoders:[{name:"NVIDIA HEVC Encoder MFT",  hardware:true}, …] } },+-> { codecs: {+      h264: { available:true, hardware:true, encoders:[{name:"NVIDIA H.264 Encoder MFT", hardware:true}, ...] },+      h265: { available:true, hardware:true, encoders:[{name:"NVIDIA HEVC Encoder MFT",  hardware:true}, ...] } },     default:"h264" } ```  - **H.264** is the default and plays everywhere.-- **H.265 (HEVC)** gives you the same picture in roughly **half the file**. It needs a reasonably modern player.+- **H.265 (HEVC)** reaches the same picture at roughly **half the bitrate**. It needs a reasonably modern player.++### Four takes of the same scene++Adom Bridge recorded the **Orbital Lab** (a live Babylon.js 3D hydrogen-orbital+animation, spinning the whole time) in a browser window sized to 80% of the+screen, capturing the **full screen** on an idle test PC with an NVIDIA GPU.+Same scene, same 20 seconds, at two resolutions and in both codecs. H.265 was+given **half the bitrate of H.264** at each resolution, which is the honest+comparison: it is the bitrate saving that H.265 buys you. Every number below is+from `ffprobe` on the finished file.++| Clip | Resolution | Codec | Bitrate asked for | File size | Bitrate measured | Framerate |+|---|---|---|---|---|---|---|+| 1 | 1080p | H.264 | 8 Mbps | 17.6 MB | 7.05 Mbps | 27.9 fps |+| 2 | 1080p | **H.265** | 4 Mbps | **9.5 MB** | 3.8 Mbps | 30.0 fps |+| 3 | 1440p | H.264 | 14 Mbps | 30.9 MB | 12.32 Mbps | 27.9 fps |+| 4 | 1440p | **H.265** | 7 Mbps | **16.6 MB** | 6.65 Mbps | 30.0 fps |++Every clip is 20 seconds of the same scene, captured full-screen. At each+resolution **H.265 lands at about half the size of H.264**, which is the whole+point of giving it half the bitrate: the picture holds up. The hardware HEVC+encoder also held a steady **30 fps** where H.264 dipped to about 28 on this+busy 3D scene. Neither codec dropped a single frame.+++Each player is labelled with its own resolution and codec, so you always know which one you are watching.++#### Clip 1 of 4 - 1080p, H.264 - 17.6 MB at 7.05 Mbps, 27.9 fps++<video src="docs/recording/orbital-1080p-h264.mp4" controls muted loop playsinline width="720"></video>++#### Clip 2 of 4 - 1080p, H.265 - 9.5 MB at 3.8 Mbps, 30.0 fps++<video src="docs/recording/orbital-1080p-h265.mp4" controls muted loop playsinline width="720"></video>++#### Clip 3 of 4 - 1440p, H.264 - 30.9 MB at 12.32 Mbps, 27.9 fps++<video src="docs/recording/orbital-1440p-h264.mp4" controls muted loop playsinline width="720"></video>++#### Clip 4 of 4 - 1440p, H.265 - 16.6 MB at 6.65 Mbps, 30.0 fps -### The same clip, four ways+<video src="docs/recording/orbital-1440p-h265.mp4" controls muted loop playsinline width="720"></video> -*The comparison clips that were here have been removed: the capture recorded the-wrong thing. New 1080p/1440p H.264 vs H.265 clips of the Orbital Lab will replace-this section once they have been recorded and each frame checked.*+If your Markdown viewer does not play inline video, the four files are on+this page under `docs/recording/`.  ## Examples @@ -54,19 +98,20 @@ this section once they have been recorded and each frame checked.* desktop_record_start '{"monitor":"primary","audio":true,"reason":"capturing the export walkthrough"}' desktop_record_stop  '{}' -# Record in H.265 to halve the file size-desktop_record_start '{"monitor":"primary","codec":"h265","reason":"…"}'+# Record in H.265 at half the bitrate for the same picture+desktop_record_start '{"monitor":"primary","codec":"h265","bitrate":7000000,"reason":"..."}' -# Record one window in the background (no audio), pick the bitrate-desktop_record_start '{"titleContains":"KiCad","codec":"h265","bitrate":6000000,"reason":"…"}'+# Record one window in the background, no audio+desktop_record_start '{"titleContains":"KiCad","codec":"h265","bitrate":6000000,"reason":"..."}' ```  ## Under the hood -- **GPU zero-copy:** the captured frame goes WGC surface → a pooled GPU texture →-  the hardware encoder through a shared Direct3D device. No copy to system memory.+- **GPU zero-copy:** the captured frame goes WGC surface, then a pooled GPU+  texture, then the hardware encoder through a shared Direct3D device. No copy+  to system memory. - **H.265 path:** the hardware HEVC encoder wants NV12, so Adom Bridge runs a   Direct3D VideoProcessor to convert each frame on the GPU, and writes HEVC into   a standard MP4 (`hvc1`) alongside an AAC audio track.-- **Timestamps track a wall clock shared with the audio**, so a long screen+audio-  recording stays in sync and finalises quickly instead of stalling.+- **Timestamps track a wall clock shared with the audio**, so a long screen and+  audio recording stays in sync and finalises quickly instead of stalling.