MindAttic/MindAttic.Media.Capture
Framework

MindAttic.Media.Capture.

Capture the moment, including the seconds before it.

MindAttic.Media.Capture records video and screenshots for games and apps, from code, from trigger rules or by hand from the tray, so trailer footage, store shots, devlog clips and bug-repro video fall out of normal play.

Active development C# .NET 10 netstandard2.1 Windows ffmpeg Unity 6 Unreal Engine Playwright

What it is

Footage as a by-product of playing

The best moments never happen while you are recording. MindAttic.Media.Capture keeps a rolling tape running, lossless FFV1 or hardware HEVC in one-second segments, and cuts clips, replays and whole sessions from it. When the boss dies, SaveReplay keeps the fifteen seconds that led up to it.

Wire it in as deeply as you like. One line records a WPF app; a Unity package and an Unreal plugin record games; a JavaScript bridge and a localhost API let web pages and scripts raise events, take screenshots and save replays. Trigger rules in capture.json decide what each event does: a replay on a critical hit over 500 damage, a screenshot on victory, a chapter marker on every battle.

Or wire in nothing at all. The tray recorder captures any screen, any open window or a dragged area, and can arm an app to start recording the moment it launches. Every wired MindAttic app also understands one shared flag: -capture video, -capture screen 5, or -capture video 8h.

Long unattended runs are safe. A shut-off valve polls disk, memory and encoder lag every five seconds and stops cleanly before anything runs out; a crash leaves finished segments on disk to be exported on the next launch. And capture stays out of shipped Release builds entirely.

Who it's for

  • Indie game developersCollect trailer, store-screenshot and devlog footage while you play-test, with replays of moments you did not see coming.
  • QA and bug huntersAttach the exact seconds before a bug to the report, with a sidecar describing the build, session and trigger.
  • App and tool developersRecord any Windows app by hand, or add one line to a WPF app for automatic session video.
  • Automation and agentsDrive screenshots and recordings from scripts through a CLI and a token-protected localhost API, collected into preview sets.

Features

What you get

01

A rolling tape

One-second segments of lossless FFV1 or hardware HEVC. Starting a recording is instant, and replays can include footage from before the event.

02

Trigger rules

Map events to screenshot, replay, clip or marker actions with where conditions, cooldowns, debounce, per-session caps and presets like Trailer, Devlog and BugReport.

03

Engines and frameworks

Packages for Windows desktop capture, WPF, WebView2, headless web capture through Playwright and Edge, a Unity 6 package with GPU readback, and an Unreal plugin with C++ and Blueprint APIs.

04

A tray recorder

Record or screenshot a monitor, an app or a dragged area with aspect-ratio snaps and saved regions, rebindable global hotkeys, and apps armed to record on their next start.

05

One -capture flag

Every wired MindAttic app understands -capture video, -capture screen N, hq, durations and timelapse GIFs. Without the flag, a launch is always a plain launch.

06

The shut-off valve

Free disk, free RAM, encoder memory and encoder lag are polled every 5 seconds; the first limit crossed stops capture and exports everything so far, while the app keeps running.

07

Crash recovery

A job object stops ffmpeg if the app dies, finished segments stay on disk, and the next launch or capture recover exports them.

08

Files that explain themselves

Per-repo, per-session folders with a JSON sidecar for every file, a session manifest, per-minute stats, and markers written into the video as chapters.

09

Clean Release builds

Packages are referenced outside Release and code sits behind MINDATTIC_CAPTURE, so shipped builds contain no capture code; production Unity players ignore -capture.

How it works

How a moment becomes a clip

  1. Tape rolls

    With -capture or the tray, a recorder writes one-second segments to a staging folder.

  2. Something happens

    Your code calls Capture.Raise("boss-death"), or you press a hotkey.

  3. A rule fires

    The matching rule cuts a replay from the tape, before and after the event.

  4. Files land

    An MKV master, an MP4 for any editor, a thumbnail and a sidecar arrive in the session folder.

Quick start

Record a WPF app in one line

In App.OnStartup, before the main window shows. Then launch with -capture video or -capture screen 5.

The full setup guide lives in the documentation.

csharp
CaptureWpf.Init(this, e.Args);

// anywhere in the app
Capture.Raise("critical-hit");

Part of MindAttic

One piece of a bigger workshop

MindAttic.Media.Capture is the family's recording engine. MindAttic.Browser records through it, Automata is the worked WPF example, and MindAttic.Telemetry sits beside it to record what the rules engine did while Capture records what the screen showed.

Its tray recorder's settings are edited in MindAttic.Vault, and preview sets collected with capture set are what an agent uses to show its owner what it made.

Status

Where it stands

Active development

A broad feature set already shipped; hardening for a stable 1.x

Packages are at 1.1.0 (Sets at 2.1.0) and in use, with engines, preview sets and web capture shipped. The stable-recorder milestone fixes the known bugs that can drop or misplace footage, replaces the tray with a pinned windowed recorder app, and finishes a clean Release deploy.

Current milestone: Media.Capture stable recorder.

Next step

Never miss the shot again

Guides, reference and design notes are in the searchable MindAttic documentation. The source, issues and history are on GitHub.