I have a setup with 2 monitors. I'm on Manjaro
, I installed v4l2loopback
from AUR
(here is github link: https://github.com/umlaeute/v4l2loopback)and it works great, no problem there. But my question is how to specify which monitor I want it to use? What I did was:
$ sudo modprobe v4l2loopback exclusive_caps=1
$ ffmpeg -f x11grab -r xllgrab -r 15 -s 1920x1080 -i :0.0+0,0 -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video0
And sure it works greater, but I want to stream a different monitor. How can I do that?
Also (its a PC and I never had any cameras so /video0
is the fake webcam:
$ v4l2-ctl --list-devices
Dummy video device (0x0000) (platform:v4l2loopback-000):
/dev/video0
The one with a DP
(DisplayPort) is the one I want to stream
$ xrandr --listmonitors
Monitors: 2
0: +*DP-4 1920/480x1080/270+1920+0 DP-4
1: +HDMI-0 1920/531x1080/299+0+0 HDMI-0
:0.0+1920,0
) – John May 27 '20 at 13:43