LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

gpu-screen-recorder

Hardware-accelerated screen recorder

TLDR

Record a monitor to a file
$ gpu-screen-recorder -w screen -o [path/to/video.mp4]
copy
Let the desktop portal choose the source, which is how Wayland grants access
$ gpu-screen-recorder -w portal -o [path/to/video.mp4]
copy
Record one named output
$ gpu-screen-recorder -w [DP-1] -o [path/to/video.mp4]
copy
Show the capture sources this machine offers
$ gpu-screen-recorder --list-capture-options
copy
Show the audio devices available
$ gpu-screen-recorder --list-audio-devices
copy
Record desktop audio alongside the video
$ gpu-screen-recorder -w screen -a default_output -o [path/to/video.mp4]
copy
Match the frame rate of a high refresh monitor
$ gpu-screen-recorder -w screen -f [144] -o [path/to/video.mp4]
copy
Choose the codec and container
$ gpu-screen-recorder -w screen -k h264 -c mkv -o [path/to/video.mkv]
copy
Use constant bitrate, which keeps memory use steady in high motion scenes
$ gpu-screen-recorder -w screen -bm cbr -q [40000] -o [path/to/video.mp4]
copy
Keep the last 30 seconds in a replay buffer, writing into a directory
$ gpu-screen-recorder -w screen -c mkv -r [30] -o [path/to/directory]
copy
Save whatever is in the replay buffer
$ pkill -SIGUSR1 -f gpu-screen-recorder
copy
Stop recording and close the file cleanly
$ pkill -SIGINT -f gpu-screen-recorder
copy
Run a script each time a video is saved
$ gpu-screen-recorder -w screen -sc [path/to/script.sh] -o [path/to/video.mp4]
copy
Start the replay buffer at login, as a user service
$ systemctl enable --now --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.

INSTALL

sudo pacman -S gpu-screen-recorder
copy
sudo zypper install gpu-screen-recorder
copy
nix profile install nixpkgs#gpu-screen-recorder
copy

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)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid