Scroll to navigation

GPU-SCREEN-RECORDER(1) GPU Screen Recorder Manual GPU-SCREEN-RECORDER(1)

NAME

gpu-screen-recorder - The fastest screen recording tool for Linux

SYNOPSIS

gpu-screen-recorder -w window_id|monitor|focused|portal|region|v4l2_device_path [options] -o output_file

gpu-screen-recorder --help | --version | --list-capture-options | --list-audio-devices | --list-application-audio | --info

DESCRIPTION

gpu-screen-recorder is the fastest screen recording tool for Linux. It uses the GPU only to record the screen to minimize system performance impact. It supports recording, live streaming, instant replay (similar to NVIDIA ShadowPlay), and screenshot capture. The tool works on both X11 and Wayland with AMD, Intel, and NVIDIA graphics cards.

Key features include:

  • GPU-accelerated encoding using H264, HEVC, AV1, VP8, or VP9 codecs
  • Support for HDR recording (HEVC HDR and AV1 HDR)
  • Instant replay buffer (last N seconds recording)
  • Live streaming capabilities
  • Audio recording from devices and applications (PipeWire required for app audio)
  • Plugin system for custom graphics overlay
  • Minimal performance impact compared to traditional screen recorders

OPTIONS

Capture Options

Specify what to record. Formats:
  • window - Record a specific window (use window ID) (X11 only)
  • screen - Record the first monitor found
  • screen-direct - NVIDIA X11 only, for VRR/G-SYNC support (not recommended due to driver issues)
  • focused - Record the currently focused window (X11 only) (use with -s option)
  • portal - Use xdg-desktop-portal with PipeWire (Wayland only)
  • region - Record a specific region (use with -region option)
  • Monitor name (e.g., DP-1) - Record specific monitor
  • V4L2 device path (e.g., /dev/video0) - Record camera device (V4L2).

    Other applications can't use the camera when GPU Screen Recorder is using the camera and GPU Screen Recorder may not be able to use the camera if another application is already using the camera

  • Combine sources with | (e.g., monitor:screen|v4l2:/dev/video0)

Run --list-capture-options to list available capture sources.

Run --list-v4l2-devices to list available camera devices (V4L2).

Additional options can be passed to each capture source by splitting capture source with ; for example screen;x=50;y=50.
These are the available options for capture sources:

  • x - The X position in pixels. If the number ends with % and is a number between 0 and 100 then it's a position relative to the video size
  • y - The Y position in pixels. If the number ends with % and is a number between 0 and 100 then it's a position relative to the video size
  • width - The width in pixels. If the number ends with % and is a number between 0 and 100 then it's a size relative to the video size.

    A value of 0 means to not scale the capture source and instead use the original width.

  • height - The height in pixels. If the number ends with % and is a number between 0 and 100 then it's a size relative to the video size

    A value of 0 means to not scale the capture source and instead use the original height.

  • halign - The horizontal alignment, should be either start, center or end.

    Set to center by default, except for camera (V4L2) when capturing the camera above something else in which case this is set to start by default

  • valign - The vertical alignment, should be either start, center or end.

    Set to center by default, except for camera (V4L2) when capturing the camera above something else in which case this is set to end by default

  • hflip - If the source should be flipped horizontally, should be either true or false. Set to false by default
  • vflip - If the source should be flipped vertically, should be either true or false. Set to false by default
  • pixfmt - The pixel format for cameras (V4L2), should be either auto, yuyv or mjpeg. Set to auto by default
Specify region to capture when using -w region. Format is width x height + X offset + Y offset. Use 0x0 for full monitor.

It is compatible with tools such as slop (X11) and slurp (Wayland).

Container format (mp4, mkv, flv, webm). Defaults to extension from -o filename.
Output resolution limit (e.g., 1920x1080). Use 0x0 for original resolution. Required for -w focused.
Frame rate (default: 60). For variable frame rate mode, this is maximum FPS.
Record cursor (default: yes).
Restore previous portal session (used with -w portal option, default: no).

Audio Options

Audio device or application to record. Can be specified multiple times. Formats:
  • default_output - Default output device
  • default_input - Default input device
  • device:name - Specific device
  • app:name - Application audio (case-insensitive)
  • app-inverse:name - All applications except specified
  • Combine sources with | (e.g., default_output|app:firefox)

Run --list-audio-devices to list available audio devices.
Run --list-application-audio to list available applications for audio capture.

Audio codec (default: opus for mp4/mkv, aac otherwise). FLAC temporarily disabled.
Audio bitrate in kbps (default: 128 for opus/flac, 160 for aac). 0 = automatic.

Video Quality Options

Video codec: auto, h264, hevc, av1, vp8, vp9, hevc_hdr, av1_hdr, hevc_10bit, av1_10bit (default: auto → h264). HDR options not available on X11 or portal capture.

10-bit capture reduces banding but may not be supported properly by all video players.

Quality preset (medium, high, very_high, ultra) for QP/VBR mode, or bitrate (kbps) for CBR mode (default: very_high).
Bitrate mode (default: auto → qp). CBR recommended for replay buffer.
Frame rate mode: constant, variable, or match content (default: vfr). Content mode only on X11 or portal.

Content mode syncs video to the captured content and is recommended for smoothest video when the game is running at the same frame rate or lower than what you are trying to record at.

Color range (default: limited). Full range may cause issues with some video players/websites.
Encoding tune (default: performance). Currently NVIDIA only.
Keyframe interval in seconds (default: 2.0). Affects seeking precision.
Encoding device (default: gpu). CPU encoding only for H264.
Fallback to CPU if GPU encoding unavailable (default: no).

Replay Buffer Options

Replay buffer duration (2-86400 seconds). When set, only saves on command.
Buffer storage location (default: ram). Disk mode may reduce SSD lifespan.
Clear buffer after saving replay (default: no).
Organize replays in date-based folders (default: no).

Advanced Options

Overclock NVIDIA memory (X11 only). Requires Coolbits=12. Use at own risk.
Load plugin (.so file). Can be specified multiple times.
Script to run after saving video. Receives filepath and type ("regular", "replay", "screenshot").
Portal session token file (default: ~/.config/gpu-screen-recorder/restore_token).
Additional arguments to pass to FFmpeg for the file in a list of key-values pairs in the format "key=value;key=value",
for example: -ffmpeg-opts "hls_list_size=3;hls_time=1;hls_flags=delete_segments".
Note: this overwrites options set by GPU Screen Recorder with the same name.
Additional arguments to pass to FFmpeg for the video in a list of key-values pairs in the format "key=value;key=value",
for example: -ffmpeg-video-opts "codec=cabac;rc_mode=CQP;qp=16".
Note: this overwrites options set by GPU Screen Recorder with the same name.
Additional arguments to pass to FFmpeg for the audio in a list of key-values pairs in the format "key=value;key=value",
for example: -ffmpeg-audio-opts "aac_coder=fast;aac_pce=true".
Note: this overwrites options set by GPU Screen Recorder with the same name.
OpenGL debug output (default: no).
Print FPS and damage info (default: yes).

Output Options

Output file path (or directory for replay mode). Required except when outputting to stdout.
Output directory for regular recordings during replay/streaming mode.

Information Commands

Show help message.
Show version (5.10.2).
Show system info (codecs, capture options).
List available capture sources (window, monitors, portal, v4l2 device path).
List available cameras devices (V4L2).
List available audio devices.
List available applications for audio capture.

SIGNALS

GPU Screen Recorder can be controlled via signals:

Stop and save recording (stop without save in replay mode).
Save replay (replay mode only).
Pause/unpause recording (not for streaming/replay).
Start/stop regular recording during replay/streaming.
Save last 10 seconds (replay mode).
Save last 30 seconds (replay mode).
Save last 60 seconds (replay mode).
Save last 5 minutes (replay mode).
Save last 10 minutes (replay mode).
Save last 30 minutes (replay mode).

Use pkill to send signals (e.g., pkill -SIGUSR1 -f gpu-screen-recorder).

EXAMPLES

Record monitor at 60 FPS with desktop audio:

gpu-screen-recorder -w screen -f 60 -a default_output -o video.mp4

Record monitor at 60 FPS with desktop audio and microphone:

gpu-screen-recorder -w screen -f 60 -a "default_output|default_input" -o video.mp4

Record specific window (X11 only):

gpu-screen-recorder -w $(xdotool selectwindow) -f 60 -o video.mp4

Instant replay (last 60 seconds):

gpu-screen-recorder -w screen -f 60 -c mkv -r 60 -o ~/Videos

Record region using slop:

gpu-screen-recorder -w $(slop) -o video.mp4

Record region using slurp:

gpu-screen-recorder -w $(slurp -f "%wx%h+%x+%y") -o video.mp4

Instant replay and launch a script when saving replay:

gpu-screen-recorder -w screen -f 60 -c mkv -r 60 -sc ./script.sh -o ~/Videos

Stream to Twitch:

gpu-screen-recorder -w screen -f 60 -a default_output -o "rtmp://live.twitch.tv/app/stream_key"

Take screenshot:

gpu-screen-recorder -w screen -o screenshot.jpg

Record screen and camera:

gpu-screen-recorder -w "screen|/dev/video0" -o video.mp4

Record screen and camera. The camera is located at the bottom right flipped
  horizontally:

gpu-screen-recorder -w "monitor:screen|v4l2:/dev/video0;halign=end;valign=end;hflip=true" -o video.mp4

FILES

~/.config/gpu-screen-recorder.env
Environment variables for systemd service (optional).
/usr/lib/modprobe.d/gsr-nvidia.conf
NVIDIA suspend/resume fix.
~/.config/gpu-screen-recorder/restore_token
Portal session token storage (default location).

TIPS

  • Some video editors don't support videos in variable frame rate mode.

    Change video container to .mkv or capture in constant frame rate mode instead to workaround this issue

  • Variable frame rate may cause issues in some video players (use MPV)
  • H.265/HEVC not supported in browsers/Discord (use H264 for sharing)
  • Some distros disable hardware codecs (use Flatpak version)
  • Use CBR mode ( -bm cbr ) for replay buffer to control RAM usage

PERFORMANCE TIPS

  • Save to SSD (HDD may be too slow)
  • Close other screen recorders (including idle OBS)

KNOWN ISSUES

  • NVIDIA: CUDA breaks after suspend (install gsr-nvidia.conf fix)
  • AMD: Possible black bars colors with HEVC/AV1 (use H264 or FFmpeg >=8)

SEE ALSO

Project homepage
Project readme, with more information
GTK GUI version (deprecated)
ShadowPlay-style UI
xdotool(1), slop(1), slurp(1),

AUTHORS

Developed by dec05eba and contributors.

COPYRIGHT

Copyright © dec05eba. Licensed under GPL3-only.

BUGS

Report bugs at dec05eba@protonmail.com.

2025-12-22 5.10.2