1WF-RECORDER(1)            BSD General Commands Manual           WF-RECORDER(1)
2

NAME

4     wf-recorder — simple screen recording program for wlroots-based composi‐
5     tors
6

SYNOPSIS

8     wf-recorder [-abcCdDefFghlmopPrRvxX] [-a, --audio [=DEVICE]]
9                 [-b, --bframes max_b_frames] [-c, --codec output_codec]
10                 [-r, --framerate framerate] [-d, --device encoding_device]
11                 [-D, --no-damage] [-f filename.ext] [-F filter_string]
12                 [-g, --geometry geometry] [-h, --help] [-l, --log]
13                 [-m, --muxer muxer] [-o, --output output]
14                 [-p, --codec-param [option_param=option_value]]
15                 [-v, --version] [-x, --pixel-format]
16                 [-C, --audio-codec output_audio_codec]
17                 [-P, --audio-codec-param [option_param=option_value]]
18                 [-R, --sample-rate sample_rate]
19                 [-X, --sample-format sample_format]
20

DESCRIPTION

22     wf-recorder is a tool built to record your screen on Wayland compositors.
23     It makes use of wlr-screencopy for capturing video and ffmpeg(1) for en‐
24     coding it.
25
26     In its simplest form, run wf-recorder to start recording and use ‘Ctrl+C’
27     to stop.  This will create a file called ‘recording.mkv’ in the current
28     working directory using the default codec.
29
30     The options are as follows:
31
32     -a, --audio [=DEVICE]
33             Starts recording the screen with audio.
34
35             DEVICE argument is optional.  In case you want to specify the
36             PulseAudio device which will capture the audio, you can run this
37             command with the name of that device.  You can find your device
38             by running
39                   $ pactl list sources | grep Name
40
41     -b, --bframes max_b_frames
42             Sets the maximum number of B-Frames to use.
43
44     -c, --codec output_codec
45             Specifies the codec of the video. Supports GIF output as well.
46
47             To modify codec parameters, use -p option_name=option_value
48
49     -r, --framerate framerate
50             Changes an approximation of the video framerate. The default is
51             60.
52
53     -d, --device encoding_device
54             Selects the device to use when encoding the video.
55
56             Some drivers report support for ‘rgb0’ data for vaapi input but
57             really only support yuv.  Use the -x yuv420 option in addition to
58             the vaapi options to convert the data in software, before sending
59             it to the GPU.
60
61     -D, --no-damage
62             By default, wf-recorder will request a new frame from the compos‐
63             itor only when the screen updates. This results in a much smaller
64             output file, which however has a variable refresh rate. When this
65             option is on, wf-recorder does not use this optimization and con‐
66             tinuously records new frames, even if there are no updates on the
67             screen.
68
69     -f filename.ext
70             By using the -f option, the output file will have the name
71             filename.ext and the file format will be determined by the pro‐
72             vided extension.  If the extension is not recognized by your
73             ffmpeg(1) muxers, the command will fail.
74
75             You can check the muxers that your ffmpeg(1) installation sup‐
76             ports by running
77                   $ ffmpeg -muxers
78
79     -F, --filter filter_string
80             Set the ffmpeg filter to use. VAAPI requires `hwu‐
81             pload,scale_vaapi=nv12` to work.
82
83     -g, --geometry screen_geometry
84             Selects a specific part of the screen. The format is "x,y WxH".
85
86     -h, --help
87             Prints the help screen.
88
89     -l, --log
90             Generates a log on the current terminal. For debug purposes.
91
92     -m, --muxer muxer
93             Set the output format to a specific muxer instead of detecting it
94             from the filename.
95
96     -o, --output
97             Specify the output where the video is to be recorded.
98
99     -p, --codec-param [option_name=option_value]
100             Change the codec parameters.
101
102     -v, --version
103             Print the version of wf-recorder.
104
105     -x, --pixel-format pixel_format
106             Set the output pixel format.
107
108             List available formats using
109                   $ ffmpeg -pix_fmts
110
111     -C, --audio-codec output_audio_codec
112             Specifies the codec of the audio.
113
114     -P, --audio-codec-param [option_name=option_value]
115             Change the audio codec parameters.
116
117     -R, --sample-rate sample_rate
118             Changes the audio sample rate, in HZ. The default value is 48000.
119
120     -X, --sample-format sample_format
121             Set the output audio sample format.
122
123             List available formats using
124                   $ ffmpeg -sample_fmts
125
126

EXAMPLES

128     To select a specific part of the screen you can either use --g geometry
129     or use https://github.com/emersion/slurp for interactive selection of the
130     screen area that will be recorded:
131           $ wf-recorder -g $(slurp)
132
133     You can record screen and sound simultaneously with
134           $ wf-recorder --audio --file=recording_with_audio.mkv
135
136     To specify an audio device, use the --a<DEVICE> or ---audio=<DEVICE> op‐
137     tions.
138
139     To specify a codec use the -c codec option. To modify codec parameters,
140     -p option_name=option_value.
141
142     To set a specific output format, use the -m, --muxer option. For example,
143     to output to a video4linux2 loopback you might use:
144           $ wf-recorder --muxer=v4l2 --codec=rawvideo --file=/dev/video2
145
146     To use GPU encoding, use a VAAPI codec (for ex.  ‘vp9_vaapi’ ) and spec‐
147     ify a GPU device to use with the -d option:
148           $ wf-recorder -f test-vaapi.mkv -c vp9_vaapi -d /dev/dri/renderD128
149
150     Some drivers report support for ‘rgb0’ data for ‘vaapi’ input but really
151     only support yuv planar formats.  In this case, use the -x yuv420p option
152     in addition to the ‘vaapi’ options to convert the data to yuv planar data
153     before sending it to the GPU.
154

SEE ALSO

156     ffmpeg(1), pactl(1)
157
158BSD                              July 30, 2022                             BSD
Impressum