Setup Raspberry Pi as a Video Streaming Server

I have googled a lot, finally I found the guideline of Mike Haldas is the easiest way to stream Raspberry Pi Video. Here I simplified the steps as:

1. Enable RPi camera if it was not.

sudo raspi-config

2. Install Flask

sudo apt-get install -y python-pip
sudo pip install flask

3. Download Miguel’s Flask video streaming project.

git clone

4. Edit file

sudo nano flask-video-streaming/
  • Comment line from camera import Camera;
  • uncomment line from camera_pi import Camera.

5. Start Flask-server by running:

python flask-video-streaming/

6. Find RPi’s IP address and run RPi's IP:5000 in your web browser.

The shortcoming of this video streaming server is: it supports only one client! But, it’s fast.

By default, flask uses the “index.html” in “flask-video-streaming/templates”, we can modify that file to change its appearance. E.g. add


to “<img src= …” tag.

Written on May 13, 2015