Git Product home page Git Product logo

webcamd's Introduction

Hey, I'm Dmitri ๐Ÿ‘‹

๐Ÿš€ I love all things aerospace.


๐Ÿ“ก During the day, I work at Raytheon, making ground-station software.


๐Ÿ›ฐ๏ธ Durring the night I work on @oresat, @psas, and @uniclogs a student-led satellite & rocket team out of Portland OR. (Much of what I do for them is open-source and open-hardware, too!)


๐Ÿ“ญ Want to talk? Tweet at me @dmitrimcguckin or connect with me on LinkedIn

webcamd's People

Contributors

amadensor avatar christopherkobayashi avatar dmitri-mcguckin avatar

Stargazers

 avatar  avatar

Watchers

 avatar

webcamd's Issues

Exceptions in log

I installed webcamd from the master.zip file on Rocky Linux 8.8 system.
My usb cam from lsusb: Bus 001 Device 002: ID 1bcf:28c4 Sunplus Innovation Technology Inc.
"v4l2-ctl --list-devices" shows:
1080P Webcam: 1080P Webcam (usb-0000:00:15.0-2):
/dev/video0
/dev/video1

The stream is working, I have it embedded in an Octoprint setup. I do see these exceptions popping up in /var/log/messages. At first I thought it was anytime I switched over to the browser tab where octoprint has the stream showing, but it seems more random now.

Nov 19 05:41:44 rocky webcamd[301193]: Exception occurred during processing of request from ('10.10.10.1', 52522)
Nov 19 05:41:44 rocky webcamd[301193]: Traceback (most recent call last):
Nov 19 05:41:44 rocky webcamd[301193]: File "/usr/local/lib/python3.9/site-packages/webcamd/main.py", line 30, in do_GET
Nov 19 05:41:44 rocky webcamd[301193]: self.wfile.write(b'--jpgboundary\n')
Nov 19 05:41:44 rocky webcamd[301193]: File "/usr/lib64/python3.9/socketserver.py", line 826, in write
Nov 19 05:41:44 rocky webcamd[301193]: self._sock.sendall(b)
Nov 19 05:41:44 rocky webcamd[301193]: BrokenPipeError: [Errno 32] Broken pipe
Nov 19 05:41:44 rocky webcamd[301193]: During handling of the above exception, another exception occurred:
Nov 19 05:41:44 rocky webcamd[301193]: Traceback (most recent call last):
Nov 19 05:41:44 rocky webcamd[301193]: File "/usr/lib64/python3.9/socketserver.py", line 683, in process_request_thread
Nov 19 05:41:44 rocky webcamd[301193]: self.finish_request(request, client_address)
Nov 19 05:41:44 rocky webcamd[301193]: File "/usr/lib64/python3.9/socketserver.py", line 360, in finish_request
Nov 19 05:41:44 rocky webcamd[301193]: self.RequestHandlerClass(request, client_address, self)
Nov 19 05:41:44 rocky webcamd[301193]: File "/usr/lib64/python3.9/socketserver.py", line 747, in init
Nov 19 05:41:44 rocky webcamd[301193]: self.handle()
Nov 19 05:41:44 rocky webcamd[301193]: File "/usr/lib64/python3.9/http/server.py", line 433, in handle
Nov 19 05:41:44 rocky webcamd[301193]: self.handle_one_request()
Nov 19 05:41:44 rocky webcamd[301193]: File "/usr/lib64/python3.9/http/server.py", line 421, in handle_one_request
Nov 19 05:41:44 rocky webcamd[301193]: method()
Nov 19 05:41:44 rocky webcamd[301193]: File "/usr/local/lib/python3.9/site-packages/webcamd/main.py", line 36, in do_GET
Nov 19 05:41:44 rocky webcamd[301193]: except KeyboardInterrupt | BrokenPipeError:
Nov 19 05:41:44 rocky webcamd[301193]: TypeError: unsupported operand type(s) for |: 'type' and 'type'
Nov 19 05:41:44 rocky webcamd[301193]: ----------------------------------------

libIlmImf-2_5.so.25: cannot open shared object file

I'm not sure what to do here to fix this issue.

$ python3.9 -m venv webcamd
$ cd webcamd/
$ source bin/activate
$ pip3.9 install webcamd
...
Successfully installed PIL-Tools-1.1.0 Pillow-9.4.0 certifi-2022.12.7 charset-normalizer-3.1.0 idna-3.4 numpy-1.24.2 opencv-python-4.5.3.56 requests-2.28.2 urllib3-1.26.15 webcamd-1.0.1

$ webcamd --help
Traceback (most recent call last):
  File "/home/pi/webcamd/bin/webcamd", line 5, in <module>
    from webcamd.__main__ import main
  File "/home/pi/webcamd/lib/python3.9/site-packages/webcamd/__main__.py", line 1, in <module>
    import cv2
  File "/home/pi/webcamd/lib/python3.9/site-packages/cv2/__init__.py", line 5, in <module>
    from .cv2 import *
ImportError: libIlmImf-2_5.so.25: cannot open shared object file: No such file or directory


$ lsb_release -a
No LSB modules are available.
Distributor ID:	Raspbian
Description:	Raspbian GNU/Linux 10 (buster)
Release:	10
Codename:	buster

$ uname -a
Linux raspicam 5.10.103-v7+ #1529 SMP Tue Mar 8 12:21:37 GMT 2022 armv7l GNU/Linux

Upstream Attribution

Hello Dmitri,

First off, thanks for adding the bits that allow webcam.py to be installed via pip. That is a very useful feature.

However ... I couldn't help but notice that you (undoubtably accidentally) removed the code attribution from the top of the original webcam.py for both myself and Igor.

A quick diff between your main.py and my webcam.py indicates that the differences are primarily cosmetic whitespace changes.

Would you mind restoring the authorship credit to the relevant files? As this code is licensed under GPL-3.0, retaining attribution (no matter how little original code is retained) is generally considered to be good manners.

Thank you very much in advance, and cheers,

-- Chris

Color shifts

Just reinstalled my octoprint setup. This is an Odroid H2 running Alma Linux 9.3. Some colors through the webcam are way off. First picture shows orange parts on my Sovol SV04. Second pic shows them in their normal blue. The pegboard on the wall of my enclosure shows the same thing. Other colors are off as well, green cat 5 cable looks yellow.

Bus 001 Device 010: ID 1bcf:28c4 Sunplus Innovation Technology Inc. 1080P Webcam
IMG_5304
IMG_5305

Checked with a different webcam and see the same problem.

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.