Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
.. image:: https://img.shields.io/pypi/v/pupil-labs-uvc.svg
:target: PyPI link
_
.. image:: https://img.shields.io/pypi/pyversions/pupil-labs-uvc.svg
:target: PyPI link
_
.. _PyPI link: https://pypi.org/project/pupil-labs-uvc
.. image:: https://github.com/pupil-labs/pyuvc/actions/workflows/main.yml/badge.svg :target: https://github.com/pupil-labs/pyuvc/actions?query=workflow%3A%22tests%22 :alt: tests
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://github.com/psf/black :alt: Code style: Black
.. .. image:: https://readthedocs.org/projects/skeleton/badge/?version=latest .. :target: https://skeleton.readthedocs.io/en/latest/?badge=latest
.. image:: https://img.shields.io/badge/skeleton-2022-informational :target: https://blog.jaraco.com/skeleton
pyuvc
Python bindings for the Pupil Labs fork of libuvc <https://github.com/pupil-labs/libuvc>
__
with super fast jpeg decompression using libjpegturbo <http://libjpeg-turbo.virtualgl.org/>
__
(utilizing the tubojpeg api).
Image data is returned as Frame
object. This object will decompress and convert on the
fly when image data is requested. This gives the user the full flexiblity: Grab just the
jpeg buffers or have them converted to YUV or Gray or RGB and only when you need.
The Frame
class has caching build in to avoid double decompression or conversion.
Install via PyPI ################
.. code-block::
pip install pupil-labs-uvc
Example #######
See examples/
for code examples.
Install from source ###################
pyuvc requires the following dependencies:
libusb <https://github.com/libusb/libusb/>
__libturbo-jpeg <https://libjpeg-turbo.org/>
__POSIX Threads for Windows <https://sourceforge.net/projects/pthreads4w/>
__ (Windows
only, supplied via the pupil-pthreads-win <https://pypi.org/project/pupil-pthreads-win/>
__
Python module)Once the dependencies are installed, you can pip install the source tree::
git clone https://github.com/pupil-labs/pyuvc --recursive export FORCE_LOCAL_LIBUVC_BUILD=ON pip install ./pyuvc
Linux
Ubuntu/Debian::
apt-get update -y apt-get install -y libusb-1.0-0-dev libturbojpeg-dev
One needs to setup udev rules and add the target user to the plugdev
group to avoid
the privileged access requirement.
.. code-block:: bash
echo 'SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="plugdev", MODE="0664"' | sudo tee /etc/udev/rules.d/10-libuvc.rules > /dev/null sudo udevadm trigger sudo usermod -a -G plugdev $USER
macOS
Homebrew::
brew update brew install libusb jpeg-turbo
Unfortunately, this is currently not possible. See
this libusb issue thread <https://github.com/libusb/libusb/issues/1014>
__ for details.
WINDOWS
Run the following code in a powershell to install the dependencies (requires
7z <https://www.7-zip.org/>
__ to be installed)
.. code-block:: powershell
pip install build delvewheel git clone https://github.com/pupil-labs/pyuvc --recursive cd pyuvc scripts/download-deps-win.ps1 -DEPS_TMP_PATH tmp $Env:DEPS_PATHS_LOC = "tmp/dep_paths.json" python -m build -w # will create a wheel in dist/ folder; insert the wheel path below python scripts/repair-wheels-win.py $Env:DEPS_PATHS_LOC wheelhouse pip install wheelhouse/
pyuvc requires the libUSBk driver to be installed for your corresponding camera.
Otherwise, metadata like the product name will be set to "unknown"
.
Please see these instructions <https://github.com/pupil-labs/pyuvc/blob/master/WINDOWS_USER.md>
__
on how to manually install libUSBk drivers for your specific camera.
FAQs
Usb Video Class Device bindings with format conversion tool
We found that pupil-labs-uvc demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.