top of page

How to Stream USB Cameras on Raspberry Pi 5

Streaming video from a USB camera is a common requirement in embedded and vision-based applications such as surveillance, robotics, machine vision, and AI development. In this blog, we will walk through a step-by-step guide to stream USB cameras on Raspberry Pi 5 using GStreamer.

USB camera connected to a Raspberry Pi 5 development board for streaming demonstration.

This guide works for both color and monochrome (grayscale) USB cameras. It covers installation, device identification, and example GStreamer pipelines that you can directly use and modify based on your camera requirements.


Why Raspberry Pi 5?

The Raspberry Pi 5 is a powerful upgrade compared to previous models and is ideal for camera streaming and vision applications because:

  • It supports USB 3.0 for high-resolution and high-FPS cameras.

  • It has a faster CPU for better real-time performance.

  • It provides improved I/O bandwidth.

  • It is low-cost, compact, and widely supported by Linux tools.

  • GStreamer and V4L2 work out of the box on Raspberry Pi OS

Because of these advantages, Raspberry Pi 5 is excellent for prototyping, demos, AI pipelines, and lightweight production systems.


Platform Details for USB Camera on Raspberry Pi 5 Setup

Below are the platform and hardware details used for this blog:

  • Hardware: Raspberry Pi 5

  • Operating System: Raspberry Pi OS (64-bit)

  • Kernel Version: Linux 6.1.x (LTS)

  • Cameras Used: Falcon-821CRS (Color), Falcon-234MGS (Monochrome)

  • Interface: USB

  • Framework: GStreamer with V4L2

You can use the same steps for any standard USB UVC camera.


Installation Overview

Before streaming video, we need to install the required tools and libraries.

Installing GStreamer

GStreamer is a powerful multimedia framework used to build video and audio pipelines.

Run the following commands on your Raspberry Pi:

sudo apt update 
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 

These plugins ensure support for different video formats and conversions.

Installing v4l-utils

v4l-utils is required to list and inspect video devices connected to the system.

sudo apt-get install v4l-utils 

Streaming a USB Camera

Step 1: Finding the Camera Device Node

First, list all connected video devices using:

v4l2-ctl --list-devices 

Expected Output

<Camera_name> (usb-0000:00:14.0-1): 
    /dev/video2 
    /dev/video3 
HP HD Camera: HP HD Camera (usb-0000:00:14.0-9): 
    /dev/video0 
    /dev/video1 

From this output:

  • Each camera may expose multiple video nodes.

  • Choose the correct /dev/videoX based on your camera

Note down the correct video node. This will be used in the GStreamer command.

Step 2: Streaming Using GStreamer

General GStreamer Command

gst-launch-1.0 v4l2src device=<VIDEO_NODE> ! \ 
video/x-raw,format=<FORMAT>,width=<WIDTH>,height=<HEIGHT>,framerate=<FPS>/1 ! \ 
videoconvert ! fpsdisplaysink text-overlay=true video-sink=autovideosink sync=false 

Parameter Explanation

VIDEO_NODE

The video device path obtained from v4l2-ctl, for example:

/dev/video2 

FORMAT

Pixel format supported by the camera:

  • UYVY – Color cameras

  • GRAY8 – Monochrome (grayscale) cameras

WIDTH and HEIGHT

Resolution of the video stream, for example:

  • 1920 × 1080

  • 1280 × 720

FPS

Frames per second, for example:

  • 30

  • 60

Example Commands

1. Streaming a Color USB Camera

Example:

  • Device: /dev/video2

  • Resolution: 1920 × 1080

  • FPS: 30

  • Format: UYVY

gst-launch-1.0 v4l2src device=/dev/video2 ! \ 
video/x-raw,format=UYVY,width=1920,height=1080,framerate=30/1 ! \ 
videoconvert ! fpsdisplaysink text-overlay=true video-sink=autovideosink sync=false 

This command:

  • Captures video from the USB camera

  • Converts it to a display-friendly format

  • Shows FPS on screen

2. Streaming a Monochrome (Grayscale) Camera

Example:

  • Device: /dev/video2

  • Resolution: 1920 × 1080

  • FPS: 30

  • Format: GRAY8

gst-launch-1.0 v4l2src device=/dev/video2 ! \ 
video/x-raw,format=GRAY8,width=1920,height=1080,framerate=30/1 ! \ 
videoconvert ! fpsdisplaysink text-overlay=true video-sink=autovideosink sync=false 

This is ideal for:

USB camera Raspberry Pi 5 use cases: Machine Vision robotic arm, Industrial Inspection, Low Light hospital monitoring.

Practical Edge Vision Deployment on Raspberry Pi 5

Streaming USB cameras on the Raspberry Pi 5 using GStreamer provides a streamlined and efficient method for building embedded vision pipelines. With minimal configuration, both color and monochrome cameras can be operated across multiple resolutions and frame rates, enabling rapid validation and deployment.

The Raspberry Pi 5 delivers a balanced combination of compute capability, I/O bandwidth, and ecosystem maturity, making it well-suited for cost-sensitive yet performance-driven camera-based systems.

This architecture can be readily extended to support:

  • Video recording workflows

  • Network-based streaming (RTSP/UDP)

  • Edge AI inference pipelines

  • OpenCV-based image processing integration

Together, these capabilities establish a scalable foundation for embedded vision, robotics, industrial inspection, and edge AI applications.


Vadzo Imaging USB Camera Portfolio

Vadzo Imaging offers a range of USB cameras designed for seamless integration with embedded Linux platforms such as the Raspberry Pi 5. Built on UVC-compliant architectures, these cameras support stable V4L2 streaming, broad OS compatibility, and straightforward deployment for edge vision and robotics use cases.

With native USB 3.0 support on Raspberry Pi 5 and optimized firmware compatibility, Vadzo USB cameras provide reliable performance across a variety of applications, from real-time monitoring to AI-based inference workflows.

Vadzo also offers the Vadzo VISPA ARC SDK for Linux, an advanced programmable framework that extends standard UVC functionality by enabling deeper sensor control, dynamic ROI configuration, exposure tuning, hardware triggering, and optimized low-latency performance for embedded and industrial vision systems.

Recommended USB Cameras for Raspberry Pi 5:

AR1335 Color 4K Autofocus USB 3.2 Gen 2x2 Camera
From$835.00$820.00
Buy Now
AR2020 Monochrome 20MP USB 3.2 Gen 2x2 Camera
From$855.00$840.00
Buy Now

Need USB cameras optimized for Raspberry Pi 5?

Explore Vadzo Imaging’s USB camera portfolio or contact our team for integration support.

contact form camera image.webp
Reach Vadzo Team for the Customization

Vadzo team shall be able to assist you with the details on this.

Talk to our Camera Expert

bottom of page