Streaming MIPI Color Camera with RPI4 Through GStreamer & Control Through V4L2
- Vadzo Imaging

- 22 hours ago
- 5 min read

This document describes the complete procedure to interface and stream video from the BOLT-1335CRA camera module using Raspberry Pi 4.
The process includes:
Installing required utilities
Adding device tree overlay files
Compiling kernel overlays
Installing the camera driver
Loading firmware
Streaming video using GStreamer
The steps must be followed sequentially to ensure the camera is detected and streamed correctly.
Hardware Requirements
Before starting the setup, ensure the following hardware components are available.
Component | Description |
BOLT-1335CRA Camera Module | Camera module used for image capture and streaming |
Raspberry Pi 4 | Embedded processing platform used to interface and stream the camera |
Micro SD Card (32GB / 64GB) | Used to install Raspberry Pi OS and store required files |
15 cm FFC Cable | Flat Flexible Cable used to connect the camera module to the Raspberry Pi CSI interface |
External Display Monitor | Required to view the Raspberry Pi desktop environment and camera streaming output |
Hardware Connection
Insert the Micro SD card (32GB / 64GB) with Raspberry Pi OS into the Raspberry Pi 4.
Connect the BOLT-1335CRA camera module to the Raspberry Pi CSI camera port using the 15 cm FFC cable.
Ensure the FFC cable orientation is correct and firmly inserted on both the camera and Raspberry Pi connectors.
Connect the Raspberry Pi 4 to an external display monitor using HDMI.
Connect a keyboard and mouse if required.
Power on the Raspberry Pi.
Once the hardware setup is completed, proceed with the software configuration steps described in the following sections.
Installing Required Utility
Before starting the camera integration, install gedit, which will be used to edit configuration files and Makefiles.
Install the gedit library using the following command:
sudo apt install gedit
Copy DTBO File
To interface BOLT-1335CRA with RPI-4, download the dtbo file.
The downloaded dtbo file must be copied into the /boot/overlays directory using the following command.
sudo cp BOLT_1335CRA.dtbo /boot/overlays
Configure Raspberry Pi Boot Settings
Navigate to the /boot/firmware directory and open the config.txt file.
cd /boot/firmware
sudo nano config.txt
Add the following line at the end of the config.txt file.
dtoverlay=BOLT_1335CRA,media-controller=0
Press Ctrl + S to save and Ctrl + X to exit the editor.
The config.txt file controls hardware initialization during Raspberry Pi boot.
The line dtoverlay=BOLT_1335CRA,media-controller=0 loads the BOLT-1335CRA camera overlay and configures the driver to operate in standard V4L2 mode.
Verify I2C Nodes
Power off and then power on the Raspberry Pi to verify whether the I2C nodes are generated.
Use the following command:
ls /dev/i2c-*
The output should look similar to the following.
/dev/i2c-0 /dev/i2c-1 /dev/i2c-10 /dev/i2c-20 dev/i2c-21 dev/i2c-22
I2C nodes indicate that the camera control interfaces have been initialized successfully.
The driver communicates with the image sensor and other camera components through the I2C bus.
Adding Firmware (BIN File)
Download the firmware package and extract it.
The extracted package will contain the file: BOLT_1335CRA.bin
Copy the firmware file into the /lib/firmware directory.
sudo cp BOLT_1335CRA.bin /lib/firmware
sync
The .bin file contains sensor firmware or configuration parameters required by the camera driver during initialization.
/lib/firmware is the standard Linux location where device drivers retrieve firmware files during runtime.
Update Boot Configuration
Navigate to the firmware directory and open the config.txt file again.
cd /boot/firmware
sudo nano config.txt
To stream BOLT-1335CRA, comment the following line if it is present:
camera_auto_detect=1
Press Ctrl + S to save and Ctrl + X to exit.
camera_auto_detect enables the Raspberry Pi's default camera detection mechanism. Since the BOLT-1335CRA uses a custom driver, this option must be disabled to prevent conflicts.
Reboot the Raspberry Pi
Restart the Raspberry Pi to apply the configuration changes.
reboot
Alternatively, power off and power on the Raspberry Pi.
Install GStreamer
If GStreamer is not installed, install it using the following command.
sudo apt-get install gstreamer1.0-tools
Load the Camera Driver
Download the driver package and extract it to the home directory.
Open the terminal and navigate to the directory containing the driver file.
Load the driver using the following command.
sudo insmod BOLT_1335CRA_v1_6.ko
insmod inserts the kernel driver module into the Linux kernel.
After successful initialization, the camera will typically appear as: /dev/video0
Stream Video from BOLT-1335CRA
The camera supports the following output resolutions.
Resolution | Aspect Ratio |
640 × 480 | 4:3 |
1280 × 720 | 16:9 |
1920 × 1080 | 16:9 |
2600 × 1952 | 4:3 |
3840 × 2160 | 16:9 |
4208 × 3120 | 4:3 |
Use the following GStreamer pipeline to stream video from the camera at VGA resolution.
gst-launch-1.0v4l2srcdevice="/dev/video0"!videoconvert!video/x-raw,framerate=30/1,width=640,height=480,pixelformat=UYVY ! autovideosink
Supported UVC / V4L2 Controls
The BOLT-1335CRA camera supports the following UVC compatible V4L2 controls.
Control | Type | Minimum | Maximum | Default |
Brightness | Integer | -15 | 15 | 0 |
Contrast | Integer | 0 | 30 | 3 |
Saturation | Integer | 0 | 60 | 18 |
White Balance Automatic | Boolean | 0 | 1 | 1 |
White Balance Temperature | Integer | 1000 | 10000 | 4500 |
Horizontal Flip | Boolean | 0 | 1 | 0 |
Vertical Flip | Boolean | 0 | 1 | 0 |
Auto Exposure | Menu | 0 | 1 | 0 |
Exposure Time Absolute | Integer | 1 | 10000 | 625 |
1. Brightness Control
Brightness adjusts the overall luminance of the image.
Parameter | Value |
Minimum | -15 |
Maximum | 15 |
Step | 1 |
Default | 0 |
Example Command
v4l2-ctl --device=/dev/video0 --set-ctrl=brightness=5
Increasing the value makes the image brighter.
Decreasing the value darkens the image.
2. Contrast Control
Contrast controls the difference between the brightest and darkest parts of the image.
Parameter | Value |
Minimum | 0 |
Maximum | 30 |
Step | 1 |
Default | 3 |
Example Command
v4l2-ctl --device=/dev/video0 --set-ctrl=contrast=10
Higher contrast improves visibility of edges and details.
3. Saturation Control
Saturation controls the intensity of colors in the image.
Parameter | Value |
Minimum | 0 |
Maximum | 60 |
Step | 1 |
Default | 18 |
Example Command
v4l2-ctl --device=/dev/video0 --set-ctrl=saturation=25
Low saturation → dull colors
High saturation → vivid colors
4. Auto White Balance
Auto white balance adjusts the image color automatically based on lighting conditions.
Example Command
Enable Auto White Balance
v4l2-ctl --device=/dev/video0 --set-ctrl=white_balance_automatic=1
Disable Auto White Balance
v4l2-ctl --device=/dev/video0 --set-ctrl=white_balance_automatic=0
When enabled, the camera automatically adjusts color temperature to maintain natural color reproduction.
5. Manual White Balance Temperature
Manual white balance allows direct control of the color temperature.
Parameter | Value |
Minimum | 1000 |
Maximum | 10000 |
Step | 500 |
Default | 4500 |
Example Command
v4l2-ctl --device=/dev/video0 --set-ctrl=white_balance_temperature=5000
Lower values represent warmer tones (yellow/red), while higher values represent cooler tones (blue).
6. Horizontal Flip
Horizontal flip mirrors the image across the vertical axis.
Example Command
v4l2-ctl --device=/dev/video0 --set-ctrl=horizontal_flip=1
This is useful when the camera is mounted in a mirrored orientation.
7. Vertical Flip
Vertical flip mirrors the image across the horizontal axis.
Example Command
v4l2-ctl --device=/dev/video0 --set-ctrl=vertical_flip=1
8. Auto Exposure Control
The camera supports both automatic and manual exposure modes.
Example Command
Enable Auto Exposure
v4l2-ctl --device=/dev/video0 --set-ctrl=auto_exposure=0
Enable Manual Exposure
v4l2-ctl --device=/dev/video0 --set-ctrl=auto_exposure=1
Auto Mode → Camera automatically adjusts exposure based on lighting.
Manual Mode → Exposure must be manually controlled.
9. Exposure Time Control
Exposure time defines the amount of time the sensor collects light for each frame.
Parameter | Value |
Minimum | 1 |
Maximum | 10000 |
Step | 1 |
Default | 625 |
Example Command
v4l2-ctl --device=/dev/video0 --set-ctrl=exposure_time_absolute=1000
Important Note
This control becomes active only when manual exposure mode is enabled.



