← 返回命令列表

Linux command

gpu-screen-recorder 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Example

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

Example

gpu-screen-recorder -w [screen|DP-1|HDMI-A1|...] -o [path/to/video.mp4]

Example

gpu-screen-recorder --list-capture-options

Example

gpu-screen-recorder --list-audio-devices

Example

gpu-screen-recorder -w screen -r 30 -c mp4 -ro [path/to/directory] -o whatever

Capture

pkill -SIGUSR1 -f gpu-screen-recorder

Example

systemctl start --user gpu-screen-recorder

说明

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.

参数

-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, hevc_hdr, av1_hdr (default: auto).
-q _QUALITY_
Quality preset: medium, high, very_high, ultra (default: very_high). In CBR mode, specifies bitrate.
-bm _auto|qp|vbr|cbr_
Bitrate mode (default: auto). CBR recommended for replay/streaming.
-a _SOURCE_
Audio source: default_output, default_input, 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.

FAQ

What is the gpu-screen-recorder command used for?

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.

How do I run a basic gpu-screen-recorder example?

Run `gpu-screen-recorder -w portal -o [path/to/video.mp4]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -w _SOURCE_ do in gpu-screen-recorder?

Video source: window ID, monitor name, focused, portal, region, or V4L2 device path. Combine with |.