Open astromiwe opened 3 years ago
Hi,
With the current stable release you can open fakecam using a terminal to specify the video device:
fakecam --input=/dev/video0
This will not show the user-interface, however, so you can't change the settings on-the-fly like you can with the GUI. There are other options that you can specify on the command line:
USAGE:
fakecam [--input=<camera-device>] [--resolution=<width>x<height>] [--background=<background-file>] [--hologram]
PARAMETERS:
--help: display this help document.
--input: specify the camera device to use. The default is /dev/video0.
--resolution: override your camera's default resolution. Must be width and
height as numbers separated by an 'x', e.g. '640x480'. May not
work reliably.
--background: replace your camera background with an image. The default is
to blur your existing background that your camera sees. Use the
special value of 'greenscreen' to replace the background with a
solid green colour so that you can cut yourself out of the image
with chroma-key software such as is built-into OBS.
--hologram: overlay a Star Wars style hologram effect onto your likeness.
--mirror: flip the image.
Alternatively you could try switching to the beta
build where I've been working on adding this feature along with other improvements:
snap refresh --beta fakecam
Hi, Thanks for your help. The terminal input works fine. The beta-GUI doesn't work for me. The following error with both cams:
Starting capture using device: /dev/video0
Resolution: 640:480
Process Process-1:
Traceback (most recent call last):
File "/snap/fakecam/111/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/snap/fakecam/111/usr/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/snap/fakecam/111/lib/python3.6/site-packages/fakecam/capture.py", line 153, in start
frame = get_frame(cap, scaler, ones, dilation, background=background_scaled, use_hologram=use_hologram, height=height, width=width)
File "/snap/fakecam/111/lib/python3.6/site-packages/fakecam/capture.py", line 81, in get_frame
mask = get_mask(frame, scaler, dilation, height=height, width=width)
File "/snap/fakecam/111/lib/python3.6/site-packages/fakecam/capture.py", line 33, in get_mask
results = cvNet.forward()[0][0]
cv2.error: OpenCV(4.5.1) /root/parts/opencv/src/modules/dnn/src/cuda4dnn/csl/memory.hpp:54: error: (-217:Gpu API call) CUDA driver version is insufficient for CUDA runtime version in function 'ManagedPtr'
Hi,
I've dropped the cuda support for now. Could you try the beta channel again to see if it suits your usage better?
Hi,
I've dropped the cuda support for now. Could you try the beta channel again to see if it suits your usage better?
Can we keep CUDA? I'm playing with the current snap stable version. While not perfect, at 640x480, CUDA is being used (when not using blurred background).
Lenovo Thinkpad P1
Nvidia Quadro P2000
/dev/video4
for Logitech 920
Pop_OS (Ubuntu) 20.10 w/default Nvidia drivers
hello, I use Ubuntu 20.04.2 LTS with a onboarding and a external webcam. Fakecam works only with the onboarding webcam. With other programs I can use the external webcam. How can I use fakecam with the external webcam ?