LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

wf-recorder

Screen recording for Wayland compositors

TLDR

Record to MP4 file
$ wf-recorder -f [output.mp4]
copy
Record with audio
$ wf-recorder -a -f [path/to/file_with_audio.webm]
copy
Record region selected with slurp
$ wf-recorder -g "$(slurp)"
copy
Record specific output (monitor)
$ wf-recorder -o [DP-1] -f [output.mp4]
copy
Record using a specific codec
$ wf-recorder -c h264_vaapi -f [output.mp4]
copy
Record with custom framerate
$ wf-recorder -r [30] -f [output.mp4]
copy

SYNOPSIS

wf-recorder [OPTIONS]

DESCRIPTION

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.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.

PARAMETERS

-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)

CAVEATS

Wayland only. Audio recording requires PipeWire or PulseAudio. Some compositors may require specific configuration for screen capture.

SEE ALSO

slurp(1), grim(1), ffmpeg(1)

Copied to clipboard
Kai