LinuxCommandLibrary

gpu-screen-recorder

Record screen using GPU

TLDR

Select a source using a desktop portal and record it

$ gpu-screen-recorder -w portal -o [path/to/video.mp4]
copy

Specify a specific video source
$ gpu-screen-recorder -w [screen|DP-1|HDMI-A1|...] -o [path/to/video.mp4]
copy

List video capture sources
$ gpu-screen-recorder --list-capture-options
copy

List audio capture sources
$ gpu-screen-recorder [--list-audio-devices|--list-application-audio]
copy

Record using the replay buffer
$ gpu-screen-recorder -w [screen] -r [30] -c [mp4] -ro [path/to/directory] -o [whatever]
copy

Capture a video from the replay buffer
$ pkill -SIGUSR1 -f gpu-screen-recorder
copy

Run gpu-screen-recorder in the background
$ systemctl start --user gpu-screen-recorder
copy

SYNOPSIS

gpu-screen-recorder [OPTION...] [output.mkv]

PARAMETERS

-f, --file FILE
    Output file path.
Default: gpu-screen-recorder.mkv

-w, --width WIDTH
    Recording width in pixels.
Default: screen width

-h, --height HEIGHT
    Recording height in pixels.
Default: screen height

-x, --x X
    X offset for capture region.
Default: 0

-y, --y Y
    Y offset for capture region.
Default: 0

--window-title TITLE
    Record specific window by title (fullscreen default)

--audio-device DEVICE
    PulseAudio/PipeWire input device.
Use --list-inputs to list

--audio-format FORMAT
    Audio format: pcm_s16le, flac.
Default: pcm_s16le

-d, --duration SECONDS
    Auto-stop after duration

--no-audio
    Disable audio capture

--verbose
    Enable debug logging

--list-inputs
    List available audio devices

--upload
    Upload video/thumbnail to imgur post-recording

--log-file FILE
    Save logs to file

DESCRIPTION

gpu-screen-recorder is a high-performance, low-overhead screen recording tool that leverages GPU hardware encoders for efficient capture. It supports NVIDIA NVENC, AMD AMF/VAAPI, and Intel Quick Sync, minimizing CPU usage ideal for gaming, demos, and tutorials.

Key features include full-screen or window-specific recording, customizable regions via position and size, audio capture from PulseAudio/PipeWire devices, and output to MKV containers with H.264/HEVC codecs. It excels on Wayland compositors like Sway/Hyprland (wlroots-based) and supports X11 fallback. Automatic encoder detection ensures compatibility with modern GPUs.

Unlike CPU-based tools, it avoids frame drops during intensive workloads. Recordings start immediately on launch, stop via Ctrl+C, with optional timed duration or imgur upload. Verbose logging aids troubleshooting. Primarily CLI-driven, it's lightweight and scriptable for automated workflows.

CAVEATS

Requires proprietary NVIDIA drivers for NVENC; open AMD/Intel may need VAAPI/AMF setup.
Best on wlroots Wayland (Sway/Hyprland); X11/plasma may have issues.
No real-time preview; fixed regions only.

SUPPORTED BACKENDS

Wayland: wlroots, xdg-desktop-portal.
X11: XShm fallback.
Encoders: NVENC, VAAPI, AMF.

EXAMPLES

gpu-screen-recorder -f ~/video.mkv
Record screen with audio to ~/video.mkv.

gpu-screen-recorder --window-title Firefox -w 1920 -h 1080
Record Firefox window fullscreen size.

gpu-screen-recorder -d 60 --upload
60s clip, auto-upload to imgur.

HISTORY

Open-source project by Guillaume Foucault (erebe) since 2022.
GitHub-hosted with rapid updates for new GPUs/compositors; gained popularity for low-latency Wayland recording.

SEE ALSO

ffmpeg(1), pipewire(1), simplescreenrecorder(1)

Copied to clipboard