Literally a DIY localhost webcamera server
First of all we wanted to stream webcamera feed to localhost. Accepting that motion linux package was not an option we decided to find our own way to achieve our goal.
We've spent 4 hours trying to implement it using cv2 with acceptable FPS (just in case: it was running on 6y old lenovo) to find out that somebody have already done it using v4l2...
After 2 more hours of pain we gave up, tweaked some settings and executed git push --force --no-verify
---> There is also a branch with v4l2 under the hood. Just in case: git checkout v4l2-version
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
export CAMERA_ID=<your_camera_id from /dev/video*>
gunicorn --bind 0.0.0.0:5000 wsgi:app -t 0 --threads=64
python app.py