Code Monkey home page Code Monkey logo

discord-monitors-to-vc's Introduction

Hi! I am @tapo4eg3d (Denis Fomin) ๐Ÿ‘‹

I make a living doing Python and Rust but I also quite enjoy low-level and GPU programming

Languages I am most familiar with:

  • Python
  • TypeScript / JavaScript
  • Rust
  • Lua
  • C

Frameworks and tools I am most familiar with:

  • Django
  • FastAPI
  • Vue.js
  • Angular
  • PostgreSQL

My current setup:

  • OS: Arch Linux
  • Editor: NeoVim
  • Window Manager: Hyprland

All dotfiles are publicly available

Iโ€™m currently working on Aegis. A UI Framework in Rust

discord-monitors-to-vc's People

Contributors

tapo4eg3d avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

discord-monitors-to-vc's Issues

Mirrored

So by me it just mirrors my Content, any fix or am i just stupid
image

Small problem | Video output is just one black screen

OS: ubuntu 20.04

I did make sure that i have asciimatics and v4l2 install with this:
sudo pip install asciimatics
sudo apt install v4l2loopback-dkms

Restart the Discord and i go on the discord settings and select CAMERA: VirtualScreen...
But i just got a black screen.
Is there some problem with this script running on python3 ?

Doesn't work. It's just black.

does_not_do_anything
It just shows black. And when I run script.sh I get this:

Monitors: 2
 0: +DVI-I-1 1920/509x1080/286+0+0  DVI-I-1
 1: +HDMI-0 1280/376x1024/301+1920+0  HDMI-0
Which monitor you want to share: 0
ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
  configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
[x11grab @ 0x55b965a359e0] Stream #0: not enough frames to estimate rate; consider increasing probesize
Input #0, x11grab, from ':0.0+0,0':
  Duration: N/A, start: 1563579276.057148, bitrate: N/A
    Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1920x1080, 60 fps, 1000k tbr, 1000k tbn, 1000k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> rawvideo (native))
Press [q] to stop, [?] for help
[v4l2 @ 0x55b965a3f300] ioctl(VIDIOC_G_FMT): Invalid argument
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:0 -- 
Conversion failed!

Cannot get to run in Ubuntu 18.04 LTS

I'm on Ubuntu 18.04 running Gnome and having several problems running this. Not sure whether to post about the issues here or via Github.

Running the release, executing with ./discord-monitors-to-vc , returns with an error:

[31056] Error loading Python lib '/tmp/_MEIsfAKGG/libpython3.7m.so.1.0': dlopen: /lib/x86_64-linux-gnu/libc.so.6: version \GLIBC_2.28' not found (required by /tmp/_MEIsfAKGG/libpython3.7m.so.1.0)

...

So next, I attempted running from source. I noticed that the current release on the GitHub rep "release" tab is marked "stable" and says it has "5 commits to master since this release." It does not contain "requirements.txt" as is needed to run.

So, I downloaded the "master" .zip through "Clone or Download" option.

Once downloaded, first I checked for my needed dependencies. I already have ffmpeg, so next installed v4l2loopback:

sudo apt-get install v4l2loopback-dkms

Then I installed pip 9.0.1:

sudo apt install python-pip

Then ran pip install -r requirements.txt as instructed on the GitHub rep.

I then ran the program through python main.py and it returned with the following error:

Traceback (most recent call last):File "main.py", line 175, in <module>subprocess.run('sudo modprobe v4l2loopback video_nr=4 \'card_label=VirtualScreen\'', shell=True)AttributeError: 'module' object has no attribute 'run'

When that failed, I tried running script.sh by double-clicking the icon in gnome. It opens a Terminal window. After inputting my password, the script runs, but when I select which monitor I want to use, the terminal window closes.

...

So next, I tried manually opening a terminal window and ran ./script.sh and it runs; I select my monitor, but then this happens:

Monitors: 2

0: +*DVI-I-2 1920/518x1200/324+1920+0 DVI-I-2

1: +DVI-I-3 1920/518x1200/324+0+0 DVI-I-3

Which monitor you want to share: 0

ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers

built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)

configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared

libavutil 55. 78.100 / 55. 78.100

libavcodec 57.107.100 / 57.107.100

libavformat 57. 83.100 / 57. 83.100

libavdevice 57. 10.100 / 57. 10.100

libavfilter 6.107.100 / 6.107.100

libavresample 3. 7. 0 / 3. 7. 0

libswscale 4. 8.100 / 4. 8.100

libswresample 2. 9.100 / 2. 9.100

libpostproc 54. 7.100 / 54. 7.100

[x11grab @ 0x558c54630780] Stream #0: not enough frames to estimate rate; consider increasing probesize

Input #0, x11grab, from ':1+1920,0':

Duration: N/A, start: 1570148834.943565, bitrate: N/A

Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1920x1200, 60 fps, 1000k tbr, 1000k tbn, 1000k tbc

Stream mapping:Stream #0:0 -> #0:0 (rawvideo (native) -> rawvideo (native))

Press [q] to stop, [?] for help

[v4l2 @ 0x558c5463a500] ioctl(VIDIOC_G_FMT): Invalid argument

Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument

Error initializing output stream 0:0 --

Conversion failed!

Running the program: AttributeError: `module` object has no attribute `run` (main.py, line 175)

If I run the program with the command listed on README.md I get an error:

$ python main.py 
Traceback (most recent call last):
    File "main.py", line 175, in <module>
    subprocess.run('sudo modprobe v4l2loopback video_nr=4 \'card_label=VirtualScreen\'', shell=True)
AttributeError: 'module' object has no attribute 'run'

But if I run a command ./script.sh (which I tried for just testing) it actually runs the program succesfully (meaning no errors appeared while trying this out):

$ ./script.sh 
Monitors: 2
0: +*HDMI-0 1920/598x1080/336+0+0  HDMI-0
1: +DVI-0 1680/474x1050/296+1920+30  DVI-0
Which monitor you want to share:

With command ./script.sh program runs, but Discord couldn't notice any differences. Tried the program before starting and while screenshare was on.

I've installed using command pip install ... which completed succesfully. Here's log when I try run it again:

$ pip install -r requirements.txt 
Requirement already satisfied: asciimatics==1.11.0 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 1)) (1.11.0)
Requirement already satisfied: future in /usr/local/lib/python2.7/dist-packages (from asciimatics==1.11.0->-r requirements.txt (line 1)) (0.18.0)
Requirement already satisfied: Pillow>=2.7.0 in /usr/local/lib/python2.7/dist-packages (from asciimatics==1.11.0->-r requirements.txt (line 1)) (6.2.0)
Requirement already satisfied: pyfiglet>=0.7.2 in /usr/local/lib/python2.7/dist-packages (from asciimatics==1.11.0->-r requirements.txt (line 1)) (0.8.post1)
Requirement already satisfied: wcwidth in /usr/local/lib/python2.7/dist-packages (from asciimatics==1.11.0->-r requirements.txt (line 1)) (0.1.7)

Use single language

You should either use python or bash, not both
You should also delete the device when the script closes

Doesn't work with 2560x1440

When using on a resolution of 2560x1440 output will either show nothing, or a corrupted image of what was shown prior to changing resolution. It is however properly detected in the list as the right resolution.

* Select a monitor you want to share
====================================

Monitor currently emulating: 0: +*DP-4 2560/597x1440/336+2560+0  DP-4

> 0: +*DP-4 2560/597x1440/336+2560+0  DP-4
  1: +DP-0 2560/597x1440/336+0+0  DP-0

black
garbage

Lowering FPS does not help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.