Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/robsmall/flask-raspi-video-streamer
Raspberry Pi video streamer based off of miguelgrinberg/flask-video-streaming using Flask-RESTful to work with robsmall/raspi-video-streamer-app or web clients
https://github.com/robsmall/flask-raspi-video-streamer
flask flask-api flask-application flask-backend flask-restful mjpeg mjpeg-stream mjpeg-video-writer raspberry-pi raspberry-pi-3 raspberry-pi-camera raspberrypi
Last synced: 3 months ago
JSON representation
Raspberry Pi video streamer based off of miguelgrinberg/flask-video-streaming using Flask-RESTful to work with robsmall/raspi-video-streamer-app or web clients
- Host: GitHub
- URL: https://github.com/robsmall/flask-raspi-video-streamer
- Owner: robsmall
- License: apache-2.0
- Created: 2017-11-03T02:37:26.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-06-21T21:22:38.000Z (over 2 years ago)
- Last Synced: 2024-09-29T00:41:14.714Z (3 months ago)
- Topics: flask, flask-api, flask-application, flask-backend, flask-restful, mjpeg, mjpeg-stream, mjpeg-video-writer, raspberry-pi, raspberry-pi-3, raspberry-pi-camera, raspberrypi
- Language: Python
- Homepage:
- Size: 43.9 KB
- Stars: 11
- Watchers: 3
- Forks: 4
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
flask-raspi-video-streamer
==========================Flask-RESTful API to create and serve up a live-stream from a raspberry pi to web and android clients.
Original code borrowed/altered from [miguelgrinberg/flask-video-streaming](https://github.com/miguelgrinberg/flask-video-streaming).
Android client is available at [robsmall/raspi-video-streamer-app](https://github.com/robsmall/raspi-video-streamer-app).
Set Up A Virtual Environment To Run The App Using Virtualenv On A Pi
--------------------------------------------------------------------Install virtualenv on the pi as root
```
$ sudo pip install virtualenv
```Then, create a `.env` virtual environment
```
$ virtualenv .env
```
and use it
```
$ source .env/bin/activate
```Then, install all the requirements for the pi
```
$ pip install -U -r requirements-pi.txt
```Set the `CAMERA` environment variable to use the pi camera for android
```
$ export CAMERA=pi_android
```Now you are good to run the app using
```
$ python app.py
```To Run Using Gunicorn
---------------------
Instead of running the app directly using python, run
```
$ gunicorn --threads 5 --workers 1 --bind 0.0.0.0:5000 app:app
```Resources
---------
- [miguelgrinberg/flask-video-streaming](https://github.com/miguelgrinberg/flask-video-streaming)
- Also see linked articles in repo's README
- [PiCamera Python Docs](http://picamera.readthedocs.io/en/latest)
- [Web Streaming Example](http://picamera.readthedocs.io/en/latest/recipes2.html#web-streaming)TODO
----
- This is currently set up for `pi_android`, hook everything else up to work properly too.
- Get this to work with web clients or allow for running of the one-off `simple_mjpeg-server.py` script.
- See TODOs in `video_feed.py`