LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

gpu-screen-recorder

Hardware-accelerated screen recorder

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
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 [options] -w source -o output

DESCRIPTION

gpu-screen-recorder is a hardware-accelerated screen recorder that uses GPU encoding (NVIDIA NVENC, AMD VAAPI/AMF, or Intel VAAPI) for minimal CPU impact. It supports H264, HEVC, AV1, VP8, and VP9 codecs.Key features include a replay buffer (recording the last N seconds like instant replay), support for both X11 and Wayland via portals, and efficient hardware encoding. The replay buffer is saved by sending SIGUSR1 to the process and stopped cleanly with SIGINT. The tool supports multiple monitors, specific window capture, region capture, and simultaneous system audio and microphone recording. A CPU fallback encoder is available for H264.

PARAMETERS

-w SOURCE

Video source: window ID, monitor name, focused, portal, region, or V4L2 device path. Combine with |.
-o FILE
Output file path, or directory in replay mode.
-r SECONDS
Replay buffer duration in seconds (2-86400). Saves only on signal.
-ro DIR
Regular recording output directory during replay/streaming mode.
-c CONTAINER
Container format: mp4, mkv, flv, webm. Defaults to file extension.
-f FPS
Frame rate (default: 60).
-fm cfr|vfr|content
Frame rate mode (default: vfr).
-k CODEC
Video codec: auto, h264, hevc, av1, vp8, vp9, hevchdr, av1hdr (default: auto).
-q QUALITY
Quality preset: medium, high, veryhigh, ultra (default: veryhigh). In CBR mode, specifies bitrate.
-bm auto|qp|vbr|cbr
Bitrate mode (default: auto). CBR recommended for replay/streaming.
-a SOURCE
Audio source: defaultoutput, defaultinput, device:name, or app:name. Repeatable.
-ac aac|opus|flac
Audio codec (default: opus for mp4/mkv, aac otherwise).
-s WxH
Output resolution limit. Use 0x0 for original resolution.
-cr limited|full
Color range (default: limited).
-cursor yes|no
Include mouse cursor (default: yes).
-encoder gpu|cpu
Encoding device (default: gpu). CPU limited to H264.
-keyint SECONDS
Keyframe interval in seconds (default: 2.0).
--list-capture-options
List available video capture sources.
--list-audio-devices
List available audio devices.
--list-application-audio
List available audio application names.

CAVEATS

Requires compatible GPU with hardware encoding support (NVIDIA with NVENC, AMD with VAAPI/AMF, or Intel with VAAPI). Wayland support depends on desktop portal implementation. Some desktop environments may require additional configuration.

HISTORY

gpu-screen-recorder was created to provide an efficient, GPU-accelerated alternative to software-based screen recorders. It's particularly popular among Linux gamers for its low overhead and instant replay capabilities.

SEE ALSO

obs(1), ffmpeg(1), wf-recorder(1)

Copied to clipboard
Kai