← 返回命令列表

Linux command

wf-recorder 命令

文本

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

常用示例

Record

wf-recorder -f [output.mp4]

Example

wf-recorder -a -f [path/to/file_with_audio.webm]

Example

wf-recorder -g "$(slurp)"

Example

wf-recorder -o [DP-1] -f [output.mp4]

Example

wf-recorder -c h264_vaapi -f [output.mp4]

Example

wf-recorder -r [30] -f [output.mp4]

Example

wf-recorder -D -f [output.mp4]

Example

wf-recorder -y -f [output.mp4]

说明

wf-recorder is a screen recording tool for Wayland compositors that use the wlroots library (e.g., Sway, Hyprland). It captures the screen to video files with optional audio, supporting various output formats and codecs via FFmpeg. The default output file is recording.mp4 in the current directory. Stop recording with Ctrl+C or by sending SIGINT. Region selection can be done interactively with slurp. Hardware-accelerated encoding is supported through VAAPI codecs. By default, wf-recorder only requests new frames when the screen updates, producing a variable framerate output. Use -D to record continuously at a constant framerate instead.

参数

-f, --file _PATH_
Output file path
-a, --audio
Include audio in recording
-g, --geometry _WxH+X+Y_
Record specified region
-c _CODEC_
Video codec to use (e.g., h264_vaapi, libx264)
-C _CODEC_
Audio codec to use
-o, --output _NAME_
Record specific Wayland output (monitor)
-r, --framerate _FPS_
Set recording framerate
-d, --device _PATH_
DRM device for hardware encoding
-p _KEY=VALUE_
Pass codec-specific parameters (e.g., -p crf=20)
-F _FILTER_
FFmpeg filter string (e.g., scale=1280:720)
-b _N_
Maximum number of B-Frames to use
-B, --buffrate _FPS_
Predicted framerate for the encoder (preserves VFR, fixes FPS limits with some encoders like svt-av1)
-D, --no-damage
Disable damage optimization; record every frame even without screen updates (produces constant framerate)
-y
Force overwrite the output file without prompting
-h
Print help information
-v
Print version information

FAQ

What is the wf-recorder command used for?

wf-recorder is a screen recording tool for Wayland compositors that use the wlroots library (e.g., Sway, Hyprland). It captures the screen to video files with optional audio, supporting various output formats and codecs via FFmpeg. The default output file is recording.mp4 in the current directory. Stop recording with Ctrl+C or by sending SIGINT. Region selection can be done interactively with slurp. Hardware-accelerated encoding is supported through VAAPI codecs. By default, wf-recorder only requests new frames when the screen updates, producing a variable framerate output. Use -D to record continuously at a constant framerate instead.

How do I run a basic wf-recorder example?

Run `wf-recorder -f [output.mp4]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -f, --file _PATH_ do in wf-recorder?

Output file path