How to setup a Raspberry Pi Video Streaming Server in 5 Minutes

Raspberry Pi Streaming Video Setup If you do not already have pip installed on your Raspberry Pi, please use this […]

Raspberry Pi Streaming Video Setup

  1. If you do not already have pip installed on your Raspberry Pi, please use this command to install it:
  2. sudo apt-get install python-pip
  3. Install the picamera library by running this command:
  4. pip install picamera
  5. Install the flask Python library by running this command:
  6. sudo pip install flask
  7. Download Miguel’s Flask video streaming project by running this command:
  8. git clone https://github.com/miguelgrinberg/flask-video-streaming.git
  9.  In the project folder edit the app.py file.
  10. Comment out this line by adding a “#” to the beginning
  11. #from camera import CameraUn-comment this line
  12. from camera_pi import Camera
  13. Save the file.
  14. Run this command to find out the local IP address of your Raspberry Pi.
  15. ifconfig
  16. You will see many lines of output. You are looking for this one:
  17. inet addr:192.168.0.107 Bcast:192.168.0.255 Mask:255.255.255.0
  18. The inet addr is your local IP address. In this case, 192.168.0.107.
  19.  Start the Flask server by running this command:
  20. python app.py
  21. You will see this, which means that the server is running on port 5000 and is ready.
  22. * Running on http://0.0.0.0:5000/
  23. * Restarting with reloader
  24. Open up a web browser on your favorite device and go to this address http://192.168.0.107:5000, except replace that IP address with the one that your Raspberry Pi is running on.
  25. You should see a live view the video that your Raspberry Pi is capturing.