{"id":47846700,"url":"https://github.com/bensondaled/pseyepy","last_synced_at":"2026-04-03T21:22:46.526Z","repository":{"id":49205419,"uuid":"104400026","full_name":"bensondaled/pseyepy","owner":"bensondaled","description":"PSEye-py: a python interface to the PS3Eye camera","archived":false,"fork":false,"pushed_at":"2025-11-23T21:23:09.000Z","size":1428,"stargazers_count":92,"open_issues_count":21,"forks_count":35,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-11-23T23:24:35.050Z","etag":null,"topics":["api","camera","driver","movies","playstation","python","python-3","python3","video"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bensondaled.png","metadata":{"files":{"readme":"README.md","changelog":"Changes_windows-install.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-09-21T21:18:57.000Z","updated_at":"2025-11-23T21:23:14.000Z","dependencies_parsed_at":"2022-09-01T18:20:55.720Z","dependency_job_id":null,"html_url":"https://github.com/bensondaled/pseyepy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bensondaled/pseyepy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bensondaled%2Fpseyepy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bensondaled%2Fpseyepy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bensondaled%2Fpseyepy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bensondaled%2Fpseyepy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bensondaled","download_url":"https://codeload.github.com/bensondaled/pseyepy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bensondaled%2Fpseyepy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31377627,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T17:53:18.093Z","status":"ssl_error","status_checked_at":"2026-04-03T17:53:17.617Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","camera","driver","movies","playstation","python","python-3","python3","video"],"created_at":"2026-04-03T21:22:46.093Z","updated_at":"2026-04-03T21:22:46.519Z","avatar_url":"https://github.com/bensondaled.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"### *pseyepy:* a python API for acquisition, display, and saving of video from the PS3Eye camera\n\n----------------------\n\n\u003e **📦 Windows-Ready Fork**  \n\u003e This is a fork of [bensondaled/pseyepy](https://github.com/bensondaled/pseyepy) with **full Windows support**. The original project had broken Windows builds due to Python 2 compatibility issues and missing MSVC-built dependencies. This fork provides:\n\u003e - ✅ **Python 3.13+ support** with fixed Cython code\n\u003e - ✅ **Windows 10/11 native builds** using Visual Studio 2022 (MSVC)\n\u003e - ✅ **Pre-built libusb binaries** included for seamless Windows installation\n\u003e - ✅ **Modern packaging** with `pyproject.toml` for PEP 517/518 compliance\n\u003e - ✅ **Works out-of-the-box**: `pip install .` just works on Windows\n\u003e\n\u003e See [Changes_windows-install.md](Changes_windows-install.md) for detailed technical changes.\n\n----------------------\n### About this package\n\n*pseyepy* is a lightweight, cross-platform, and open-source Python interface to the Playstation PS3Eye USB camera. Its core is a wrapper of a C API that derives from the excellent [PS3EYEDriver project](https://github.com/inspirit/PS3EYEDriver). \n\n\nAt this point, the dependencies for the project are:\n  * python 3x\n  * numpy, cython\n  * [libusb](http://libusb.info/)\n  * [ffmpeg](https://www.ffmpeg.org/)\n\nThe important features are:\n  * stream simultaneously from as many cameras as you have available usb ports\n  * frame rates: up to 150 Hz\n  * resolutions: 640x480 or 320x240 pixels \n  * control of camera settings include gain, exposure, white balance, orientation, etc.\n  * high-resolution software timestamps  \n  * simple gui for real-time video display \n  * save movies to disk\n  \n**Contributions** are greatly appreciated!\n\n----------------\n### Installation\n\n#### Windows (This Fork)\n\n**Prerequisites:**\n- Python 3.8 or later\n- Visual Studio 2022 Build Tools or Visual Studio 2022 (for compilation)\n- Git (to clone the repository)\n\n**Quick Install:**\n```bash\n# Clone this fork\ngit clone https://github.com/anmagx/pseyepy.git\ncd pseyepy\n\n# Create a virtual environment (recommended)\npython -m venv .venv\n.venv\\Scripts\\activate\n\n# Install\npip install .\n```\n\n**What's Included:**\n- Pre-built MSVC-compatible `libusb-1.0.dll` (no manual libusb setup needed!)\n- All Python 3 compatibility fixes\n- Proper MSVC compiler flags and build configuration\n\n**Testing:**\n```python\nimport pseyepy\nfrom pseyepy import cam_count\nprint(f\"Cameras detected: {cam_count()}\")\n```\n\n#### Linux / macOS (Original Instructions)\n\nInstallation has not yet been thoroughly tested on all platforms. Eventually I will get around to enabling a pip install. For now:\n\n0. (If you are on Windows: download \u0026 install libusb; Mac and Linux are handled without this step)\n1. Download the source code, unzip, and navigate to the root directory\n2. `sudo python setup.py install`\n\nIf that does not work, it's likely a libusb issue. Try adjusting paths such that libusb paths are included by default.\n\n3. (If you want to use ffmpeg for saving, download and install ffmpeg)\n\n------------\n### Examples\n\nBasic usage:\n```python\nfrom pseyepy import Camera\n\n# initialize all connected cameras\nc = Camera()\n\n# read from the camera/s\nframe, timestamp = c.read()\n\n# when finished, close the camera\nc.end()\n```\n\nYou may specify specific camera/s:\n```python\nc = Camera(0) # camera at index 0\n```\n\n```python\nc = Camera([0,1]) # cameras at indices 0 and 1\n```\n\nSet initialization parameters for your camera/s:\n```python\nc = Camera([0,1], fps=60, resolution=Camera.RES_LARGE, colour=False)\n```\n*Note that frame rate, resolution, and colour are the 3 parameters that cannot be changed after initializing.*\n\nSet initialization parameters for each camera independently:\n```python\nc = Camera([0,1], fps=[30, 60], resolution=[Camera.RES_LARGE, Camera.RES_SMALL], colour=[True, False])\n```\n\nSet mutable image acquisition parameters upon initialization:\n```python\nc = Camera(fps=30, colour=[False,True], gain=50, vflip=[True, False])\n```\n*The mutable parameters include gain, exposure, whitebalance, vflip, hflip. See docstring for full details.*\n\nSet parameters after initialization:\n```python\nc.exposure = 23\n```\n\nFor each camera independently:\n```python\nc.exposure[0] = 23\nc.exposure[1] = 45\n```\n\nRead from all cameras:\n```python\nframes, timestamps = c.read()\n```\n\nRead from a specific camera:\n```python\nframe1, timestamp1 = c.read(1) # read from camera at index 1\n```\n\nLive display of camera feed with parameter controls:\n```python\nfrom pseyepy import Camera, Display\n\nc = Camera() # initialize a camera\nd = Display(c) # begin the display\n```\n\nStream camera data to a file using ffmpeg:\n```python\nfrom pseyepy import Camera, Stream\n\nc = Camera() # initialize a camera\ns = Stream(c, file_name='example_movie.avi', codec='png') # begin saving data to files\n\n# when finished, close the stream\ns.end()\n```\n\nStream to file while also displaying (beta):\n```python\ns = Stream(c, file_name='example_movie.avi', display=True)\n\n# when finished, close the stream\ns.end()\n```\n\n---------------------------------------\n### Troubleshooting and known pitfalls\n\n  * The PSEye camera has two LED indicators: a blue light indicating power, and a red light indicating communication with the computer. If these lights are not on, then their respective functions are not active (although note that you can intentionally destroy these LEDs if you please, and the camera will work fine).\n  * If the cameras or API act strangely, try disconnecting and reconnecting the cameras, restarting the Python shell, and running the program again.\n  * In general it is recommended to restart the python process before each camera use; it's not technically necessary but it helps avoid some issues.\n  * The on-board camera settings can be wonky; changing them in a particular order can have specific effects, that sometimes prove irreversible until you restart the program.\n  * The Stream writer currently can drop ~0.01% of frames (likely from the very end of the recording only, details still unclear)\n  * On Ubuntu 18.04 in order to get pseyepy to work in some instances it was necessary to install libusb. This could be done through ```sudo apt-get install libusb-1.0-0-dev``` or, if in a conda environment, with ```conda install -c conda-forge libusb```\n  * **Windows-specific**: If you get `ImportError: DLL load failed`, ensure you're using Python 3.8+ and Visual Studio 2022 Build Tools are installed\n\n---------------------------------------\n### Third-Party Components\n\nThis package includes:\n- **libusb-1.0** (LGPL v2.1): Pre-built Windows DLL for USB device access\n  - License: GNU Lesser General Public License v2.1\n  - Source: https://github.com/libusb/libusb\n  - Full license text: See `pseyepy/_libs/COPYING`\n  - The LGPL allows this library to be used with Apache-licensed code via dynamic linking\n\nFor full third-party notices, see [THIRD_PARTY_NOTICES.txt](pseyepy/THIRD_PARTY_NOTICES.txt)\n\n---------\n### Todo\n\n  * more documentation\n  * build a multithreaded cython option for camera streaming to free the main process\n  * importantly: without a threading implementation, Stream to file with cameras of different framerates will result in lowest for all\n\n---------\n### Contributing\n\nContributions are greatly appreciated! This fork focuses on Windows compatibility and modern Python support. If you encounter issues or have improvements, please open an issue or pull request.\n\n**Upstream**: This is a fork of [bensondaled/pseyepy](https://github.com/bensondaled/pseyepy). Consider contributing improvements back to the original project where applicable.\n\n### License\n\nThis project is licensed under the **Apache License 2.0** - see [LICENSE](LICENSE) for details.\n\n**Third-party dependencies**:\n- libusb-1.0 is licensed under **LGPL v2.1** and is dynamically linked (see `pseyepy/_libs/COPYING`)\n- PS3EYEDriver components maintain their original licenses\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbensondaled%2Fpseyepy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbensondaled%2Fpseyepy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbensondaled%2Fpseyepy/lists"}