-
Notifications
You must be signed in to change notification settings - Fork 63
Home
The purpose of wf-recorder is to create a video file by recording your desktop. To use it, install and run it with
wf-recorder
It will output some text and begin recording. Use Ctrl+C to stop recording. The video file will be stored as recording.mp4 in the current working directory.
To tell wf-recorder to record audio, use -a
wf-recorder -a
Check pavucontrol recording tab for an entry while it is recording and choose the input. Optionally pass --audio=<device>
where <device>
is one output by pacmd list-sources | grep "name:"
.
Note that by default, either mic input or monitor of speakers can be used for input but not both. You can work around this by running pactl load-module module-loopback
to load the loopback module, which outputs the mic to the default speaker output, however it might not work very well depending on your exact setup.
A better, but more complicated way: Run pacmd list-sources | grep "name:"
and note the names of all the sources that you want to capture. Now, create a virtual sink, then using the loopback module make each of the sources output to this sink, and finally capture the sink's monitor with wf-recorder (replace the alsa_*
are the names of the sources to capture)
pactl load-module module-null-sink sink_name=Combined
pactl load-module module-loopback sink=Combined source=alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
pactl load-module module-loopback sink=Combined source=alsa_input.pci-0000_00_1f.3.analog-stereo
Now use Combined.monitor
as source for wf-recorder.
You can use wf-recorder and v4l2loopback
to display your monitor as a camera in Zoom & other applications.
Basic setup:
- Install
v4l2loopback
kernel module as described in its repository, then load it with
sudo modprobe v4l2loopback exclusive_caps=1 card_label=WfRecorder
- Launch
wf-recorder
with the following parameters:
wf-recorder --muxer=v4l2 --codec=rawvideo --file=/dev/video2 -x yuv420p
You may need to adjust the file name, for ex. set it to /dev/video0
depending on how many cameras are already existing on your computer.
- Test the camera with
ffplay
,cheese
or any webcam test in your browser.
ffplay /dev/video2
(Instructions based on https://github.com/ammen99/wf-recorder/pull/43)
Use the following command to show /dev/video0 in a native window with gst-launch-1.0 (gstreamer). Note that glimagesink must be available.
gst-launch-1.0 -v v4l2src device=/dev/video0 ! glimagesink