ShayBox / Mon2Cam

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

mon2cam not working properly #33

Closed rodude123 closed 3 years ago

rodude123 commented 3 years ago

Just got it of aur and it doesn't work fully as soon as I run it, it just exists. what should I do. I didn't press CTRL + C image

ShayBox commented 3 years ago

Run it with verbose to see why, I'm guessing ffmpeg error

EDIT: That keyboard icon is cool af

H4kt commented 3 years ago

I've got the same issue on Ubuntu 20.04.1

Exec Command Splits:  [ffmpeg,-f,x11grab,-r,60,-s,1920x1080,-i,:1+0,0,-pix_fmt,yuv420p,-f,v4l2,/dev/video50]
Exec Result:  { status: { code: 1, success: false }, output: "" }
Exec Context: ac240426-115c-4f66-b35e-373269950a5c
anilaydinn commented 3 years ago

I've got same issue on Manjaro Linux.

botiapa commented 3 years ago

@H4kt In the output you posted, could you try to run the split command manually?

jakweg commented 3 years ago

I got same issue on Linux Mint When I executed this command manually i got: jakub@ASUS-Jakub:~$ ffmpeg -f x11grab -r 60 -s 1920x1080 -i :0+1920,0 -pix_fmt yuv420p -f v4l2 /dev/video50 ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 9 (Ubuntu 9.3.0-10ubuntu2) configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared libavutil 56. 31.100 / 56. 31.100 libavcodec 58. 54.100 / 58. 54.100 libavformat 58. 29.100 / 58. 29.100 libavdevice 58. 8.100 / 58. 8.100 libavfilter 7. 57.100 / 7. 57.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 5.100 / 5. 5.100 libswresample 3. 5.100 / 3. 5.100 libpostproc 55. 5.100 / 55. 5.100 [x11grab @ 0x55634bec7740] Stream #0: not enough frames to estimate rate; consider increasing probesize Input #0, x11grab, from ':0+1920,0': Duration: N/A, start: 1597751963.377689, 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 [video4linux2,v4l2 @ 0x55634bed3480] Unable to open V4L2 device '/dev/video50' Could not write header for output file #0 (incorrect codec parameters ?): No such file or directory Error initializing output stream 0:0 -- Conversion failed! I had to install one packet: sudo apt-get install -y v4l2loopback-dkms It works now

botiapa commented 3 years ago

The script should detect if v4l2 is installed, or not. @ShayBox We should check if this is working correctly.

ShayBox commented 3 years ago

Only way to do that is to check if the file exists, 4vl2 is different per distro

botiapa commented 3 years ago

@anilaydinn @H4kt @rodude123 Have you managed to make it work? Is this closable?

rodude123 commented 3 years ago

LIke mine still doesn't work but I have given up on it.

botiapa commented 3 years ago

We'll implement proper stderr handling soon, after that, it'll probably be much easier to debug. However, I would understand, if you're not interested anymore.

ShayBox commented 3 years ago

That error tends to be some problem with v4l2loopback not being installed, or loaded/reloaded, I would either try sudo apt-get install -y v4l2loopback-dkms reboot and see if it works, or try compiling v4l2loopback manually

zemeister23 commented 3 years ago

That error tends to be some problem with v4l2loopback not being installed, or loaded/reloaded, I would either try sudo apt-get install -y v4l2loopback-dkms reboot and see if it works, or try compiling v4l2loopback manually

Thanks men

rodude123 commented 3 years ago

@ShayBox I'll try that out