Video streaming with a Raspberry Pi and a Pi Camera module to stream live footage from a webpage that you can access in any device that has a browser and is connected to the same network.
Model | Compatible | Tested |
---|---|---|
Raspberry Pi Pico | ❌ | ✅ |
Raspberry Pi Zero WH | ✅ | ✅ |
Raspberry Pi Zero W | ✅ | ✅ |
Raspberry Pi Zero 2W | ✅ | ❌ |
Raspberry Pi Zero | ✅ | ✅ |
Raspberry Pi 2 | ✅ | ❌ |
Raspberry Pi 3 / 3B+ | ✅ | ❌ |
Raspberry Pi 4 | ✅ | ✅ |
Raspberry Pi 400 | ✅ | ❌ |
If you’re using the Raspberry Pi Camera Module, you need to enable the camera software in your Raspberry Pi in order to use it. In the Desktop environment, go to the Raspberry Pi Configuration window under the Preferences menu, open the Interfaces tab and enable the Camera as shown in figure below:
Or, in the Terminal window, type the following command:
pi@raspberry:~ $ sudo raspi-config
You should see the Raspberry Pi software configuration tool: Select the Interfacing Options -> Enable the camera and reboot.
To access your video streaming web server, you need to know your Raspberry Pi IP address. For that, use the following command:
pi@raspberry:~ $ ifconfig
You’ll be given a bunch of information, including your Raspberry Pi IP address for example: 192.168.x.xxx
git clone https://github.com/mastersubhajit/video_streaming_with_raspberry_pi_camera_module.git
First run the script:
pi@raspberrypi:~ $ python3 raspberry_pi_camera_streaming.py
Once the script is running, you can access your video streaming web server at: <Your_Pi_IP_Address>:8000
You can access the video streaming through any device that has a browser and is connected to the same network that your Pi.