Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

32.7 KB
Raw Blame

Recording architecture

Recording is a cross-platform session coordinated by Electron and rendered by a platform capture path. The recorder and HUD live in src/components/launch/ and src/hooks/useScreenRecorder.ts; native capture helpers for all three platforms live in electron/native/. Linux falls back to Chromium's display-media APIs only when its helper binary is missing.

Lifecycle

flowchart LR
    H[HUD] --> S[Pick source]
    S --> C[Countdown]
    C --> R[Capture]
    R --> T[Stop]
    T --> F[Files on disk]
    F --> E[Editor opens]

The HUD starts and controls a recording. The source selector chooses a display or window and the countdown gives the user time to prepare. On Linux there is no in-app source selector: the compositor's portal picker takes its place. It is raised before the countdown, not during it — the helper negotiates the portal, reports source-selected, and then waits for record on stdin while the app counts down. Electron resolves the source and output paths, starts the selected capture backend, and records cursor telemetry alongside media. Stop finalizes the media and session files; the resulting paths are passed to the editor as recording assets.

The HUD

LaunchWindow is the recording controller. Its control row exposes recording, pause, source, microphone, system-audio, webcam, cursor, settings, and stop/restart actions through the HUD controls. The overlay is click-through, so it does not intercept the application being recorded — but it is never born that way: the renderer asks for it on mount over hud-overlay-ignore-mouse-events, and electron/windows.ts applies it as setIgnoreMouseEvents(ignore), with no { forward: true }. While the window is input-transparent Chromium delivers it no pointer events at all, so the way back out is a poll: the main process samples the OS cursor and pushes the window-relative point over hud-overlay-cursor, and the renderer hit-tests it to decide when the HUD's own controls temporarily opt into pointer handling. On Linux none of this runs: setIgnoreMouseEvents is a no-op there, so the renderer never asks for click-through and the HUD stays interactive — which is why its drag region sits on the grab handle rather than on the transparent root. (Until #385 the lift was Electron's { forward: true } — a global WH_MOUSE_LL hook on Windows that Windows can revoke without telling the app, leaving the HUD painted and permanently dead. The poll replaced it.)

Electron applies setContentProtection(true) to the HUD window (applyContentProtection in electron/windows.ts). This keeps the controller out of captures and also makes it invisible in screenshots. It is skipped on macOS 26 and later, which never displays a protected window, and on Windows before 11 22H2 (build 22621), where it leaves the click-through HUD unable to take a click (#1105). On those Windows versions the HUD can appear in recordings; on macOS the ScreenCaptureKit helper still excludes it by window id. For a testing session only, OPENSCREEN_DISABLE_CONTENT_PROTECTION=1 disables the protection; the code warns that the HUD then appears in captures. The tray icon is the reliable way to refocus OpenScreen or stop a recording when the click-through HUD is not convenient or is not visible.

Capture backends

Platform Backend Code Produces
Windows Windows Graphics Capture (WGC) helper (C++/Win32), with WASAPI and Media Foundation support electron/native/wgc-capture/ and electron/windows.ts H.264 MP4 screen/window video; system/microphone AAC when enabled; webcam is muxed into the primary MP4 unless a separate webcam path is requested
macOS ScreenCaptureKit helper (Swift), with AVFoundation/VideoToolbox encoding electron/native/screencapturekit/ and electron/native/README.md H.264 MP4 screen/window video and ScreenCaptureKit system audio; microphone may be native where supported; webcam currently remains a separate Electron sidecar
Linux PipeWire capture helper (Rust + C shim) driving the xdg-desktop-portal ScreenCast interface electron/native/pipewire-capture/ and electron/native-bridge/capture/linuxNativeCaptureSession.ts H.264 MP4 screen/window video, PipeWire system/microphone audio, and cursor telemetry from one portal session; webcam stays an Electron sidecar

The division is an invariant: the native helper owns capture, timing, and encoding; Electron owns session orchestration, output-path selection, persistence, and editor handoff. When the Linux helper binary is absent, the recorder falls back to the Electron getDisplayMedia path, which is the one case where Electron still owns the media.

Helper contract

A native session is a child process boundary. Electron starts the platform helper with one structured JSON request and sends runtime commands on stdin; stop finalizes the output. The helper emits newline-delimited JSON events on stdout. The shared shape contains schemaVersion, recordingId, a source (display or window and its bounds), video, audio, optional webcam, optional cursor mode, and outputs paths. The helper reports ready, recording-started, warnings, errors, and recording-stopped events. Windows accepts legacy textual start/stop messages during compatibility handling; the structured events are the reference contract.

Stopping is the part of that boundary that has broken repeatedly (issues #34, #115, #252), so the Windows helper is explicit about it. On stderr it prints [stop-timing] step=command-received the moment it reads stop, then a phase=begin and a completion line per shutdown step; a step that never completes gets phase=abandoned and the process force-exits with code 3, plus a stop-timeout event on stdout naming the step. The distinction the older instrumentation could not make — "the helper never saw the stop" versus "it saw the stop and wedged" — is the first line of that log. Electron keeps a listener on the helper for the whole recording (attachNativeWindowsCaptureOutputDrain) so those lines reach the diagnostics bundle rather than being dropped between start and stop.

Contract field or behavior Windows macOS Linux
Schema schemaVersion: 2 schemaVersion: 1 schemaVersion: 1
Source identity sourceId, displayId, optional windowHandle sourceId, displayId, optional windowId None, and none is possible. See below
Video FPS, dimensions, bitrate FPS, dimensions, bitrate, and hideSystemCursor FPS and optional bitrate; dimensions come from what the compositor negotiates
Audio System loopback and selected microphone flags/device metadata System audio and microphone flags/device metadata; the microphone needs macOS 15 (captureMicrophone), so the HUD and the Rec stage do not offer it on 13 and 14, and a take that asks anyway records without it and reports microphone-unavailable; with no audio input listed it records without it and reports microphone-not-found System and microphone flags; the microphone is matched by PipeWire node.description, not by Chromium device id
Webcam Native Media Foundation first, exact Electron-resolved DirectShow fallback; muxed into primary MP4 by default Electron sidecar attached to the session Electron sidecar attached to the session
Output screenPath, session manifest, and optional webcamPath screenPath and session manifest screenPath, session manifest, and a .cursor.json sidecar
Runtime control stdin pause/resume/stop/cancel; JSON events plus legacy text compatibility Process events and the same lifecycle commands as the process boundary evolves stdin pause/resume/stop; NDJSON events on stdout

Why Linux sends no source identity

org.freedesktop.portal.ScreenCast.SelectSources takes exactly (session, cursor_mode, types, multiple, restore_token, persist_mode). There is no window id, monitor id, or node id a caller may supply, so the compositor's own picker is the only thing that can choose a source — the app cannot ask for one and cannot override the answer. The helper reports what it was given back on stream-started as sourceKind ("monitor", "window" or "virtual"); that reply is the only knowledge the app ever has about what is being recorded, and an absent sourceKind means unknown, not "monitor".

Three consequences follow, and all three were once bugs:

  • The HUD shows no source button on Linux. An in-app picker cannot steer the portal, and the one that existed raised a second portal dialog of its own through desktopCapturer.getSources() whose grant was then discarded — which is why choosing a window there changed nothing.
  • No portal restore token is persisted. Replaying one used to suppress the picker on later runs. Because a token is bound to the source it was minted for, an approved monitor came back on every subsequent recording and the picker — the only source chooser Wayland offers — never reappeared, so "record this window" recorded the whole screen. Answering the picker each time is the cost of being able to choose at all.
  • A window stream is a monitor stream with a crop, and the cursor has to be measured against the crop. mutter never renegotiates the format for a window: it pins the stream to the window's monitor and carves the window out through SPA_META_VideoCrop, which can move on any buffer as the window does. The encoder already reads through that rect (Capture::read_origin), so the file holds the window — but the portal reports the pointer in stream pixels, measured from the monitor's corner. Normalising it against the stream's dimensions therefore described a rectangle the file does not show, and the overlay drew the cursor offset by the crop origin and scaled by the ratio of monitor to window, in every window recording. Capture::content_rect is the rect the file actually holds, and emit_sample is the one place that turns a pointer into a fraction of it.

Electron resolves selected sources, devices, and paths before launching the helper. The helper does not guess a DirectShow camera: Windows receives the resolved selection. A helper error is reported explicitly rather than silently switching a Windows native feature to browser capture.

The microphone is chosen the same way and carries the same requirement: the helper resolves it by id first and by name when that finds nothing — and the id it is given is Chromium's, which names nothing outside the renderer, so the name is what actually does the work. RecordingPrefs therefore carries micDeviceName beside micDeviceId so a HUD rebuilt for a new take knows it without waiting on its own device enumeration. When a particular microphone was asked for — an id other than default, or a name — and neither finds an endpoint, the helper captures the Windows default input and says so as microphone-defaulted rather than doing it quietly. A request that asks for no particular microphone lands on that same default input and warns nothing: there it is the answer rather than a fallback. Name matching is deliberately strict — equal once normalized, or one containing the other, and nothing weaker. Containment is measured in whole words, and a tier that scored shared words has been dropped entirely. Both answered for devices that were not the same one: a requested "micro" sits inside the "microphone" that opens nearly every Windows endpoint name, and "logi" inside "logitech", so a name fitting nothing still selected a device — and silenced the fallback warning by resolving one. npm run test:wgc-mic-selection:win drives the real helper through those cases, because WASAPI cannot run on Linux CI. The camera follows the same rule, and the same removals. "Logi Capture" and "Logitech StreamCam" are two real devices sharing no word, yet "logi" sits inside "logitech" — enough, under the scoring that used to bridge names differing by more than decoration, to win. Containment had to become whole-word for the same reason one layer down: a requested "Logi" is spelled inside "Logitech" without being a word of it, and plain containment resolved a camera on that alone. Choosing a camera Media Foundation cannot enumerate then opened a different camera instead of returning nothing and letting the DirectShow fallback find the real one, which is where every camera Media Foundation cannot see actually lives, NVIDIA Broadcast among them. Scoring zero is what makes that fallback reachable, so it is a real answer rather than a weak match. electron/recording/deviceNameMatching.ts holds the rules and their unit tests for the Electron side; each helper carries its own copy in C++, covered by npm run test:wgc-camera-selection:win because Media Foundation cannot run on Linux CI either. Two things follow from Windows matching a camera by name while Chromium selects one by id. First, the renderer reads both halves off the MediaStreamTrack it opened rather than from separate state, so a request can never carry one camera's id beside another's name — the failure that let the HUD preview show the chosen camera while the recording captured a different one. Second, a camera the helper cannot open is a warning (webcam-unavailable), not a failed recording: the take continues as screen and audio, and the renderer says so at that moment instead of leaving the absence to be discovered in the editor. The DirectShow fallback negotiates the camera's own format first and only asks for RGB32 — inserting a colour converter — when that format is one the helper cannot unpack, which is the only way devices absent from Media Foundation, such as NVIDIA Broadcast, can be captured at all.

Output files and sidecars

Windows and macOS both write their screen video as a fragmented MP4 — MFCreateFMPEG4MediaSink with a one-second MF_MPEG4SINK_MIN_FRAGMENT_DURATION, and AVAssetWriter.movieFragmentInterval respectively. A plain MP4 has no index until the writer's final call emits moov, so a helper that is force-exited before that leaves every captured frame on disk and no way to read them; that is why a frozen recording used to cost the whole file rather than its tail (issues #252 / #292 / #327). Fragmenting does not stop the freeze, it stops the freeze from destroying the recording. Windows falls back to the plain container if the fragmented sink is unavailable and reports which one it used in the encoder-selection event. Linux still writes a plain MP4: frag_keyframe+empty_moov would make the output permanently non-seekable and the native Linux path has no re-index step, so the editor's scrub cost has to be measured first.

A session writes a screen video and a .session.json manifest. Windows normally muxes the webcam into that MP4; when webcamPath is supplied, it writes a separate webcam video. macOS currently writes the webcam as a separate Electron sidecar (webcamVideoPath) because native webcam composition is not part of the helper. Linux follows the Electron recorder's separate media-path convention. Audio that the selected backend captures is encoded into its screen output.

The Windows helper mixes system loopback and microphone into one track, and timestamps it from a running count of emitted frames. That count is advanced by a clock rather than by the arrival of samples: a chunk goes out every 10 ms for as long as the recording runs, filled from whichever source has data and with silence where neither does. Advancing it only when a queue held samples is what made a take that began in silence emit nothing at all — WASAPI loopback delivers no packets while nothing is playing — so the first sound landed at timestamp zero and the track came out shorter than the take. A working microphone concealed it by streaming continuously, which is why it appeared as a system-audio desync on a machine whose microphone had failed. npm run test:wgc-audio-timeline:win measures where a tone played at a known instant actually lands. The mixer writes 100 ms behind real time, and that cushion is what keeps a continuous voice whole: the capture threads poll WASAPI and hand packets over late (15.6 ms at the default timer resolution, more on a busy machine), and mixing at real time zero-filled every chunk whose packet had not arrived yet. The result was holes of up to 10 ms inside words, heard as crackle (#911). The timestamps still come from the frame count, so the cushion delays the writing, not the audio. A pause or a stop writes what it still holds up to that instant, and a resume waits for that before clearing the queues. A source that ran dry, such as loopback after a silence, is queued behind silence as long as the mixer's real lag, so it still lands when it played. The clock is anchored when the timeline begins and at each resume, not when the mixer thread next wakes.

Before the keep-alive below, a mic-only recording did nothing to the render (output) endpoint: system-audio capture was the only path that even opened it, and it reads rather than writes — which reads as idle to some wireless headsets' own firmware idle timers, and they power the set down mid-take (#724: a Corsair Void dropped reliably seven to ten minutes in, as a full disconnect the OS never observes; the USB dongle stays enumerated and the WASAPI endpoints stay ACTIVE throughout, so IMMNotificationClient sees nothing, and neither do the device's PnP properties). The helper therefore keeps the endpoint fed: when system audio is not being captured, it opens a second, ordinary shared-mode render stream on the default output device and writes a 19 kHz tone at 0.3% amplitude for as long as the take runs — above what the large majority of adults can hear, and real signal rather than packets flagged AUDCLNT_BUFFERFLAGS_SILENT, because the same hardware testing that found the timer also found that digital silence does not hold it off while an actual waveform does. The gate is not an optimization: loopback already fills the endpoint with real content when it runs, and anything this stream wrote beside it would be mixed straight into the recording's own system-audio track. It is a workaround, not a fix — the timer lives in the headset's firmware, below everything an application can observe or configure, and the per-vendor setting (iCUE for Corsair, equivalents elsewhere) is the only way to turn it off; "inaudible" is likewise per listener, since hearing range and driver harmonics vary. OPENSCREEN_WGC_DISABLE_AUDIO_KEEPALIVE=1 turns the stream off. OPENSCREEN_WGC_LOG_AUDIO_DEVICE_EVENTS=1 runs a diagnostic device watcher alongside the take, logging endpoint state transitions as JSON events to stderr — with the expectation, learned from #724, that a real firmware drop logs nothing at all, for exactly the reason above.

The macOS helper mixes the same two sources into one AAC track (AudioTrackMixer) and runs the same discipline, arrived at from the opposite direction. There the emit cursor is anchored to the writer session start and advanced by a monotonic clock read off CMClockGetHostTimeClock — the domain ScreenCaptureKit already timestamps its buffers in — with a 10 ms timer on the sample queue moving it while nothing is arriving to move it. The bug it replaces was the anchor, not the counter: anchor was set lazily on the first decoded buffer to max(firstPresentationTime, sessionStart), so audio that first arrived four seconds in made frame zero of the track be four seconds in. The trailing half was worse still — drain() ran only from ingest and finish, and the helper never called writer.endSession(atSourceTime:) at all, so the file ended at the last sample anything happened to deliver. Both halves and any mid-take gap are now one mechanism: chunks go out for as long as the take runs, from whichever source covers them and from silence where none does, and a source is written off for a chunk only once it has gone 250 ms without delivering anything — a decision about when to stop waiting, which shifts nothing, and not a correction, which would. Measured from that source's own last delivery rather than from how far behind the clock its coverage sits, because those differ for a source that is alive but arriving late: a capture path delivering a fixed delay behind the audio it describes would be "behind" forever, so writing it off for that would emit silence and then drop its real samples, every chunk, for the whole take. A pause freezes the clock rather than resetting it, so what follows keeps the position it would have had. Whether ScreenCaptureKit's system-audio output is silence-gapped the way WASAPI loopback is has never been recorded anywhere, and it decides how much of a take the clock is carrying alone rather than how the mixer should work; the helper now reports it per take as audio-timeline, whose undeliveredSeconds is the whole track if the tap is gapped and near zero if it streams silence. That figure counts what each source handed over rather than what came out of the mixer — holes under two seconds are zero-filled into the source's own buffer, so a hole read off the mixed output would come back covered, which is the exact case it exists to catch — and droppedSeconds beside it is the cost side, counting audio that arrived too late to place and reading zero unless the grace is too short for that tap. swift test runs the mixer against a collecting sink and a hand-moved clock on every pull request (swift-macos-helper in ci.yml, the first Swift job this repository has had); npm run test:sck-audio-timeline:mac measures a real tone through a real device, comparing the audio track's length against the video track's in the same file.

The Linux helper mixes the same two sources into one AAC track as well (AudioMix in electron/native/pipewire-capture/src/capture.rs), and its emit cursor is the data-driven one Windows had: AudioEncoder::next_pts is a running count of the samples handed to the encoder, advanced only when a block is encoded, and AudioMix::pump returns early when no input has any. Nothing in that code makes a chunk go out for every chunk of real time — what does is the tap. System audio here is the default sink's MONITOR, and PipeWire keeps delivering its buffers whether or not anything is playing, silence included, where WASAPI loopback simply stops. So the count advances at real time for as long as the take runs and the cursor cannot stall. That is a property of the capture source and not of the timeline code, which is the thing to know before moving Linux audio off the sink monitor: a source that gates silence would reproduce the Windows failure above exactly (#406). The anchor half is a decision rather than an accident — the first video frame sets the epoch and clears the audio rings at that instant ("video frame 0 is now, so audio sample 0 is now too"), which is what keeps the pre-roll captured while the portal picker was up, an interval with no upper bound, from shifting the whole track earlier; cargo test covers it. The tail is covered by Capture::finish, which drains the rings and flushes the AAC encoder before the video flush, so the file ends with the take rather than with the last sound in it. What a mid-take overflow costs is bounded the same way: the ring drops its oldest samples and owes back silence of exactly that length, so the encoder falling two seconds behind leaves a gap where it happened instead of pulling every later sound earlier for the rest of the recording, and it is reported as audio-dropped. npm run test:pw-audio-timeline:linux measures it end to end — a tone played at a known instant, then the audio track's length against the video track's in the same file. Before it, the whole record that any of this held was one sentence in a commit message: a live 29-second capture whose 18-second tone came back as 18 seconds of steady signal, with the two streams ending 62 ms apart (video 29.100 s, audio 29.162 s). That 62 ms is also why the script allows 250 ms between the tracks where the macOS one allows 100: those two come out of a single writer session, and these two do not — the video track ends at the last advance() and the audio track at everything the rings still held, plus AAC's final padded block.

Cursor samples are persisted as cursor telemetry rather than baked into editable-overlay recordings. The loader resolves the sidecar at <videoPath>.cursor.json or through the recording links; see cursor.md for the telemetry format and rendering path.

Known gaps

  • A window with odd client dimensions can produce black video: H.264 encoding requires even dimensions (electron/native/wgc-capture/src/wgc_session.cpp:38).
  • The Windows helper's frame lock (electron/native/wgc-capture/src/main.cpp) is still held across blocking, uninterruptible D3D11 work: the WGC callback's CopyResource, and whatever the video writer does with the frame. A driver that stalls inside either one still costs the recording. What no longer happens is a hang: stop detection runs on CaptureControl::stopMutex, which no frame thread ever touches, and a shutdown watchdog force-exits the helper when a step overruns its budget, naming the step it died in. Each step gets OPENSCREEN_WGC_STEP_BUDGET_MS (8s by default) and that is the bound which normally fires; the whole shutdown is capped by OPENSCREEN_WGC_STOP_BUDGET_MS (50s by default), which the encoder-finalize step alone is allowed to spend in full because a long software-encoder finalize legitimately takes seconds (issue #34). Picking the D3D adapter that actually drives the captured monitor instead of adapter 0 is still outstanding.
  • The video writer has two ways to get a frame to the encoder. Which one it uses is a setting first and a per-machine outcome second: the GPU path has to be asked for, and is then kept only if the machine supports it. The GPU path (videoInput: "dxgi-nv12") copies the frame across a keyed-mutex bridge to a second D3D11 device, converts BGRA to NV12 with the D3D11 video processor, and hands the hardware H.264 encoder a DXGI sample; it never touches system memory. The CPU path (videoInput: "cpu-rgb32") is the original staging-texture Map(D3D11_MAP_READ) readback, and is what a Map/Unmap that never returns wedges (issue #252: Windows 10, WDDM 2.7, multi-adapter). The GPU path is OFF by default; OPENSCREEN_WGC_ENABLE_DXGI_INPUT=1 turns it on. Once asked for, it degrades to the CPU path at every check made during initialization — no hardware encoder, no NV12 video-processor output, no shared keyed-mutex texture, no DXGI sample allocator — so a machine it does not fit records exactly as it did before it existed. That fallback ends when the first frame arrives: a captureDxgiSample() failure after encoding has started stops the recording, because the sink writer is configured for NV12 by then and there is no path left to take. That gap is why the default is off, and it is what cost the reporter in #336 their recording. It is skipped outright for preferSoftwareEncoder and for inline webcam PiP, both of which need the frame in system memory. Whichever path lands on a hardware MFT asks for VBR explicitly through ICodecAPI (MFEncoder::applyHardwareRateControl, called whenever hardware transforms were requested — see the videoEncoderRuntime gap below): hardware MFTs default to constant bitrate and would spend the full configured budget on a static screen (measured 16.9 Mbps against 1.95 for the same desktop on the GPU path). VBR keeps that in check but does not make a hardware encoder's output match a software one byte-for-byte — measured back-to-back on the same idle desktop, this machine's hardware MFT still produced roughly 5x the bytes of the software encoder even with VBR correctly engaged (8.7 Mbps vs 1.7 Mbps), which looks like a genuine rate-distortion difference between the two encoder implementations rather than a rate-control bug. Accepted as the cost of the fix below rather than tuned further, since disk is cheap and a stuck recording losing the whole take is not.
  • Linux/Wayland can produce no usable frames on the getDisplayMedia fallback because Chromium initializes Vulkan against the Ozone Wayland backend. The PipeWire helper path is unaffected.
  • On Linux the compositor's source picker appears on every recording. That is deliberate — see "Why Linux sends no source identity" — but it is an interruption, and there is currently no way to reuse a previous choice without also making it impossible to change.
  • Holding a portal session across the countdown means the compositor's "screen is being shared" indicator is up before recording begins. That is honest — access really has been granted — but the user can click it to revoke, or close the window they picked. The helper's exit surfaces as a rejected waitUntilSourceSelected; the session is not yet subscribed to the portal's Session::Closed signal, so a revocation is reported as a failed start rather than a specific message.
  • On Linux a window take keeps the window's client-side shadow as an opaque black border. The helper does honour mutter's SPA_META_VideoCrop, but for a window that crop is the window's buffer (meta_window_actor_get_buffer_bounds: the whole surface, at 0,0). A client that draws its own decorations, such as GTK or libadwaita, draws its drop shadow inside that buffer, around the visible geometry it declares through xdg_surface.set_window_geometry. mutter knows that geometry but puts nothing in the stream that carries it. It clears the stream buffer to transparent before painting the window, so the shadow arrives with alpha below 255 and the margin beyond it with alpha 0. H.264 has no alpha, so all of it encodes as black. Measured on a GNOME 46 terminal take of 866×628: bands of exact RGB 0,0,0, 26, 23, 26 and 28 px wide on the left, top, right and bottom. Cropping to the window means finding its opaque bounds in the alpha channel. On the default zero-copy path (dmabuf → VAAPI) that needs a GPU readback, which the importer deliberately never does (dmabuf_import.rs, #534 and #576). It also needs a rule for translucent windows and for a window resized after the encoder size is committed. Until then, the editor's Crop tool removes the band. A maximized window draws no shadow.
  • On Linux a window take in which the pointer never enters the window has no cursor data. This was observed in the v2.1.0-rc.1 pass (GNOME 46). In a 22.8 s take of a terminal window, the pointer went only to the top-bar tray icon and its Stop Recording item, never over the window. The take logged cursorSamples: 0 and wrote no .cursor.json. The two screen takes of the same session logged 1867 and 464. stop-native-linux-recording writes no sidecar for a take without samples, so the editor shows no Cursor facet for it. No no-cursor-metadata warning was logged, so the cursor metadata block was negotiated; no valid cursor arrived in it. The explanation comes from reading the mutter 46.2 source, and is consistent with this take. In meta_screen_cast_window_stream_src_set_cursor_metadata, mutter writes SPA_META_Cursor into a window stream only while meta_window_has_pointer() holds, meaning the pointer's actor is inside the window's. Otherwise it clears the metadata (id = 0). A take with the pointer inside the window has not been observed yet. Per that code, mutter then reports the pointer relative to the window buffer, and emit_sample records it against the same rectangle the file shows. So the gap would come from the compositor, not from the mapping.
  • preferSoftwareEncoder is read when recording starts. The recorder has no UI for setting it; Windows also accepts OPENSCREEN_WGC_PREFER_SOFTWARE_ENCODER=true in the helper request path.
  • The encoder-selection event's video field ("default", "software-preferred", "software-fallback") names which configuration path MFEncoder::initialize took, not which encoder Media Foundation actually picked; videoEncoderRuntime ("hardware", "software", or "unknown") answers that, by walking the sink writer's own transform pipeline after BeginWriting() for a node that self-identifies as hardware (MFT_ENUM_HARDWARE_URL_Attribute). It exists because of what it found (getopenscreen/openscreen#460): MF_READWRITE_ENABLE_HARDWARE_TRANSFORMS defaults to FALSE, and until this was fixed, leaving it unset on the "default" (non-DXGI) path meant the sink writer only ever considered software MFTs there, even on a machine with a working hardware H.264 encoder — "default" recording was, in practice, software-encoded on every machine that had not separately opted into the DXGI path above. createSinkWriter now sets that attribute to TRUE whenever forceSoftwareEncoder is false, DXGI device manager or not, so a hardware encoder is used on the "default" path when one is registered and working — which is most of the point, since it is weak-CPU machines running the software encoder that blow the stop-timeout budget in the first place. videoEncoderRuntime stays in the event to catch the cases that don't fit that story: a machine with no real hardware encoder falling back to software regardless, or a hardware encoder that itself turns out to be the slow or unstable one.