This is a simple script to livestream a feed onto localhost using simple, easily installable and freely available modules.
The Tech Stack is very simple. It is as below.
Modules | MIN | MAX | USAGE |
---|---|---|---|
Python | 3.5 | 3.9 | base - code |
flask | 2.0.0 | + | web server |
opencv-python | 4.5.1.45 | 4.5.1.48 | capture video |
pyautogui | 0.9.52 | + | capture screen |
-
We use python's builting venv functionality:
python -m venv myenv
-
Activate the Environment:
- On Windows
$ .\myenv\Scripts\activate
- On Linux
$ source venv/bin/activate
- On Windows
-
Then install the dependencies:
(myenv) $ pip install -r requirements.txt
The app can be run by simply running te app.py file using python interpreter:
(myenv) $ python app.py
This server will start on port 5000 by default. You can change this in app.py
by changing the following line to this:
if __name__ == "__main__":
app.run(debug=True, port=<desired port>)