WF-RECORDER(1) | General Commands Manual | WF-RECORDER(1) |
wf-recorder
—
simple screen recording program for wlroots-based
compositors
wf-recorder |
[-abcdDefghlmoptvx ] [-a ,
--audio [DEVICE]]
[-b, --bframes
max_b_frames] [-c,
--codec output_codec]
[-d, --device
encoding_device] [-D,
--no-damage ] [-f
filename.ext] [-F
filter_string] [-g,
--geometry geometry]
[-h, --help ]
[-l, --log ]
[-m, --muxer
muxer] [-o,
--output output]
[-p, --codec-param
[option_param=option_value]]
[-t, --force-yuv ]
[-v, --version ]
[-x, --pixel-format ] |
wf-recorder
is a tool built to record your
screen on Wayland compositors. It makes use of
wlr-screencopy
for capturing video and ffmpeg(1) for encoding it.
In its simplest form, run wf-recorder
to
start recording and use ‘Ctrl+C
’ to
stop. This will create a file called
‘recording.mp4
’ in the current working
directory using the default codec.
The options are as follows:
-a
,
--audio
[DEVICE]DEVICE argument is optional. In case you want to specify the PulseAudio device which will capture the audio, you can run this command with the name of that device. You can find your device by running
-b
,
--bframes
max_b_frames-c
,
--codec
To modify codec parameters, use -p
option_name=option_value
-d
,
--device
encoding_deviceSome drivers report support for
‘rgb0
’ data for vaapi input but
really only support yuv. Use the -t
,
--force-yuv
option in addition to the vaapi
options to convert the data in software, before sending it to the
GPU.
-D
,
--no-damage
-f
filename.ext-f
option, the output file will have
the name filename.ext and the file format will be
determined by the provided extension. If the extension is not recognized
by your ffmpeg(1) muxers, the command will fail.
You can check the muxers that your ffmpeg(1) installation supports by running
$ ffmpeg -muxers
-F
,
--filter
filter_string-g
,
--geometry
screen_geometry-h
,
--help
-l
,
--log
-m
,
--muxer
muxer-o
,
--output
-p
,
--codec-param
[option_name=option_value]-t
,
--force-yuv
-v
,
--version
-x
,
--pixel-format
pixel_formatList available formats using
$ ffmpeg -pix_fmts
To select a specific part of the screen you can either use
--g
geometry or use
https://github.com/emersion/slurp for interactive selection of the screen
area that will be recorded:
$ wf-recorder -g
$(slurp)
You can record screen and sound simultaneously with
$ wf-recorder --audio
--file=recording_with_audio.mp4
To specify a codec use the
-c
codec option. To modify
codec parameters, -p
option_name=option_value.
To set a specific output format, use the
-m
-muxer
option. For
example, to output to a v
ideo4linux2
loopback you might use:
$ wf-recorder --muxer=v4l2
--codec=rawvideo --file=/dev/video2
To use GPU encoding, use a VAAPI codec (for ex.
‘h264_vaapi
’ ) and specify a GPU
device to use with the -d
option:
$ wf-recorder -f test-vaapi.mkv -c
h264_vaapi -d /dev/dri/renderD128
Some drivers report support for
‘rgb0
’ data for
‘vaapi
’ input but really only support
yuv planar formats. In this case, use the -t
,
--force-yuv
option in addition to the
‘vaapi
’ options to convert the data to
yuv planar data before sending it to the GPU.
December 31, 2020 | Debian |