https://github.com/commanderredyt/python-prusa-connect-webcam
A simple webcam script for prusa connect
https://github.com/commanderredyt/python-prusa-connect-webcam
Last synced: 4 months ago
JSON representation
A simple webcam script for prusa connect
- Host: GitHub
- URL: https://github.com/commanderredyt/python-prusa-connect-webcam
- Owner: CommanderRedYT
- License: gpl-3.0
- Created: 2023-07-22T16:25:21.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-27T21:50:19.000Z (almost 2 years ago)
- Last Synced: 2025-01-19T11:25:21.031Z (6 months ago)
- Language: Python
- Size: 23.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# python-prusa-webcam
## Description
This python script allows you to turn any Webcam plugged into your device to turn into a Webcam for Prusa Connect!## Prerequisites
- opencv-python (pip install opencv-python)
- requests (pip install requests)Currently, there are hardcoded paths for `video4linux`. If you want to add support for other OSes, please create a pull request.
## Usage
1. Clone this repository
2. Run `python3 main.py`
3. Enter the index from the camera list
4. Scan the prusa QR Code with the camera
5. Enjoy!**or**
1. Clone this repository
2. Run `python3 main.py --save`
3. Enter the index from the camera list
4. Scan the prusa QR Code with the camera
5. The program will save the entered index and the api token in plaintext in `./webcam.json` (This can be changed by passing `--save ` to the script)
6. Enjoy!If scanning is no option, you can just manually create a `webcam.json` file with the following contents:
```json
{
"api_key": "",
"camera_path": "/dev/video"
}
```