Camera streamer built using ESPP to stream video (and, where available, audio) over the network. It supports two boards, selected at build time by the target chip:
| Board | Target | Sensor | Streams |
|---|---|---|---|
| M5Stack ESP32 TimerCam | esp32 |
OV3660 | MJPEG video |
| Seeed Studio XIAO ESP32S3 Sense | esp32s3 |
OV2640 + PDM mic | MJPEG video + L16 PCM audio |
It uses RTSP + RTP (over UDP) to perform real-time streaming of the camera data over the network to multiple clients. On the XIAO ESP32S3 Sense, the onboard PDM microphone is streamed as a second RTP track (L16 / 16 kHz mono) alongside the video.
rtsp_client_server_compressed.mp4
To facilitate easy connection to the camera, it also runs a mDNS server to advertise the camera's IP address / port that the RTSP server is running on.
Table of Contents
You must first program your hardware. Afterwards, you can configure it via a USB connection using its built-in CLI.
The ESP32-TimerCam will require one-time programming to function.
Download the release programmer executable from the latest releases
page for windows,
macos, or linux - depending on which computer you want to use to perform the
one-time programming.
- Download the programmer
- Unzip it
- Double click the
exe(if windows), or open a terminal and execute it from the command line./camera-streamer_programmer_v2.0.0_macos.bin.
To configure it, simply connect it to your computer via USB and open the serial
port in a terminal (e.g. screen, PuTTY, etc.) at 115200 baud. Once there,
you can use it as you would any other CLI - and the help command will provide
info about the commands available.
Any SSID/Password you set will be securely saved in the ESP32-TimerCam's NVS, which is managed by the ESP-IDF WiFi subsystem.
sta> help
Commands available:
- help
This help message
- exit
Quit the session
- log <verbosity>
Set the log verbosity for the wifi sta.
- connect
Connect to a WiFi network with the given SSID and password.
- connect <ssid> <password>
Connect to a WiFi network with the given SSID and password.
- disconnect
Disconnect from the current WiFi network.
- ssid
Get the current SSID (Service Set Identifier) of the WiFi connection.
- rssi
Get the current RSSI (Received Signal Strength Indicator) of the WiFi connection.
- ip
Get the current IP address of the WiFi connection.
- connected
Check if the WiFi is connected.
- mac
Get the current MAC address of the WiFi connection.
- bssid
Get the current BSSID (MAC addressof the access point) of the WiFi connection.
- channel
Get the current WiFi channel of the connection.
- config
Get the current WiFi configuration.
- scan <int>
Scan for available WiFi networks.
- memory
Display minimum free memory.
- battery
Display the current battery voltage.If you wish to modify / recompile the code, you will need to set up your development environment to be able to build and flash your target hardware.
This project is an ESP-IDF project, currently ESP-IDF v.5.5.1.
For information about setting up ESP-IDF v5.5.1, please see the official
ESP-IDF getting started
documentation.
This project supports two boards, each tied to a specific chip. Select the board
by setting the matching target before building — ESP-IDF automatically applies
the corresponding sdkconfig.defaults.<target> (which selects the board in
Kconfig):
# M5Stack ESP32 TimerCam (the default target)
idf.py set-target esp32
# Seeed Studio XIAO ESP32S3 Sense (camera + microphone)
idf.py set-target esp32s3
You can also flip the board explicitly under Camera Streamer Configuration -> Target board in idf.py menuconfig (only the board matching the current chip is
selectable).
Then build the project and flash it to the board, and run the monitor tool to view serial output:
idf.py -p PORT flash monitor
(Replace PORT with the name of the serial port to use.)
(To exit the serial monitor, type Ctrl-].)
Note
When you switch targets, run idf.py fullclean first (or delete the build/
and sdkconfig files) so the new target's defaults are applied cleanly.
See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects.
This sample runs on either the M5Stack ESP32 TimerCam or the Seeed Studio XIAO
ESP32S3 Sense. The board pin mappings come from the corresponding ESPP board
support package (esp32-timer-cam
or xiao-esp32s3-sense),
so the pin tables below are informational.
The ESP32 TimerCam (Amazon Link) has the following specs:
- 8MB PSRAM
- 4MB flash
- OV3660 image sensor (3MP, 66.5 DFOV), (8-/10-Bit RAW, RGB, and YCbCr output, compression), XCLK frequency: 10 MHz
- SH1.0-2P Battery Interface
- I/O: LED, Button
- RTC (BM8563)
- Battery
| Camera Pin | ESP32 GPIO Number |
|---|---|
| RESET | IO15 |
| XCLK | IO27 |
| VSYNC | IO22 |
| PCLK | IO21 |
| HREF | IO26 |
| SIOC | IO23 |
| SIOD | IO25 |
| D0 | IO32 |
| D1 | IO35 |
| D2 | IO34 |
| D3 | IO5 |
| D4 | IO39 |
| D5 | IO18 |
| D6 | IO36 |
| D7 | IO19 |
From their documentation...
| RTC Pin | ESP32 GPIO Number |
|---|---|
| SCL | IO13 |
| SDA | IO4 |
From their actual code...
| RTC Pin | ESP32 GPIO Number |
|---|---|
| SCL | IO14 |
| SDA | IO12 |
| Battery Pin | ESP32 GPIO Number |
|---|---|
| ADC | IO38 |
| Output Hold | IO33 |
| I/O Function | ESP32 GPIO Number |
|---|---|
| LED | IO2 |
| Button | IO37 |
The XIAO ESP32S3 Sense (Seeed Studio Wiki) pairs the XIAO ESP32S3 module with the "Sense" expansion board, which adds an OV2640 camera and a PDM microphone.
The XIAO ESP32S3 Sense has the following specs:
- 8MB PSRAM, 8MB flash
- OV2640 image sensor (2MP), via the Sense expansion board (XCLK 20 MHz)
- PDM microphone, via the Sense expansion board
- microSD slot (SPI), via the Sense expansion board
- User LED + native USB-C (console runs over USB Serial/JTAG)
The camera, microphone, microSD, and LED pin mappings are provided by the ESPP
xiao-esp32s3-sense
board support package.
| Mic Pin | ESP32-S3 GPIO Number |
|---|---|
| CLK | IO42 |
| DATA | IO41 |
- https://github.com/espressif/esp32-camera
- https://github.com/espressif/esp-idf
- https://github.com/esp-cpp/espp
- https://github.com/m5stack/TimerCam-idf
- https://docs.m5stack.com/#/en/unit/timercam
- https://wiki.seeedstudio.com/xiao_esp32s3_getting_started/
- https://esp-cpp.github.io/espp/xiao_esp32s3_sense.html
