Code Monkey home page Code Monkey logo

pyfakewebcam's People

Contributors

jremmons avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pyfakewebcam's Issues

fcntl.ioctl() Invalid argument

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.

Writing performance

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

No module named 'fcntl'

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'

License mismatch

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?

OSError: [Errno 22] Invalid argument fcntl.ioctl

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

Change demo or add epilepsy warning

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.

Close/Terminate Method

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

Get a green screen

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.