A hardware accelerated screen recording tool for Linux. Still in development (see features/roadmap below).
- Written in Zig (0.16.0).
- Video encoding with Vulkan Video (vulkan-zig).
- UI built with imgui/SDL3.
- Muxing/Audio encoding with FFmpeg.
# Spacecap will be installed to ~/.local/bin/spacecap
# Install
curl -LsSf https://spacecap.org/install | sh
# Uninstall
curl -LsSf https://spacecap.org/install | sh -s -- --uninstall- Desktop/window capture.
- Screen recording.
- Replay buffer - save last n seconds of video (buffered in memory).
- Capture preview.
- Global keybinds.
- Screenshots.
- Video player/editor.
- Simple video editor (trim start/end).
- File browser to select videos to edit.
- Windows support.
- A GPU that supports Vulkan Video encoding.
NOTE: So far this has only been tested on an Nvidia GPU (RTX 3080). AMD will be supported, I just have no way of testing at this time.
- Wayland
- Pipewire
- Windows is not yet supported. Spacecap is architected in such a way that it can be cross platform. For Windows support, the audio/video capture interfaces need to be implemented. It's on the roadmap, but is not currently a priority.
xdg-desktop-portal global shortcuts can be used if your desktop environment supports it, otherwise the Spacecap CLI can be used to send commands.
e.g.
# Save replay
spacecap -s save-replay
# List available commands
spacecap -hFor example, here is what a config in niri would look like:
binds {
Mod+Shift+R hotkey-overlay-title="Spacecap: save replay" { spawn-sh "spacecap -s save-replay && notify-send 'Spacecap' 'Replay saved'"; }
}Nix is required for development.
# Build
nix develop -c zig build -Dnix
# Run
nix develop -c zig build run -Dnix
# Test
nix develop -c zig build test -DnixBy default, Spacecap only writes error logs to error.log. Set the
SPACECAP_LOG_LEVEL environment variable to debug, info, warning, or
error.
Crash logs are written to crash.log, which happens when a panic occurs.
- Linux:
$XDG_CONFIG_HOME/spacecap, or$HOME/.config/spacecap - Windows:
%APPDATA%\spacecap.
Spacecap uses the XDG desktop portal screencast permission store to restore the previous capture source. If the portal permission database gets corrupted, restore may stop working even after selecting a source again. This has happened to me after my main disk filled up unexpectedly.
To reset only the screencast portal permissions, delete the database and then reboot.
# Delete
rm ~/.local/share/flatpak/db/screencast ~/.local/share/flatpak/db/screencast.bak
# OR move it to a backup
mv ~/.local/share/flatpak/db/screencast ~/.local/share/flatpak/db/screencast.bak
reboot
