elodin-headless-capture

Capture screenshots and record video of the Elodin Editor on headless Linux GPU hosts.

540|41|Updated Feb 26, 2024
One-click install
npx skills add https://github.com/elodin-sys/elodin --skill elodin-headless-capture
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: elodin-headless-capture
Source: https://github.com/elodin-sys/elodin/tree/main/.cursor/skills/elodin-headless-capture
Command: npx skills add https://github.com/elodin-sys/elodin --skill elodin-headless-capture

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Running the Elodin Editor for visual testing or demo capture normally requires a physical display, which is unavailable on headless Linux GPU servers and CI machines. This Skill runs the editor inside Gamescope's headless compositor and captures screenshots or video through PipeWire and GStreamer.

Core Features & Use Cases

  • Automated capture script: Uses scripts/elodin_capture.sh to run preflight checks, select a GPU path, start Gamescope, record, validate output is non-blank, and clean up child processes.
  • Manual capture workflow: Provides step-by-step Gamescope, gamescopectl screenshot, and GStreamer PipeWire recording commands for debugging capture infrastructure.
  • Encoder selection and validation: Detects and validates hardware encoders (NVENC, VA-API) with a tested x264 software fallback, including blank-frame rejection.
  • Use Case: Record a 10-second MP4 of the cube-sat simulation on a headless NVIDIA server by running the capture script with a custom port to avoid conflicts with a running editor.

Quick Start

Run the elodin capture script with a duration, output path, and a simulation example such as examples/cube-sat/main.py inside the nix develop shell.

Frequently Asked Questions about elodin-headless-capture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I record video of the Elodin Editor on a headless Linux server?

Run scripts/elodin_capture.sh with a duration, output path, and simulation example inside nix develop. It starts Gamescope headless, records through PipeWire and GStreamer, validates the output is non-blank, and cleans up processes.

How do I take a screenshot of a Gamescope headless session?

While Gamescope is running, use gamescopectl screenshot with an absolute output path such as /tmp/elodin.png. For one-shot editor screenshots without composited video, prefer the editor's ELODIN_SCREENSHOT mechanism.

Does Gamescope headless capture work on macOS or Windows?

No, this workflow is Linux-only. Gamescope's headless compositor, its PipeWire video source, and the host GPU driver integration are Linux facilities, and the Nix dependencies are guarded by stdenv.isLinux.

Why is my PipeWire GStreamer recording completely black?

All-black recordings happen when the video/x-raw,format=BGRx caps filter is missing immediately after pipewiresrc. Forcing Gamescope to provide BGRx avoids capture paths that produce black frames, then videoconvert converts to I420 for x264.

Should I use NVENC, VA-API, or x264 for GStreamer capture encoding?

Prefer a hardware encoder (NVENC on NVIDIA, VA-API on AMD/Intel) when one is detected and validated with a test recording and decoded frame check. The x264 software pipeline is the known-good fallback across all vendors.

Why does Gamescope crash when recording starts on an Intel iGPU?

Gamescope can segfault inside Mesa's ANV driver while allocating PipeWire capture buffers on Intel iGPUs. Confirm with gdb, then capture through the discrete GPU by setting ELODIN_GPU=nvk before entering the development shell.