Skip to content

Instantly share code, notes, and snippets.

@trevor403
Created July 29, 2020 16:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save trevor403/408c26195ff5f0695de97fb30d7a3d27 to your computer and use it in GitHub Desktop.
Save trevor403/408c26195ff5f0695de97fb30d7a3d27 to your computer and use it in GitHub Desktop.
Virtual webcam for wayland screensharing
sudo modprobe v4l2loopback video_nr=4 card_label="virtual webcam" exclusive_caps=1
sudo ffmpeg -use_wallclock_as_timestamps 1 -fflags nobuffer -framerate 60 -device /dev/dri/card0 -f kmsgrab -format bgr0 -i - -vsync drop -init_hw_device vaapi=v:/dev/dri/renderD128 -filter_hw_device v -vf 'hwmap,hwdownload,format=yuv420p' -c:v rawvideo -f v4l2 /dev/video4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment