OctoPrint Stuff
This is a collection of bits and bobs that make running Octoprint a tad easier.
The most notable component is webcamd which is a minimalist drop-in replacement for mjpeg_streamer.
- Octoprint appends a seemingly-random session ID to the camera URI, which confuses the hell out of
mjpg-streamer mjpg-streamerdoesn't appear to be capable of handle multiple simultaneous streams, resulting in the infuriating403: Forbidden! frame already senterrormjpg-streameritself is complete overkill here
webcamd is based on Igor Maculan’s “Simple Python Motion Jpeg” daemon. It has been reworked to run under python-3.x, accept command-line arguments, to fine-tune the webcam streaming experience.
Note!
The user running webcamd must have sufficient access to the webcam device. On most Linux systems, this is as simple as adding the user to the video group. Otherwise the daemon will have to be run as root, which is NOT recommended.
webcam@.service is a systemd unit file for webcam.py.
haproxy.cfg is a configuration file for haproxy that actually works with non-ancient versions of haproxy, and enforces SSL connections to Octoprint.
webcamd Quickstart
Install Locally
$ pip install .
Run the module directly
$ python3 -m webcamd
Help and Usage
$ webcamd --help
Create a SystemD Service
Open the following file and copy these contents:
/etc/systemd/system/webcamd.service
___________________________________
[Unit]
Description=Webcam Daemon. A minimalist webcam streaming service.
After=network.online.target
Wants=network.online.target
[Service]
Type=simple
User=octoprint
Group=octoprint
ExecStart=/usr/bin/webcamd
ExecStop=killall -u webcam webcamd
[Install]
WantedBy=multi-user.target
Then restart the systemd daemon loader:
$ sudo systemctl daemon-reload
And enable the service, to allow the service to start automatically on boot:
$ sudo systemctl enable webcamd.service
Development
Install Locally with dev dependencies
$ pip install -e .[dev]
Metadata
Release files for webcamd 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| webcamd-1.0.1.tar.gz | 16.6 kB | Without provenance | Details for webcamd-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| webcamd-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for webcamd-1.0.1-py3-none-any.whl |
Total release size: 33.8 kB
Release files / webcamd-1.0.1.tar.gz
| Download URL | webcamd-1.0.1.tar.gz |
|---|---|
| Size | 16.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d92ec147ad18f927a350daaac67ce9a7b2ddecba98a156207f5b030db105543e
|
|
BLAKE2b-256 checksum How to use checksums |
267b035dc504e9b86934a2eadc014646f83bcaaebd21d891210de8eddcf8ec8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.9.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|
Release files / webcamd-1.0.1-py3-none-any.whl
| Download URL | webcamd-1.0.1-py3-none-any.whl |
|---|---|
| Size | 17.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
47ccc73fc7ef4ae6edd6bf113679f543dbdc9ba2c84021e89aadfc9d0d7018b4
|
|
BLAKE2b-256 checksum How to use checksums |
fbd39b2bb496d4881e0405a0d718a37995d24941cb8cb5d1eaad4851cc7104c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.9.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|
Security for webcamd 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.