ShayBox / Mon2Cam

Workaround for multi-monitor Discord screensharing
MIT License
338 stars 33 forks source link

Discord share window stock in "loading" #64

Closed DatStorm closed 3 years ago

DatStorm commented 3 years ago

Hey.

The problem is that when I have it running it does not seem to work. Discord just keeps stays in loading state. I am able to select webcam "mon2cam". So that seem to work, I have no errors as shown below. Running Ubuntu 20.04.


❯ mon2cam -v
DEBUG Starting Mon2Cam with the following options: Options {
  framerate: 60,
  device: 50,
  resolution: "",
  ffmpeg: [],
  border: false,
  sound: false,
  wayland: false,
  loggerOptions: { verbose: true },
  execOptions: { verbose: true, output: 3 }
}
DEBUG Checking if V4L2 device exists
DEBUG V4L2 device not found with id 50, creating it

Exec Context: 2b2d724a-4bb0-473c-94bb-017d6c1edd1a
    Exec Options:  { verbose: true, output: 3 }
    Exec Command: sudo modprobe -r v4l2loopback
    Exec Command Splits:  [sudo,modprobe,-r,v4l2loopback]
[sudo] password for datstorm: 
    Exec Result:  { code: 0, success: true },
 output: ""
Exec Context: 2b2d724a-4bb0-473c-94bb-017d6c1edd1a

Exec Context: 3b53e52a-6951-41ca-9364-c65d0faf5de6
    Exec Options:  { verbose: true, output: 3 }
    Exec Command: sudo modprobe v4l2loopback video_nr=50 card_label="Mon2Cam"
    Exec Command Splits:  [sudo,modprobe,v4l2loopback,video_nr=50,card_label="Mon2Cam"]
    Exec Result:  { code: 0, success: true },
 output: ""
Exec Context: 3b53e52a-6951-41ca-9364-c65d0faf5de6

DEBUG V4L2 device created with id 50
INFO X11 detected, to use Wayland add -w
0: 2560x1080 DP-0
1: 2560x1080 DVI-D-0
2: 2560x1080 HDMI-0
3: 2560x1080 HDMI-2
4: 2560x1080 HDMI-1-1
Which monitor?
0
WARN The selected resolution (2560:1080) may not be supported by discord. Please use the -r flag to change the resolution, if needed.
INFO CTRL + C to stop
INFO The screen will look mirrored for you, not others

Exec Context: 2faf405e-2aec-46f2-aa54-fd982333407c
    Exec Options:  { verbose: true, output: 3 }
    Exec Command: ffmpeg -f x11grab -r 60 -s 2560x1080 -i :0+2560,532 -pix_fmt yuv420p -f v4l2 /dev/video50
    Exec Command Splits:  [ffmpeg,-f,x11grab,-r,60,-s,2560x1080,-i,:0+2560,532,-pix_fmt,yuv420p,-f,v4l2,/dev/video50]
DEBUG Exiting

bug

^ just stays in this state.

botiapa commented 3 years ago

Please use the -r flag to specify a supported resolution (1920x1080 for example).

offtopic: holy f**k why the hell do you have 5 widescreen displays??

DatStorm commented 3 years ago

@botiapa works like a charm thank you!

Offtopic: I'm a computer science student and it works really well when solving tasks. They are stacked on top of each other. :)

botiapa commented 3 years ago

Cool, closing the issue.