No description
| page | ||
| .gitignore | ||
| config.yaml | ||
| readme.md | ||
| requirements.txt | ||
| server.py | ||
jase/gmodcam
Python script to stream a camera to a webpage to be used in Garrys Mod
Requirements
I've only tested this on Windows 10 with Python 3.13
Setup
-
Install requirements
Use
pip install -r requirements.txtto install required packages -
Configure
Using
cv2-enumerate-cameras(runpip install cv2-enumerate-camerasand thenpy -m cv2_enumerate_cameras), take the index of the camera you want to use and set it in theconfig.yamlfile.Set the resolution you want to use (make sure it is supported by your camera)
Set the file type and mimetype you want to use during streaming (jpeg works best)
-
Running
With a terminal window open in the folder with
server.py, runpy .\server.pyYou should then be able to open
http://127.0.0.1:8080and view the live camera feed
Credits
I used code from these