WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

yassirnajmaoui/discord-screenshare-workaround

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

discord-screenshare-workaround

A workaround for Discord's Linux screensharing problems. Linux users on Discord experience a problem when screensharing multiple monitors. The software wouldn't make a difference between two monitors. Ever since 2017, the Discord Linux community has been asking for a fix, which has not happened :(. Since I cannot change the Discord source code, I suggest here a workaround using a virtual camera from the reliable v4l2loopback software.

There has been other workarounds in the past, but they didn't work on my PC...

Setup

Make sure you have ffmpeg installed on your system.

  1. Clone the repository in https://github.com/umlaeute/v4l2loopback/
  2. Follow their instructions to correctly compile, install and modprobe the kernel module
  3. Put the script in this repository where you can easily access it, or even in your $PATH

Usage

How the script works

  • The script starts by calling modprobe, which makes sure the v4l2loopback kernel module has been loaded
  • Then it uses ffmpeg to stream the Video4Linux capture from your screen to a virtual camera, this command was taken from This Stackoverflow answer
  • The script was made for 2 monitors, feel free to change it if you have 3 or more.

Calling

To stream your first monitor:

screen2cam 1

To stream the second monitor:

screen2cam 2

Troubleshooting

  • It is possible that the v4l2loopback module on your computer generated the camera as /dev/video0 or /dev/video1 or any /dev/video*. I haven't found an easy method to find the correct one except by trial and error.
  • It is possible that your screen is not 1920x1080. Again, feel free to change the script to suit your needs.

About

A workaround for Discord's Linux screensharing problems

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published