sudo usermod -aG video <username>
export XDG_RUNTIME_DIR="/run/user/$(id -u)"
sudo pacman -S wf-recorder v4l2loopback-dkms v4l2loopback-utils
echo "v4l2loopback" | sudo tee /etc/modules-load.d/v4l2loopback.conf
echo 'options v4l2loopback video_nr=10 card_label="Wayland Virtual Webcam"' | sudo tee /etc/modprobe.d/v4l2loopback-options.conf
sudo systemctl enable --now systemd-modules-load.service
#!/bin/bash
wf-recorder --pixel-format=yuv420p -fflags +genpts --geometry="0,0 1920x1080" --filter=hflip --muxer=v4l2 --codec=rawvideo --file=/dev/video10 -t
You can adjust your geometry that you want to stream. If your watchers get a flipped picture, you can remove --filter=hflip
. Beware that Discord can show a flipped picture only for you, and people who watch your stream should get normal picture. Anyway you can play with it.
sudo chmod +x /usr/bin/sharescreen
wf-recorder: invalid option -- 't'