1WF-RECORDER(1) BSD General Commands Manual WF-RECORDER(1)
2
4 wf-recorder — simple screen recording program for wlroots-based composi‐
5 tors
6
8 wf-recorder [-abcCdDefFghlmopPrRvxX] [-a, --audio [=DEVICE]]
9 [-b, --bframes max_b_frames] [-B, --buffrate buffrate]
10 [-c, --codec output_codec] [-r, --framerate framerate]
11 [-d, --device encoding_device] [--no-dmabuf]
12 [-D, --no-damage] [-f filename.ext] [-F filter_string]
13 [-g, --geometry geometry] [-h, --help] [-l, --log]
14 [-m, --muxer muxer] [-o, --output output]
15 [-p, --codec-param [option_param=option_value]]
16 [-v, --version] [-x, --pixel-format]
17 [-C, --audio-codec output_audio_codec]
18 [-P, --audio-codec-param [option_param=option_value]]
19 [-R, --sample-rate sample_rate]
20 [-X, --sample-format sample_format]
21
23 wf-recorder is a tool built to record your screen on Wayland compositors.
24 It makes use of wlr-screencopy for capturing video and ffmpeg(1) for en‐
25 coding it.
26
27 In its simplest form, run wf-recorder to start recording and use ‘Ctrl+C’
28 to stop. This will create a file called ‘recording.mkv’ in the current
29 working directory using the default codec.
30
31 The options are as follows:
32
33 -a, --audio [=DEVICE]
34 Starts recording the screen with audio.
35
36 DEVICE argument is optional. In case you want to specify the
37 PulseAudio device which will capture the audio, you can run this
38 command with the name of that device. You can find your device
39 by running
40 $ pactl list sources | grep Name
41
42 -b, --bframes max_b_frames
43 Sets the maximum number of B-Frames to use.
44 -B, --buffrate buffrate
45 Tells the encoder a prediction of what framerate to expect. This
46 preserves VFR and Solves FPS limit issue of some encoders (like
47 svt-av1). Should be set to the same framerate as display.
48
49 -c, --codec output_codec
50 Specifies the codec of the video. Supports GIF output as well.
51
52 To modify codec parameters, use -p option_name=option_value
53
54 -r, --framerate framerate
55 Sets hard constant framerate. Will duplicate frames to reach it.
56 This makes the resulting video CFR. Solves FPS limit issue of
57 some encoders.
58
59 -d, --device encoding_device
60 Selects the device to use when encoding the video.
61
62 Some drivers report support for ‘rgb0’ data for vaapi input but
63 really only support yuv. Use the -x yuv420 option in addition to
64 the vaapi options to convert the data in software, before sending
65 it to the GPU.
66
67 --no-dmabuf
68 By default, wf-recorder will try to use only GPU buffers and
69 copies if using a GPU encoder. However, this can cause issues on
70 some systems. In such cases, this option will disable the GPU
71 copy and force a CPU one.
72
73 -D, --no-damage
74 By default, wf-recorder will request a new frame from the compos‐
75 itor only when the screen updates. This results in a much smaller
76 output file, which however has a variable refresh rate. When this
77 option is on, wf-recorder does not use this optimization and con‐
78 tinuously records new frames, even if there are no updates on the
79 screen.
80
81 -f filename.ext
82 By using the -f option, the output file will have the name
83 filename.ext and the file format will be determined by the pro‐
84 vided extension. If the extension is not recognized by your
85 ffmpeg(1) muxers, the command will fail.
86
87 You can check the muxers that your ffmpeg(1) installation sup‐
88 ports by running
89 $ ffmpeg -muxers
90
91 -F, --filter filter_string
92 Set the ffmpeg filter to use. VAAPI requires `scale_vaapi=for‐
93 mat=nv12:out_range=full` to work.
94
95 -g, --geometry screen_geometry
96 Selects a specific part of the screen. The format is "x,y WxH".
97
98 -h, --help
99 Prints the help screen.
100
101 -l, --log
102 Generates a log on the current terminal. For debug purposes.
103
104 -m, --muxer muxer
105 Set the output format to a specific muxer instead of detecting it
106 from the filename.
107
108 -o, --output
109 Specify the output where the video is to be recorded.
110
111 -p, --codec-param [option_name=option_value]
112 Change the codec parameters.
113
114 -v, --version
115 Print the version of wf-recorder.
116
117 -x, --pixel-format pixel_format
118 Set the output pixel format.
119
120 List available formats using
121 $ ffmpeg -pix_fmts
122
123 -C, --audio-codec output_audio_codec
124 Specifies the codec of the audio.
125
126 -P, --audio-codec-param [option_name=option_value]
127 Change the audio codec parameters.
128
129 -R, --sample-rate sample_rate
130 Changes the audio sample rate, in HZ. The default value is 48000.
131
132 -X, --sample-format sample_format
133 Set the output audio sample format.
134
135 List available formats using
136 $ ffmpeg -sample_fmts
137
138
140 To select a specific part of the screen you can either use --g geometry
141 or use https://github.com/emersion/slurp for interactive selection of the
142 screen area that will be recorded:
143 $ wf-recorder -g $(slurp)
144
145 You can record screen and sound simultaneously with
146 $ wf-recorder --audio --file=recording_with_audio.mkv
147
148 To specify an audio device, use the --a<DEVICE> or ---audio=<DEVICE> op‐
149 tions.
150
151 To specify a codec use the -c codec option. To modify codec parameters,
152 -p option_name=option_value.
153
154 To set a specific output format, use the -m, --muxer option. For example,
155 to output to a video4linux2 loopback you might use:
156 $ wf-recorder --muxer=v4l2 --codec=rawvideo --file=/dev/video2
157
158 To use GPU encoding, use a VAAPI codec (for ex. ‘vp9_vaapi’ ) and spec‐
159 ify a GPU device to use with the -d option:
160 $ wf-recorder -f test-vaapi.mkv -c vp9_vaapi -d /dev/dri/renderD128
161
162 Some drivers report support for ‘rgb0’ data for ‘vaapi’ input but really
163 only support yuv planar formats. In this case, use the -x yuv420p option
164 in addition to the ‘vaapi’ options to convert the data to yuv planar data
165 before sending it to the GPU.
166
168 ffmpeg(1), pactl(1)
169
170BSD July 30, 2022 BSD