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.
Camera Module v1 | Camera Module v2 | Camera Module 3 | Camera Module 3 Wide | HQ Camera | GS Camera | |
---|---|---|---|---|---|---|
Net price |
$25 |
$25 |
$25 |
$35 |
$50 |
$50 |
Size |
Around 25 × 24 × 9 mm |
Around 25 × 24 × 9 mm |
Around 25 × 24 × 11.5 mm |
Around 25 × 24 × 12.4 mm |
38 x 38 x 18.4mm (excluding lens) |
38 x 38 x 19.8mm (29.5mm with adaptor and dust cap) |
Weight |
3g |
3g |
4g |
4g |
30.4g |
34g (41g with adaptor and dust cap) |
Still resolution |
5 Megapixels |
8 Megapixels |
11.9 Megapixels |
11.9 Megapixels |
12.3 Megapixels |
1.58 Megapixels |
Video modes |
1080p30, 720p60 and 640 × 480p60/90 |
1080p47, 1640 × 1232p41 and 640 × 480p206 |
2304 × 1296p56, 2304 × 1296p30 HDR, 1536 × 864p120 |
2304 × 1296p56, 2304 × 1296p30 HDR, 1536 × 864p120 |
2028 × 1080p50, 2028 × 1520p40 and 1332 × 990p120 |
1456 x 1088p60 |
Sensor |
OmniVision OV5647 |
Sony IMX219 |
Sony IMX708 |
Sony IMX708 |
Sony IMX477 |
Sony IMX296 |
Sensor resolution |
2592 × 1944 pixels |
3280 × 2464 pixels |
4608 x 2592 pixels |
4608 x 2592 pixels |
4056 x 3040 pixels |
1456 x 1088 pixels |
Sensor image area |
3.76 × 2.74 mm |
3.68 x 2.76 mm (4.6 mm diagonal) |
6.45 x 3.63mm (7.4mm diagonal) |
6.45 x 3.63mm (7.4mm diagonal) |
6.287mm x 4.712 mm (7.9mm diagonal) |
6.3mm diagonal |
Pixel size |
1.4 µm × 1.4 µm |
1.12 µm x 1.12 µm |
1.4 µm x 1.4 µm |
1.4 µm x 1.4 µm |
1.55 µm x 1.55 µm |
3.45 µm x 3.45 µm |
Optical size |
1/4" |
1/4" |
1/2.43" |
1/2.43" |
1/2.3" |
1/2.9" |
Focus |
Fixed |
Adjustable |
Motorized |
Motorized |
Adjustable |
Adjustable |
Depth of field |
Approx 1 m to ∞ |
Approx 10 cm to ∞ |
Approx 10 cm to ∞ |
Approx 5 cm to ∞ |
N/A |
N/A |
Focal length |
3.60 mm +/- 0.01 |
3.04 mm |
4.74 mm |
2.75 mmm |
Depends on lens |
Depends on lens |
Horizontal Field of View (FoV) |
53.50 +/- 0.13 degrees |
62.2 degrees |
66 degrees |
102 degrees |
Depends on lens |
Depends on lens |
Vertical Field of View (FoV) |
41.41 +/- 0.11 degrees |
48.8 degrees |
41 degrees |
67 degrees |
Depends on lens |
Depends on lens |
Focal ratio (F-Stop) |
F2.9 |
F2.0 |
F1.8 |
F2.2 |
Depends on lens |
Depends on lens |
Maximum exposure times (seconds) |
6 (legacy) / 0.97 (libcamera) |
11.76 |
112 |
112 |
670.74 |
15.5 |
Lens Mount |
N/A |
N/A |
N/A |
N/A |
C/CS- or M12-mount |
C/CS |
NoIR version available? |
Yes |
Yes |
Yes |
Yes |
No |
No |
Note
|
There is some evidence to suggest that the Camera Module 3 may emit RFI at a harmonic of the CSI clock rate. This RFI is in a range to interfere with GPS L1 frequencies (1575 MHz). Please see the thread on Github for details and proposed workarounds. |
Available mechanical drawings;
Note
|
Board dimensions and mounting-hole positions for Camera Module 3 are identical to Camera Module 2. However, due to changes in the size and position of the sensor module, it is not mechanically compatible with the camera lid for the Raspberry Pi Zero Case. |
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.
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.