A configurable background replay recorder
  • Rust 96.9%
  • Python 3.1%
Find a file
2026-11-25 21:12:19 +01:00
.githooks feat: add application audio tracks and library-based replay processing 2026-11-06 21:10:43 +01:00
assets feat: improve tray controls and replay notifications for 0.2.1 2026-11-06 13:34:41 +01:00
src fix(audio): enhance error handling during audio routing process 2026-11-08 21:28:15 +01:00
tests refactor: replace GStreamer with native capture and FFmpeg libraries 2026-11-08 17:26:19 +01:00
.gitignore Initial commit 2026-11-05 16:22:02 +01:00
build.rs refactor: replace GStreamer with native capture and FFmpeg libraries 2026-11-08 17:26:19 +01:00
Cargo.lock Fix FFmpeg 9.1 bindings and release 0.4.3 2026-11-25 21:12:19 +01:00
Cargo.toml Fix FFmpeg 9.1 bindings and release 0.4.3 2026-11-25 21:12:19 +01:00
LICENSE Initial commit 2026-11-05 16:22:02 +01:00
README.md refactor: replace GStreamer with native capture and FFmpeg libraries 2026-11-08 17:26:19 +01:00

Game Rec

A background replay recorder for Linux, with a tray menu and CLI. Currently supports Wayland screencopy with NVIDIA HEVC encoding.

Build

Requires Rust 1.96+, FFmpeg 9+ libraries with HEVC NVENC and libopus, Wayland, GBM, EGL/OpenGL, NVIDIA drivers, PipeWire 1.0.5+, and a compatible session manager such as WirePlumber 0.5+. Building also requires Clang, EGL/OpenGL and PipeWire development headers, ffnvcodec-headers, and pkgconf; no CUDA toolkit is needed.

cargo build --release --locked
cargo install --path . --locked

Enable the Clippy pre-commit hook: git config core.hooksPath .githooks.

Native PipeWire passive links capture application audio without moving playback. hyprctl supplies window/fullscreen information on Hyprland. gio opens files, wl-copy enables clipboard copying, and notify-send handles error notifications.

Use

game-rec config init
game-rec config set capture.monitor DP-3
game-rec start                       # Start recorder and tray
game-rec save                       # Save a replay
game-rec save --wait                # Wait for the original file
game-rec status
game-rec recording stop             # Stop capture and clear history
game-rec recording start
game-rec mic off
game-rec compress /path/to/clip.mkv --wait
game-rec stop

The tray provides recording, microphone, monitor, resolution, frame-rate, bitrate, save-sound, and auto-compression settings.

To start automatically with your desktop:

game-rec autostart install
game-rec autostart remove

game-rec run [--no-tray] runs in the foreground. game-rec doctor checks capture and media support.

Configuration

Config: ~/.config/game-rec/config.toml (or $XDG_CONFIG_HOME/game-rec/config.toml).

game-rec config edit
game-rec config show
game-rec config set buffer.seconds 300
game-rec config set save_sound false

Changes reload automatically. Invalid edits leave the previous settings active. Capture, video, and storage changes can clear replay history; compression settings do not.

Recordings go to your Videos directory under Replays/. Originals are MKV files with audio tracks in this order: 1 Game, 2 Discord, 3 Microphone, 4 Other. Missing or disabled sources record silence. Names use the clip's local start time: Replay 2026-11-06 19-28-15.mkv. Name collisions get a numeric suffix; existing clips are never overwritten.

[games]
Final_Fantasy = "ffxiv_dx11.exe"
Call_of_Duty = 'regex:cod.*\.exe$'

Values match partial executable paths; regex: enables regex. Underscores in names become spaces. Steam and fullscreen + RAM/GPU heuristics detect unlisted games. Hover the tray icon for the game name; automatic detections also show the window title and executable path.

Shareable copies

Auto-compression keeps the original and creates a smaller H.265/HEVC MP4 in Replays/compressed/: Game audio if detected, otherwise Discord + Other mixed. No microphone. The file is copied to the clipboard; nothing is uploaded. Playback requires HEVC support.

[compression]
enabled = true
target_size_mb = 250
seconds = 120
directory = "" # Use Replays/compressed/, or specify an absolute path.

The compressed copy contains the final configured number of seconds and is named using that segment's start time.

The tray offers 250/100/50 MB and 5/3/2/1 minutes or 30 seconds. With auto-compression off, use Compress in a saved-replay notification or the CLI.

Compression updates one notification with progress, then the finished preview, path, and size. Open, Copy, Open Original, and Copy Original remain reusable; Compress is removed after use.

Troubleshooting

  • Commands, saves, and compression stages log timestamps and elapsed milliseconds to stdout.
  • Service logs: journalctl --user -u game-rec
  • Detached logs: ~/.local/state/game-rec/daemon.log
  • Recover disk-buffer footage after a crash: game-rec recover --list, then game-rec recover.
  • RAM history is lost when recording stops or the process exits.