Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no output to virtual device #4

Open
timrichardson opened this issue Jul 31, 2020 · 13 comments
Open

no output to virtual device #4

timrichardson opened this issue Jul 31, 2020 · 13 comments

Comments

@timrichardson
Copy link

I have installed the snap on pop!os and connected the camera as suggested when Fakecam first starts. In Zoom, selecting the virtual camera presents a black image, as if the output from Fakecam is not sent to the output side of the virtualcamera.

@lucyllewy
Copy link
Contributor

Sometimes it requires a second attempt at starting the camera. Turn the fakecam off and then back on again to see if that fixes it when you encounter this. If it still fails, there might be a DENIED message relating to the problem from AppArmor in the system log. You can get a dump of the Denials by running:

sudo journalctl -e --no-pager | grep DENIED

@timrichardson
Copy link
Author

This is what I see

Aug 02 18:03:12 keynes audit[83851]: AVC apparmor="DENIED" operation="open" profile="/snap/snapd/8542/usr/lib/snapd/snap-confine" name="/etc/pop-os/os-release" pid=83851 comm="snap-confine" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Aug 02 18:03:12 keynes kernel: audit: type=1400 audit(1596355392.255:165): apparmor="DENIED" operation="open" profile="/snap/snapd/8542/usr/lib/snapd/snap-confine" name="/etc/pop-os/os-release" pid=83851 comm="snap-confine" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Aug 02 18:03:12 keynes audit[83898]: AVC apparmor="DENIED" operation="open" profile="snap-update-ns.fakecam" name="/etc/pop-os/os-release" pid=83898 comm="5" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Aug 02 18:03:12 keynes kernel: audit: type=1400 audit(1596355392.259:166): apparmor="DENIED" operation="open" profile="snap-update-ns.fakecam" name="/etc/pop-os/os-release" pid=83898 comm="5" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Aug 02 18:03:12 keynes audit[83851]: AVC apparmor="DENIED" operation="open" profile="snap.fakecam.fakecam" name="/etc/pop-os/os-release" pid=83851 comm="snap-exec" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Aug 02 18:03:12 keynes kernel: audit: type=1400 audit(1596355392.263:167): apparmor="DENIED" operation="open" profile="snap.fakecam.fakecam" name="/etc/pop-os/os-release" pid=83851 comm="snap-exec" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Aug 02 18:03:12 keynes audit[83851]: AVC apparmor="DENIED" operation="open" profile="snap.fakecam.fakecam" name="/proc/83851/mounts" pid=83851 comm="python3" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Aug 02 18:03:12 keynes kernel: audit: type=1400 audit(1596355392.647:168): apparmor="DENIED" operation="open" profile="snap.fakecam.fakecam" name="/proc/83851/mounts" pid=83851 comm="python3" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
tim@keynes:/opt$ 

@jpenguin
Copy link

jpenguin commented Aug 13, 2020

Try to open /dev/video20 in VLC or OBS to see if it really is outputting, I couldn't get zoom to recognize this either. I had luck with the script at https://www.virtual-webcam.com/ though, same virtual device too.

mplayer tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video20

@tassoman
Copy link

Hello there, I'm trying to use it inside the browser, but without output. I have a blank box.
If I try to open the device by using VLC, the video colors are screwed like in a solarized mode.
I've successfully tried to detect the fakecam inside Chromium browser by using ffmpeg and an image as input, using this command
ffmpeg -loop 1 -re -i ~/bgr.jpg -f v4l2 -vcodec rawvideo -pix_fmt yuv420p /dev/video20

@tartifola
Copy link

Hi,
just installed it on a fresh Mint 20. I confirm that the app works but it is recognized only by VLC device=/dev/video20 but not in Zoom. Actually, Zoom sees fakecam as alternative to my standard webcam, but then black screen with the usual msg='apparmor="DENIED". Any new thoughts on where to start to debug?

Thanks

@jpenguin
Copy link

jpenguin commented Nov 30, 2020

sudo modprobe v4l2loopback exclusive_caps=1 video_nr=20,21,22 devices=3
fakecam --input=/dev/video6 --background=greenscreen

Zoom sees cam, displays black.
I open webcamoid, it report the vcam is only exporting BGR, I set webcamoids virtual output to /dev/video21
New cam works fine in zoom

~$ v4l2-ctl -d /dev/video20 --list-formats
ioctl: VIDIOC_ENUM_FMT
	Type: Video Capture
	[0]: 'BGR3' (24-bit BGR 8-8-8)
~$ v4l2-ctl -d /dev/video21 --list-formats
ioctl: VIDIOC_ENUM_FMT
	Type: Video Capture
	[0]: 'RGB3' (24-bit RGB 8-8-8)

Seem to be no permission problem for me, Zoom just doesn't like BGR

EDIT: without webcamoid, just ffmpeg; both
ffmpeg -f v4l2 -i /dev/video20 -pix_fmt rgb24 -f v4l2 /dev/video22 and ffmpeg -f v4l2 -i /dev/video20 -pix_fmt yuv420p -f v4l2 /dev/video22 work

@lucyllewy
Copy link
Contributor

Thanks for that, @jpenguin , it's an interesting discovery! I'll see about flipping BGR to RGB.

lucyllewy pushed a commit that referenced this issue Nov 30, 2020
RGB seems more compatible. See #4.
@tartifola
Copy link

Hi,
thanks. With the 2.2.0 now in zoom the fakecam channel shows images but with colors mixed up. Here the info jpenguin provided in my case

   v4l2-ctl -d /dev/video0 --list-formats
          ioctl: VIDIOC_ENUM_FMT
     Type: Video Capture

     [0]: 'YUYV' (YUYV 4:2:2)
     [1]: 'MJPG' (Motion-JPEG, compressed)

  v4l2-ctl -d /dev/video20 --list-formats
         ioctl: VIDIOC_ENUM_FMT
     Type: Video Capture

    [0]: 'BGR3' (24-bit BGR 8-8-8)

  v4l2-ctl -d /dev/video21 --list-formats
         ioctl: VIDIOC_ENUM_FMT
    Type: Video Capture

   [0]: 'RGB3' (24-bit RGB 8-8-8)

Not an expert on this stuff, sorry if my comment is useless.

@jpenguin
Copy link

jpenguin commented Dec 1, 2020

Running the edge snap, after a snap refresh

$ v4l2-ctl -d /dev/video20 --list-formats
ioctl: VIDIOC_ENUM_FMT
	Type: Video Capture
	[0]: 'RGB3' (24-bit RGB 8-8-8)

Works in Zoom & OBS, colors have a purple hue in VLC

@lucyllewy
Copy link
Contributor

colors have a purple hue

I made a mistake in the conversion process. I think this purpleness should be fixed now

@acheronfail
Copy link
Contributor

I'm using 2.2.0 and Zoom still doesn't recognise it for me 🙁

I can view the output with mpv though, so it's working:

mpv av://v4l2:/dev/video20

And it's also outputting RGB:

❯ v4l2-ctl -d 20 --list-formats
ioctl: VIDIOC_ENUM_FMT
	Type: Video Capture

	[0]: 'RGB3' (24-bit RGB 8-8-8)

I wonder why Zoom is having trouble. 🤷‍♂️

@jpenguin
Copy link

I can't be sure, but it appears that zoom has changed

ffmpeg -f v4l2 -i /dev/video20 -pix_fmt yuyv422 -f v4l2 /dev/video21

@Boifuba
Copy link

Boifuba commented Oct 20, 2023

I have no output when i try to open with discord, fakecam show image correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants