Skip to main content

What is ESP32_USB_STREAM?

ESP32_USB_STREAM is an Arduino library designed to support USB UVC (USB Video Class) and UAC (USB Audio Class) host driver functionality for ESP32-S2 and ESP32-S3 microcontrollers. It enables your ESP32 to act as a USB host, allowing you to read, write, and control multimedia streaming from USB devices.

Key Capabilities

Video Streaming

Stream video data from USB UVC cameras with configurable resolution and frame rate

Audio Input

Capture audio from USB microphones with volume and mute control

Audio Output

Send audio to USB speakers with full control features

Multiple Streams

Support up to one UVC + one Microphone + one Speaker simultaneously

Features

  • Video Stream Support: Read video frames through UVC Stream interface
  • Audio Stream Support: Handle microphone and speaker streams through UAC Stream interface
  • Device Control: Control volume, mute, and other features through UAC Control interface
  • Stream Management: Suspend and resume individual streams independently
  • Flexible Configuration: Configure resolution, frame rate, sample rate, bit depth, and more

Hardware Requirements

This library only supports ESP32-S2 and ESP32-S3 SoCs. It will not work on ESP32 (original) or other variants.

Supported Devices

  • Microcontrollers: ESP32-S2, ESP32-S3
  • USB Devices:
    • UVC-compliant USB cameras
    • UAC-compliant USB microphones
    • UAC-compliant USB speakers

Pin Configuration

The ESP32-S2/S3 USB pins are fixed:
  • GPIO 19: USB D- (data negative)
  • GPIO 20: USB D+ (data positive)
Ensure your ESP32 board has USB host capability. Some development boards may require external USB host circuitry.

Architecture

ESP32_USB_STREAM is built on top of the usb_stream component from the Espressif Components Registry. It provides a clean, Arduino-friendly API wrapper around the lower-level USB streaming functionality.

Use Cases

  • IoT Camera Systems: Build USB camera monitoring systems with ESP32
  • Audio Recording: Capture audio from USB microphones for processing or storage
  • Audio Playback: Stream audio to USB speakers from ESP32
  • Video Processing: Capture and process video frames on-device
  • Multi-modal Sensing: Combine video and audio streaming in a single application

Next Steps

Installation

Install the library via Arduino IDE or manually from GitHub

Quick Start

Get your first UVC camera streaming in minutes

Build docs developers (and LLMs) love