Raspberry Pi 5 MIPI CSI-2 Color Camera Streaming Using GStreamer and V4L2
- Vadzo Imaging

- Jul 31, 2024
- 5 min read
High-resolution MIPI CSI-2 color cameras are widely deployed in embedded vision, inspection systems, robotics, and edge AI platforms where accurate color reproduction and deterministic image capture are required. With enhanced CSI bandwidth and improved processing capability, the Raspberry Pi 5 enables stable high-resolution color streaming compared to earlier Pi generations.

This article explains how to stream video from the Bolt-1335CRO MIPI Color Camera using Raspberry Pi 5. The guide covers:
Hardware requirements
Device Tree integration
Firmware and driver loading
V4L2-based streaming
GStreamer color pipeline execution
Camera control via V4L2
The content is based on practical validation of the Bolt-1335CRO streaming pipeline on Raspberry Pi 5 and is intended for developers building production-grade embedded vision systems.
Hardware Requirements for Bolt-1335CRO MIPI CSI Color Camera on Raspberry Pi 5
The following configuration was used to validate color streaming over the MIPI CSI-2 interface:
Component | Specification |
Host Board | Raspberry Pi 5 |
Storage | 32GB / 64GB SD Card |
Power Supply | Official Raspberry Pi 5 Adapter |
Camera | Bolt-1335CRO Color |
Interface | MIPI CSI-2 |
Connector | 22-Pin CSI Connector |
Cable | FFC Cable |
Firmware | BOLT_1335CRO.bin |
The camera connects via the native CSI interface and streams in UYVY format, enabling full chroma capture suitable for color-sensitive applications such as inspection and object detection.
Streaming Bolt-1335CRO with raspberry Pi 5
Step1: Interfacing Bolt-1335CRO with Raspberry Pi 5
Before streaming, the required Device Tree overlay and firmware must be installed.
1.1 Install Device Tree Overlay (DTBO)
Copy the Bolt-1335CRO overlay file to the boot overlays directory:
sudo cp BOLT_1335CRO.dtbo /boot/overlays This makes the overlay available for activation through the system configuration file.
1.2 Update System Configuration
Navigate to the firmware directory:
cd /boot/firmware/
sudo nano config.txt Under the [all] section, add:
kernel=kernel-myconfig.img
dtoverlay=BOLT_1335CRO
dtoverlay=raspi-gpio
dtparam=cam1_reg=off
dtparam=uart0=on Press Ctrl+S to save and Ctrl+X to exit the editor.
1.3 Reboot the System
Reboot to apply changes:
reboot After reboot, the system will load the overlay and prepare the CSI interface for driver initialization.
Step 2: Adding Bin File
The sensor firmware binary must be placed in the Linux firmware directory to allow proper initialization during driver loading.
2.1 Copy Firmware Binary
Download the bin file BIN/BOLT_1335CRO.bin and copy it into /lib/firmware
sudo cp BOLT_1335CRO.bin /lib/firmware/ This ensures the kernel driver can access the required sensor configuration during module insertion.
Step 3: Streaming Bolt_1335CRO
Video streaming can be performed using GStreamer through the V4L2 interface after loading the kernel driver and configuring media entities.
3.1 Install Required Packages
Install GStreamer
sudo apt install -y gstreamer1.0-tools
sudo apt install -y gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav Install V4L2 Utilities
sudo apt-get install v4l-utils 3.2 Load Kernel Driver
Download the driver module:
KO_FILE/BOLT_1335CRO.koInsert the kernel module:
sudo insmod BOLT_1335CRO.ko After insertion, the device node (e.g., /dev/video0) will be registered under the V4L2 subsystem.
3.3 Configure Resolution and Media Entities
Each supported resolution requires media entity configuration before streaming.
Make the configuration script executable:
$ sudo chmod +x CONFIG_RES_1920.sh Execute the script:
$ sudo ./CONFIG_RES_1920.sh Expected output:
Configuring resolution: 1920x1080
Resolution 1920x1080 configured and ready to stream. Note: Always execute the appropriate CONFIG_RES_<WIDTH>.sh script before initiating streaming at that resolution.
3.4 Streaming at 1920 × 1080
To stream at 1920 × 1080 @ 30 FPS in UYVY format:
gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=UYVY,width=1920,height=1080,framerate=30/1 ! videoconvert ! fpsdisplaysink text-overlay=true video-sink=autovideosink sync=false3.5 Streaming at 4208 × 3120
GStreamer does not directly display 4208 × 3120 at full resolution in a standard window. To handle this, scale the output during pipeline processing.
Use the following pipeline:
gst-launch-1.0 \
v4l2src device=/dev/video0 ! \
video/x-raw,format=UYVY,width=4208,height=3120,framerate=30/1 ! \
videoconvert ! \
videoscale ! \
video/x-raw,width=1920,height=1080 ! \
fpsdisplaysink text-overlay=true video-sink=autovideosink sync=false This captures full sensor resolution while resizing the display output to 1920 × 1080.
Note: Before streaming any resolution using the gst command, ensure to run the respective CONFIG_RES_WIDTH shell script.
Camera Controls (V4L2)
The Bolt-1335CRO color camera supports runtime parameter adjustment through the V4L2 sub-device interface. All controls are applied to the detected sub-device (example: /dev/v4l-subdev2). Use v4l2-ctl to configure sensor parameters.
Brightness
Range: −15 to 15
Default: 0
Adjust brightness using:
v4l2-ctl --device /dev/v4l-subdev2 --set-ctrl brightness=val Replace val with a value between −15 and 15.
Example:
v4l2-ctl --device /dev/v4l-subdev2 --set-ctrl brightness=3Contrast
Range: 0 to 30
Default: 3
Adjust contrast using:
v4l2-ctl --device /dev/v4l-subdev2 --set-ctrl contrast=val Replace val with a value between 0 and 30.
Example:
v4l2-ctl –device /dev/v4l-subdev2 --set-ctrl contrast=6Saturation
Range: 0 to 60
Default: 18
Adjust saturation using:
v4l2-ctl --device /dev/v4l-subdev2 --set-ctrl saturation=val Replace val with a value between 0 and 60.
Example:
v4l2-ctl --device /dev/v4l-subdev2 --set-ctrl saturation=3Auto and Manual White Balance:
The Bolt-1335CRO supports both automatic and manual white balance adjustment via V4L2 controls.
Auto White Balance:
Enable automatic white balance:
v4l2-ctl --device /dev/v4l-subdev2 --set-ctrl white_balance_automatic=1 When enabled, the ISP dynamically adjusts color temperature based on scene lighting conditions.
Manual White Balance:
Before switching to manual control, disable auto white balance:
v4l2-ctl --device /dev/v4l-subdev2 --set-ctrl white_balance_automatic=0 After disabling auto mode, set the white balance temperature manually.
Range: 1000 to 10000
Step value: 500
Default: 4500
v4l2-ctl --device /dev/v4l-subdev2 --set-ctrl white_balance_temperature=val Replace val with a value between 1000 and 10000.
Example:
v4l2-ctl --device /dev/v4l-subdev2 --set-ctrl white_balance_temperature=5000 Auto and Manual Exposure:
Exposure can be configured in automatic or manual mode.
Auto Exposure:
Enable automatic exposure control:
v4l2-ctl --device /dev/v4l-subdev2 --set-ctrl auto_exposure=0 In this mode, exposure time is dynamically adjusted based on scene brightness.
Manual Exposure:
To manually control exposure, switch the control mode:
v4l2-ctl --device /dev/v4l-subdev2 --set-ctrl auto_exposure=1 After switching to manual mode, configure the exposure time.
Range: 0 to 10000
Step value: 50
Default: 650
v4l2-ctl --device /dev/v4l-subdev2 --set-ctrl exposure_time_absolute=val Replace val with a value between 0 and 10000.
Example:
v4l2-ctl --device /dev/v4l-subdev2 --set-ctrl exposure=10000Horizontal Flip
Horizontal image orientation can be enabled or disabled using the following control:
v4l2-ctl --device /dev/v4l-subdev2 --set-ctrl horizontal_flip=val val is a boolean parameter:
0 → Disable horizontal flip (default)
1 → Enable horizontal flip
Example:
v4l2-ctl --device /dev/v4l-subdev2--set-ctrl horizontal_flip=1 enables Horizontal flip Vertical Flip
Vertical image orientation can be enabled or disabled using:
v4l2-ctl --device /dev/v4l-subdev2 --set-ctrl vertical_flip=val val is a boolean parameter:
0 → Disable vertical flip (default)
1 → Enable vertical flip
Example:
v4l2-ctl --device /dev/v4l-subdev2 --set-ctrl vertical_flip=1 enables vertical flipValidated MIPI CSI-2 Color Pipeline on Raspberry Pi 5
The Bolt-1335CRO MIPI CSI-2 color camera integrates seamlessly with the Raspberry Pi 5, enabling stable high-resolution streaming over the native CSI interface. With proper Device Tree configuration, firmware loading, and driver initialization, the camera delivers reliable UYVY output at both Full HD and full sensor resolution.
Support for GStreamer pipelines and V4L2 runtime controls provides developers with precise control over resolution, exposure, white balance, and image orientation. This validated workflow offers a practical foundation for building production-grade embedded vision and edge AI systems requiring accurate color reproduction and deterministic capture.
Vadzo Imaging Bolt MIPI CSI-2 Camera Portfolio
The Bolt-1335CRO is part of Vadzo’s embedded vision camera portfolio supporting MIPI CSI-2 and USB interfaces. The range includes high-resolution color and monochrome cameras designed for robotics, inspection, and edge AI platforms such as the Raspberry Pi 5. Each solution is backed by validated firmware, Linux drivers, and V4L2 control support for production-ready integration.
Recommended Bolt MIPI Camera



