ShayBox / Mon2Cam

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

Exec Result: { status: { code: 1, success: false }, output: "" } #38

Closed DSVDiniz closed 3 years ago

DSVDiniz commented 3 years ago

I'm trying to run it using fedora 31 (5.7.15-100.fc31.x86_64), mon2cam closes after choosing a monitor.

mon2cam -v

Exec Context: 28f432e9-b0c4-4d20-9e0f-9686c58cf387
    Exec Options:  { verbose: true, output: 3 }
    Exec Command: sudo modprobe -r v4l2loopback
    Exec Command Splits:  [sudo,modprobe,-r,v4l2loopback]
    Exec Result:  { status: { code: 1, success: false }, output: "" }
Exec Context: 28f432e9-b0c4-4d20-9e0f-9686c58cf387

Exec Context: e24602b6-23a0-431f-835d-585a26102665
    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:  { status: { code: 1, success: false }, output: "" }
Exec Context: e24602b6-23a0-431f-835d-585a26102665

0: 1920x1080 HDMI-1
1: 1366x768 eDP-1
Which monitor?
0
INFO CTRL + C to stop
INFO The screen will look mirrored for you, not others

Exec Context: 11bd51e1-20b1-434d-bf0c-1d407fedc38e
    Exec Options:  { verbose: true, output: 3 }
    Exec Command: ffmpeg -f x11grab -r 60 -s 1920x1080 -i :0.0+0,0 -pix_fmt yuv420p -f v4l2 /dev/video50
    Exec Command Splits:  [ffmpeg,-f,x11grab,-r,60,-s,1920x1080,-i,:0.0+0,0,-pix_fmt,yuv420p,-f,v4l2,/dev/video50]
    Exec Result:  { status: { code: 1, success: false }, output: "" }
Exec Context: 11bd51e1-20b1-434d-bf0c-1d407fedc38e
DSVDiniz commented 3 years ago

I tried running ffmpeg -f x11grab -r 60 -s 1920x1080 -i :0.0+0,0 -pix_fmt yuv420p -f v4l2 /dev/video50 With these results:

ffmpeg version 4.2.4 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9 (GCC)
  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' --extra-ldflags='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' --extra-cflags=' ' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-fontconfig --enable-frei0r --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libaom --enable-libdav1d --enable-libass --enable-libbluray --enable-libcdio --enable-libdrm --enable-libjack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librsvg --enable-libsrt --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-version3 --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg --enable-libzvbi --enable-avfilter --enable-avresample --enable-libmodplug --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-libmfx --enable-runtime-cpudetect
  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 @ 0x563fa4c2be80] Stream #0: not enough frames to estimate rate; consider increasing probesize
Input #0, x11grab, from ':0.0+0,0':
  Duration: N/A, start: 1598382000.931736, 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 @ 0x563fa4c360c0] 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 -- 

I've installed libv4l and v4l-utils, can't find any Fedora repo for v4l2

botiapa commented 3 years ago

Hey,

Try running sudo modprobe -r v4l2loopback I think v4l2 is not properly installed on your system.

ShayBox commented 3 years ago

Yeah, v4l2loopbackis separate from those, it's a kernel module, you'll probably have to manually compile it if it's not available in the repos

botiapa commented 3 years ago

If you do make it work, could you post the results, so we can show the install process in the readme?

DSVDiniz commented 3 years ago

Sorry, gave up on it and changed my distro to debian, fedora had been an uphill battle since I'd installed it.

botiapa commented 3 years ago

Haha :smile:,

Well if you do try out Mon2Cam on debian, and you have problems, don't hesitate to reopen the issue.