GPU-SCREEN-RECORDER(1)
π GPU-SCREEN-RECORDER(1) π
okay bestie, welcome to the GPU Screen Recorder Manual β yes, thatβs the manual name, and yes, weβre about to make screen recording make sense. π
β¨ NAME β¨
gpu-screen-recorder β the fastest screen recording tool for Linux. Thatβs the whole name section, and honestly? Iconic. Periodt.
π SYNOPSIS π
gpu-screen-recorder -w window_id|monitor|focused|portal|region|v4l2_device_path [options] -o output_file
gpu-screen-recorder --help | --version | --info | --list-capture-options | --list-monitors | --list-v4l2-devices | --list-audio-devices | --list-application-audio
π« DESCRIPTION π«
okay so gpu-screen-recorder is literally 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 π₯
-wwindow_id|monitor|focused|portal|region|v4l2_device_path β specify what to record. This option is optional. When itβs not used then-ais required and only audio is recorded, for example:gpu-screen-recorder -a default_output -o audio.mp3. Audio-only recording doesnβt support replay mode (-rand-ro).
Formats:
windowβ record a specific window (use the 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-soption).portalβ usexdg-desktop-portalwith PipeWire (Wayland only).regionβ record a specific region (use with-regionoption).- 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.
Additional options can be passed to each capture source by splitting the capture source with ; for example screen;x=50;y=50. These are the available options for all capture sources (optional):
xβ The X position in pixels. If the number ends with%then this sets the X position relative to the video width (integer percentage where100=100%).yβ The Y position in pixels. If the number ends with%then this sets the Y position relative to the video height (integer percentage where100=100%).widthβ The width in pixels. If the number ends with%then this sets the width relative to the video width (integer percentage where100=100%).
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%then this sets the height relative to the video height (integer percentage where100=100%).
A value of 0 means to not scale the capture source and instead use the original height.
halignβ The horizontal alignment, should be eitherstart,centerorend.
Set to center by default when using one capture source, otherwise itβs set to start by default.
valignβ The vertical alignment, should be eitherstart,centerorend.
Set to center by default when using one capture source, otherwise itβs set to start by default.
hflipβ If the source should be flipped horizontally, should be eithertrueorfalse. Set tofalseby default.vflipβ If the source should be flipped vertically, should be eithertrueorfalse. Set tofalseby default.
These are the additional options available for camera (V4L2) sources (optional):
pixfmtβ The pixel format, should be eitherauto,yuyvormjpeg. Set toautoby default.camera_fpsβ The camera fps. Has to match a camera fps returned in--infoor--list-v4l2-devicesfor the device.
A value of 0 means to use the best option available.
camera_widthβ The camera width in pixels. Has to match a camera width returned in--infoor--list-v4l2-devicesfor the device.
A value of 0 means to use the best option available.
camera_heightβ The camera height in pixels. Has to match a camera height returned in--infoor--list-v4l2-devicesfor the device.
A value of 0 means to use the best option available.
-regionWxH+X+Y β specify region to capture when using-w region. Format is width x height + X offset + Y offset. Set width and height to0to capture the whole monitor that contains the position.
It is compatible with tools such as slop (X11) and slurp (Wayland).
-ccontainer_format β container format (mp4,mkv,flv,webm,mp3). Defaults to extension from-ofilename. Themp3container holds audio only and can only be used when recording without the-woption.
With FFmpeg 8.1 or later .mp4 and .mov files are recorded in hybrid fragmented mode, which means that the video file is still playable if the system crashes or if GPU Screen Recorder is killed while recording, just like .mkv files. The file is converted into a regular non-fragmented file when the recording is stopped, so it stays compatible with software that doesnβt support fragmented mp4 files. GPU Screen Recorder shows a warning when recording to .mp4 or .mov with an older FFmpeg version, in which case the video file is unplayable if the recording is not stopped properly.
-sWxH β output resolution limit (e.g.,1920x1080). The captured content is scaled to fit within this resolution while keeping its aspect ratio and the video size shrinks to fit the scaled content. Use0x0for original resolution. Required for-w focused(where the video is exactly this resolution).-ffps β frame rate (default:60). For variable frame rate mode, this is maximum FPS.-cursoryes|no β record cursor (default:yes).-restore-portal-sessionyes|no β restore previous portal session (used with-w portaloption, default:no).
π§ Audio Options π§
-aaudio_source β audio device or application to record. Can be specified multiple times. Formats:default_outputβ default output devicedefault_inputβ default input devicedevice:nameβ specific deviceapp: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.
-acaac|opus|flac|mp3 β audio codec (default:opusformp4/mkv,aacotherwise). FLAC temporarily disabled..mp3files always use themp3audio codec. Themp3audio codec requires FFmpeg to be built withlibmp3lame.-abbitrate β audio bitrate in kbps (default:128foropus/flac,160foraac,192formp3).0= automatic.
π₯ Video Quality Options π₯
-kcodec β video codec:auto,h264,hevc,av1,vp8,vp9,hevc_hdr,av1_hdr,hevc_10bit,av1_10bit,h264_vulkan,hevc_vulkan,hevc_10bit_vulkan,av1_vulkan,av1_hdr_vulkan,av1_10bit_vulkan.
HDR options not available on X11 or portal capture. 10-bit capture reduces banding but may not be supported properly by all video players. Vulkan codec options are experimental. They may not work properly on your system because of GPU driver issues. Using vulkan codecs may result in better gaming performance with older NVIDIA gpu drivers, as vulkan video encoding doesnβt suffer from an issue known as "cuda p2 state" where the GPU gets downclocked when using nvenc (regular video codecs on NVIDIA).
(default: auto β h264).
-qquality β quality preset (medium,high,very_high,ultra) for QP/VBR mode, or bitrate (kbps) for CBR mode (default:very_high).-bmauto|qp|vbr|cbr β bitrate mode (default:autoβqp). CBR recommended for replay buffer and live streaming.
QP means to capture with constant quality, even in motion, while VBR and CBR means to capture with constant size.
-fmcfr|vfr|content β frame rate mode:cfr(constant),vfr(variable), orcontent(match content) (default:vfr). Content mode is only available on X11 or portal capture.
Content mode (-fm content) 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.
Constant framerate mode (-fm cfr) ensures that the framerate of the video is constant throughout the video, as set by the -f option. This might be needed by some video editors. This option is not recommended because for example if youβre trying to record at 60 fps and you play a heavy game and the game runs at below 60 fps, then the recording may capture at that framerate as well, which will overload the encoder and it may end up recording at 1-2 fps instead and may not be able to recover. Try recording to a mkv file instead in that case in variable framerate mode (-fm vfr), as Kdenlive supports variable framerate videos if they are in mkv files.
-cr limited|fullβ color range, and the default islimited. π Heads up bestie: full range can get messy with some video players and websites, so pick it with intention.-tune performance|qualityβ encoding tune, defaultperformanceβ¨. Currently NVIDIA only, iykyk.-keyint secondsβ keyframe interval in seconds, default2.0. This one controls how precise your seeking is, so tweak it if scrubbing matters to you π.-encoder gpu|cpuβ which device does the encoding, defaultgpu. CPU encoding is only a thing for H264, no cap.-fallback-cpu-encoding yes|noβ fall back to CPU if GPU encoding isn't available. Defaultno. π«Ά
π Replay Buffer Options π
-r secondsβ replay buffer duration, valid range is2-86400seconds. When you set this, it only saves on command β like, it's not out here saving on its own π.-replay-storage ram|diskβ where the buffer lives, defaultram. Disk mode may reduce your SSD's lifespan, so know that going in π.-restart-replay-on-save yes|noβ clear the buffer after saving a replay, defaultno.-df yes|noβ organize your replays into date-based folders, defaultno. Cute and tidy πΈ.
π₯ Advanced Options π₯
-p plugin.soβ load a plugin (.sofile). You can specify it multiple times, stack 'em up π.-sc script_pathβ a script to run after saving a video. It receives the filepath and the type, where type is"regular","replay", or"screenshot"π.-portal-session-token-filepath pathβ the portal session token file. Default is~/.config/gpu-screen-recorder/restore_token.-ffmpeg-opts optionsβ extra arguments passed to FFmpeg for the file, given as a list of key-value pairs in the format"key=value;key=value". Example time:
-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. So like, it wins. π«£
-ffmpeg-video-opts optionsβ same deal but for the video specifically, key-value pairs in"key=value;key=value"format. Example:
-ffmpeg-video-opts "codec=cabac;rc_mode=CQP;qp=16"
Note: this overwrites options set by GPU Screen Recorder with the same name.
-ffmpeg-audio-opts optionsβ same deal but for the audio, key-value pairs in"key=value;key=value"format. Example:
-ffmpeg-audio-opts "aac_coder=fast;aac_pce=true"
Note: this overwrites options set by GPU Screen Recorder with the same name.
-auth tokenβ the optional bearer token for authorization when streaming, like when you're using the whip protocol (-c whip). For servers with username/password authentication, the token can be set to"username:password". Whip streaming requires FFmpeg version8.0or later, fyi. β¨ You can alternatively provide the token in theGSR_AUTHenvironment variable to keep it out of the process command line β and the-authoption takes precedence over the environment variable. When streaming with whip, the muxer optionts_buffer_sizeis set to4194304by default, and you can override it with-ffmpeg-opts "ts_buffer_size=<value>". The kernel silently caps the buffer at thenet.core.wmem_maxsysctl (usually only ~208kbπ). If whip streaming stops with"UDP send blocked"errors then raise it, for example:
sysctl -w net.core.wmem_max=8388608
-gl-debug yes|noβ OpenGL debug output, defaultno.-v yes|noβ print FPS and damage info, defaultyesπ .-low-power yes|noβ run in low power mode. This currently only has an affect on AMD (because it's only an issue on AMD) and lets the GPU go into a lower power mode when recording, defaultno. Setting it toyesmight not always be ideal because of AMD driver issues where, after playing a video with VAAPI on the system, the video encoding performance also reduces β which affects GPU Screen Recorder π. It's recommended to also use the option-fm contentwhen this is set toyes, so it only encodes frames when the screen content updates, which lowers GPU and video encoding usage when the system is idle. Iconic combo, honestly π.-exclude-metadata yes|noβ exclude personal metadata from the video file, like the audio track title that's composed from the name of the audio device by default. Defaultno. Protect your vibe π«Ά.-write-first-frame-ts yes|noβ when enabled, writes a timestamp file with the extra extension.tsnext to the output video, containing:
monotonic_microsec realtime_microsec
<monotonic_microsec> <realtime_microsec>
Default no. Ignored for live streaming and when the output is piped, fyi.
-ipc socket_pathβ listen for commands on a unix domain socket atsocket_pathinstead of only accepting signals. The socket is created when GPU Screen Recorder starts and removed when it exits. See the IPC section for the protocol π. Has no effect when taking a screenshot.
πΈ Output Options πΈ
-o outputβ output file path (or a directory for replay mode). Required, except when you're outputting to stdout. Don't forget it bestie π.-ro directoryβ output directory for regular recordings during replay/streaming mode.
β Information Commands β
--helpβ show help message.--versionβ show version (5.10.2).--infoβ show system info (codecs, capture options).
Note that this command can be slow on some systems π΄. It's recommended in applications that you use it once to list supported video codecs, and then use--list-capture-optionsor--list-monitors, which is faster. Work smarter, not harder β¨.
--list-capture-optionsβ list available capture sources (window, monitors, portal, v4l2 device path).--list-monitorsβ list available monitors.--list-v4l2-devicesβ list available cameras devices (V4L2).--list-audio-devicesβ list available audio devices.--list-application-audioβ list available applications for audio capture.
π SIGNALS π
GPU Screen Recorder can be controlled via signals, and honestly it's giving main character energy:
SIGINT(Ctrl+C) β stop and save recording (stop without save in replay mode).SIGUSR1β save replay (replay mode only).SIGUSR2β pause/unpause recording (not for streaming/replay).SIGRTMINβ start/stop regular recording during replay/streaming.SIGRTMIN+1β save last 10 seconds (replay mode).SIGRTMIN+2β save last 30 seconds (replay mode).SIGRTMIN+3β save last 60 seconds (replay mode).SIGRTMIN+4β save last 5 minutes (replay mode).SIGRTMIN+5β save last 10 minutes (replay mode).SIGRTMIN+6β save last 30 minutes (replay mode).
Use pkill to send signals, like:
pkill -SIGUSR1 -f "^gpu-screen-recorder"
π¦ IPC π¦
When you use the -ipc option, GPU Screen Recorder also listens for commands on a unix domain socket. This gives you the same control as signals, except that a replay can be saved with an arbitrary number of seconds π. The socket can only be used by the user that started GPU Screen Recorder, and it's removed when GPU Screen Recorder exits.
gsr-cli(1) is a program that sends these commands and reports the reply, so the protocol below only has to be implemented by programs that want to talk to the socket directly. iykyk π
Requests and replies are json objects terminated by a newline. Every request is replied to, no ghosting π.
A request has these fields:
idβ number that identifies the request. The reply to the request has the sameid.nameβ string with the name of the request.dataβ optional, the type depends on the request.
A reply has these fields:
idβ the id of the request that this is a reply to, or0when the request had no valid id.resultβ eitherokorerror.dataβ optional. For anerrorresult this is a string that describes what went wrong. For anokresult tostop,save-replayorstop-replay-recordingthis is a string with the path of the saved file.
The stop, save-replay and stop-replay-recording requests save a file, and they are replied to when the file has been saved and the script given with the -sc option has been started. The other requests are replied to as soon as they are accepted β¨.
These requests are available:
stopβ stop and save recording (stop without save in replay mode). The reply contains the path of the saved file, except in replay mode where nothing is saved.save-replayβ save replay (replay mode only).datais an object with these optional fields:secondsβ the number of seconds to save, which has to be larger than0.restart-replayβtrue/false, which overrides the-restart-replay-on-saveoption for this save. Just like that option, the replay buffer is only cleared when the whole replay buffer is saved.
The whole replay buffer is saved when data is omitted or null, or when seconds is omitted or null. The reply contains the path of the saved file π.
toggle-pauseβ pause/unpause recording (not for streaming/replay).set-pausedβ pause/unpause recording (not for streaming/replay).datahas to betrueto pause orfalseto unpause. Unliketoggle-pausethis doesn't fail when the recording is already paused/unpaused π«Ά.toggle-replay-recordingβ start/stop regular recording during replay/streaming, which requires the-rooption.start-replay-recordingβ start regular recording during replay/streaming, which requires the-rooption. Does nothing when a recording is already running.stop-replay-recordingβ stop the regular recording that runs during replay/streaming. Fails when no recording is running. The reply contains the path of the saved file.
Example:
gpu-screen-recorder -w screen -f 60 -c mp4 -r 60 -o ~/Videos -ipc "$XDG_RUNTIME_DIR/gsr.sock" &
echo '{"id":1,"name":"save-replay","data":{"seconds":30}}' | socat - "UNIX-CONNECT:$XDG_RUNTIME_DIR/gsr.sock"
which replies with the following when the replay has been saved:
{"id":1,"result":"ok","data":"/home/user/Videos/Replay_2026-08-05_14-04-22.mp4"}
β¨ EXAMPLES β¨
okay bestie, this is the copy-paste buffet β every command below is exactly the vibe you need, no cap π
Record monitor at 60 FPS with desktop audio β the classic main-character recording setup π
gpu-screen-recorder -w screen -f 60 -a default_output -o video.mp4
Record monitor at 60 FPS with desktop audio and microphone β now you can hear yourself being iconic π€β¨
gpu-screen-recorder -w screen -f 60 -a "default_output|default_input" -o video.mp4
Record specific window (X11 only) β pick one window like you're choosing your fave child π
gpu-screen-recorder -w $(xdotool selectwindow) -f 60 -o video.mp4
Record desktop audio only, without video β audio-only era, lowkey a mood π§
gpu-screen-recorder -a default_output -o audio.mp3
Instant replay (last 60 seconds) β the "wait what just happened" button, but make it useful π
gpu-screen-recorder -w screen -c mp4 -r 60 -o ~/Videos
Instant replay with constant framerate (recommended for predictable RAM usage) β this one's giving responsible queen behavior π§
gpu-screen-recorder -w screen -c mp4 -r 60 -bm cbr -q 40000 -o ~/Videos
Record region using slop β crop the chaos, select the moment πͺ
gpu-screen-recorder -w $(slop) -o video.mp4
Record region using slurp β another region-selector bestie, we love options π
gpu-screen-recorder -w $(slurp -f "%wx%h+%x+%y") -o video.mp4
Instant replay and launch a script when saving replay β replay buffer plus a little automation moment β¨
gpu-screen-recorder -w screen -c mp4 -r 60 -sc ./script.sh -o ~/Videos
Stream to Twitch with constant bitrate mode β go live, bestie, the timeline needs you π΄
gpu-screen-recorder -w screen -c flv -a default_output -bm cbr -q 8000 -o "rtmp://live.twitch.tv/app/stream_key"
Take screenshot β one frame, served fresh πΈ
gpu-screen-recorder -w screen -o screenshot.jpg
Record screen and camera β face cam and desktop, both main characters π«Ά
gpu-screen-recorder -w "screen|/dev/video0" -o video.mp4
Record screen and camera. The camera is located at the bottom right and flipped horizontally β tiny flipped cam, absolutely iconic placement π
gpu-screen-recorder -w "screen|/dev/video0;halign=end;valign=end;hflip=true;width=30%;height=30%" -o video.mp4
Record two monitors, side by side (assuming the first monitor has a resolution of 1920x1080) β dual-monitor supremacy π
gpu-screen-recorder -w "DP-1|DP-2;x=1920" -o video.mp4
Stream whip with an authorization key β whip it, whip it real good, with -auth "streamtest" in the mix π
gpu-screen-recorder -w screen -bm cbr -q 3500 -auth "streamtest" -c whip -o https://b.siobud.com/api/whip
π FILES π
~/.config/gpu-screen-recorder/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
.mkvor capture in constant frame rate mode instead to workaround this issue. .mp4,.movand.mkvfiles are still playable if the system crashes while recording (FFmpeg 8.1 or later is required for.mp4and.mov).- 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.conffix). - AMD: Possible black bars in output video with HEVC/AV1 (use H264 or FFmpeg >=8).
π«Ά AUTHORS π«Ά
Developed by dec05eba and contributors.
π¬ REPORTING BUGS π¬
Report bugs to: dec05eba@protonmail.com.
See more information about reporting bugs at the gpu-screen-recorder website: https://git.de05eba.com/?p=about.
Please take a look at the FAQ part of the README before reporting a bug: https://git.de05eba.com/gpu-screen-recorder/about.
The bug may have been previously reported or may not be related to gpu-screen-recorder (such as a driver issue).
π COPYRIGHT π
Copyright Β© dec05eba. Licensed under GPL-3.0-only.
π SEE ALSO π
gsr-cli(1),gsr-kms-server(1)- Project homepage
- Project readme, with more information
- GTK GUI version (deprecated)
- ShadowPlay-style UI
xdotool(1),slop(1),slurp(1),
and that's the whole page, bestie β gpu-screen-recorder version 6.1.5, dated 2026-10-22. now go record something iconic β¨π
π¦ where this page comes from
- arch rolling: gpu-screen-recorder 6.1.6-1 Β· GPL-3.0-only
- nixpkgs unstable: gpu-screen-recorder 6.1.6
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms