jremmons / pyfakewebcam Goto Github PK
View Code? Open in Web Editor NEWA library for writing RGB frames to a fake webcam device on Linux!
License: GNU Lesser General Public License v3.0
A library for writing RGB frames to a fake webcam device on Linux!
License: GNU Lesser General Public License v3.0
Great project!
Any plans to add windows support? (it seems there is a started project here: https://github.com/TimSC/libvideolive)
After running the example, I get this error:
Traceback (most recent call last):
File "test.py", line 12, in <module>
camera = pyfakewebcam.FakeWebcam('/dev/video1', 640, 480)
File "/usr/local/lib/python3.7/dist-packages/pyfakewebcam/pyfakewebcam.py", line 55, in __init__
fcntl.ioctl(self._video_device, _v4l2.VIDIOC_S_FMT, self._settings)
OSError: [Errno 22] Invalid argument
So I printed out the self._video_device, _v4l2.VIDIOC_S_FMT, self._settings
:
9 -1060088315 <pyfakewebcam.v4l2.v4l2_format object at 0x7f234b6701e0>
I don't know where goes wrong there. Can you have a look? Please.
I have seen the code and it seems that the schedule_frame()
method is a perpetual disk writting of images in the virtual node path, am I right?
I was wondering if there is any solution that let a python process to "send" processed (for example a deep learning detection algorithm) to a virtual device path which can be retrived by another python process on demand (for example an api, with reads the stream when a certain method is call) without having to write the frames in memory
I have tried both pip version, and the python file in Github. I get
E:\Scripts\Python\opencv\Pycam>python red_blue.py Traceback (most recent call last): File "red_blue.py", line 2, in <module> import pyfakewebcam File "E:\Miniconda\lib\site-packages\pyfakewebcam\__init__.py", line 2, in <module> from pyfakewebcam.pyfakewebcam import FakeWebcam File "E:\Miniconda\lib\site-packages\pyfakewebcam\pyfakewebcam.py", line 3, in <module> import fcntl ModuleNotFoundError: No module named 'fcntl'
Hi there!
While packaging pyfakewebcam for NixOS, I noticed that there is an inconsistency in the license. LICENSE.txt is LGPLv3 while setup.py lists GPLv3. Would you please be able to clarify which one applies?
Dear @jremmons - Firstly thanks for this project, this is exactly what I was looking for!
I tried running the project (both pip installed and via local pulls (both tagged release and master branch) but keep getting and "OSError: [Errno 22] Invalid argument" on the fcntl.ioctl call.
I tried using both webcams w/o success. I also did a
ls /dev | grep video
and tried the different devices w/o success.
Suspecting an issue with the settings object _v4l2.v4l2_format() I also tried to strip that down w/o success. I'm running on Ubuntu 18 with all the required dependency installs. Any suggestions on possible ways to debug this?
Traceback (most recent call last):
camera = pyfakewebcam.FakeWebcam('/dev/video20', 640, 480)
File "/home/sahmed/WORKSPACE/scantrac/ctnr-fakecam/pyfakewebcam/pyfakewebcam.py", line 54, in __init__
fcntl.ioctl(self._video_device, _v4l2.VIDIOC_S_FMT, self._settings)
OSError: [Errno 22] Invalid argument
In its current state the demo is super dangerous for someone with epilepsy -- it does a very good job of showing off the software but I worry that it might cause trouble for someone down the line.
File "build/bdist.linux-x86_64/egg/pyfakewebcam/init.py", line 3, in
File "build/bdist.linux-x86_64/egg/pyfakewebcam/pyfakewebcam.py", line 8, in
ImportError: No module named v4l2
I tried using your pyfakewebCam. Here is my sample code.
https://gist.github.com/daljeet-hcl/9eee797715ac504e1694846d65eb3f78
your software adds a bluish tint to the images produced, can you help to fix it and restore original colors. I am a newbie to python and C.
Regards
Daljeet Singh
Would be nice to have a close/release/Terminate method.
If you first create a fakewebcam with a specific resolution and you want to restart it with another resolution, this won't work as the device is still opened and buffer allocated. Didn't find a chance todo so from outside. As my Python knowledge is in early stage i wont be able to create a pull
I am able to manipulate my webcam image and display it to screen. However, if I pass it into a pyfakewebcam camera, the feed I get when I ffplay /dev/video2 is the SIZE I set, but not the image. It's just green. Any ideas?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.