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
Record with constant framerate (disable damage optimization)
$ wf-recorder -D -f [output.mp4]
copy
Record and overwrite existing file
$ wf-recorder -y -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. 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.

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

INSTALL

sudo apt install wf-recorder
copy
sudo dnf install wf-recorder
copy
sudo pacman -S wf-recorder
copy
sudo apk add wf-recorder
copy
sudo zypper install wf-recorder
copy
nix profile install nixpkgs#wf-recorder
copy

CAVEATS

Wayland only; requires a wlroots-based compositor with wlr-screencopy support. Audio recording requires PipeWire or PulseAudio. Some compositors may require specific configuration for screen capture. The output format is determined by the file extension given to -f; unrecognized extensions will cause the command to fail.

SEE ALSO

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

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid