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

Unavailable in Zoom login screen, altough works in the real meeting #85

Open
raffaem opened this issue Feb 17, 2022 · 5 comments
Open

Comments

@raffaem
Copy link

raffaem commented Feb 17, 2022

It works perfectly if I see the webcam with

mplayer tv://device=/dev/video0

But it doesn't work with Zoom web interface, it says "Video unavailable at this time"

image

I have Firefox 97 on Fedora Workstation 35.

I use this to start the script:

$ python3 virtual_webcam.py 
2022-02-17 08:57:04.326164: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory
2022-02-17 08:57:04.326184: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Reloading config.
2022-02-17 08:57:05.550383: E tensorflow/stream_executor/cuda/cuda_driver.cc:271] failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected
2022-02-17 08:57:05.550418: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:169] retrieving CUDA diagnostic information for host: fedora
2022-02-17 08:57:05.550426: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:176] hostname: fedora
2022-02-17 08:57:05.550472: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:200] libcuda reported version is: 510.47.3
2022-02-17 08:57:05.550494: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:204] kernel reported version is: 510.47.3
2022-02-17 08:57:05.550500: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:310] kernel version seems to match DSO: 510.47.3
Model: mobilenet (multiplier=0.5, stride=16)
Loading model...
2022-02-17 08:57:05.690041: I tensorflow/core/platform/cpu_feature_guard.cc:151] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2022-02-17 08:57:05.710284: W tensorflow/core/common_runtime/graph_constructor.cc:1511] Importing a graph with a lower producer version 38 into an existing graph with producer version 987. Shape inference will have run different parts of the graph with different producer versions.
2022-02-17 08:57:05.737381: I tensorflow/core/grappler/devices.cc:66] Number of eligible GPUs (core count >= 8, compute capability >= 0.0): 0
2022-02-17 08:57:05.737598: I tensorflow/core/grappler/clusters/single_machine.cc:358] Starting new session
2022-02-17 08:57:05.770818: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:1164] Optimization results for grappler item: graph_to_optimize
  debug_stripper: debug_stripper did nothing. time = 0.025ms.
  remapper: Graph size after: 244 nodes (0), 171 edges (0), time = 0.602ms.
  constant_folding: Graph size after: 172 nodes (-72), 171 edges (0), time = 3.895ms.
  arithmetic_optimizer: Graph size after: 172 nodes (0), 171 edges (0), time = 1.635ms.
  dependency_optimizer: Graph size after: 172 nodes (0), 171 edges (0), time = 0.744ms.
  debug_stripper: debug_stripper did nothing. time = 0.013ms.
  remapper: Graph size after: 172 nodes (0), 171 edges (0), time = 0.388ms.
  constant_folding: Graph size after: 172 nodes (0), 171 edges (0), time = 2.121ms.
  arithmetic_optimizer: Graph size after: 172 nodes (0), 171 edges (0), time = 1.728ms.
  dependency_optimizer: Graph size after: 172 nodes (0), 171 edges (0), time = 0.787ms.

done.
/run/media/raffaele/55ab61c4-83cf-4d9f-a5cd-7fcfdc14b4fb/data/progetti_altrui/virtual_webcam_background/virtual_webcam.py:187: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  frame = frame.astype(np.float)

Here is my config.yaml file:

$ cat config.yaml
segmentation_threshold: 0.25
blur: 0
erode: 0
dilate: 0
virtual_video_device: "/dev/video0"
real_video_device: "/dev/video1"
average_masks: 3
mjpeg: False
layers:
  - "empty": [["image", "/home/raffaele/Pictures/webcam_background.png"]]
  - "foreground": []
@allo-
Copy link
Owner

allo- commented Feb 17, 2022

Do you have the problem only on the login screen? I can confirm that the login screen looks like this, but after login it works just fine.

@raffaem
Copy link
Author

raffaem commented Feb 17, 2022

Ah I don't know, the meeting has not started yet

@allo-
Copy link
Owner

allo- commented Feb 17, 2022

At least for me it is like that. I do not know why. I think the preview finds the wrong camera and tries the (blocked) real device, but I have no idea why it works different from the real meeting. But as long as it works in the meeting I think it's no big deal.

Any advice how to fix it for the preview is welcome, of course.

@raffaem
Copy link
Author

raffaem commented Feb 18, 2022

Yeah it works in the real meeting

@raffaem raffaem changed the title Cannot use it with Zoom Unavailable in Zoom login screen, altough works in the real meeting Feb 18, 2022
@allo-
Copy link
Owner

allo- commented Feb 24, 2022

Would you like to help testing?

You could try if the same happens with other streams and v4l2loopback: https://atinkerholic.wordpress.com/2018/10/10/how-to-use-a-virtual-webcam-with-static-image-or-video-ffmpeg-v4l-utils-and-v4l2loopback/

You could also test with akvcam instead of v4l2loopback. One of the main differences is, that akvcam generates frames when there is no input, while the loopback device is more a FIFO buffer for frames, which keeps the browser waiting for frames when the virtual webcam is not sending frames fast enough.

I think chromium had some threshold like 5 FPS under which it doesn't recognize a cam anymore, but I suppose that that's not your problem. At least I see a similar issue and on my PC the frame rate is high enough.

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

2 participants