Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
E

esp32cam-rtsp

> 数据库
Open source

Simple RTSP (streaming image) server for the ESP32CAM. Easy configuration and monitoring through the web interface.

1.2K stars0 likes3 views
WebsiteGitHub

About

Simple RTSP (streaming image) server for the ESP32CAM. Easy configuration and monitoring through the web interface.

ESP32CAM-RTSP

Simple RTSP, HTTP JPEG Streamer and image server with configuration through the web interface.

[!NOTE] A develop branch is available with the newest boards (including the Seeed Studio XIAO ESP32S3). It may be ahead of main; feedback and testing are welcome.

Flashing this software on a ESP32CAM module will make it a RTSP streaming camera server, a HTTP Motion JPEG streamer and a HTTP image server.

Contents

  • Features
  • Supported boards
  • Installing and running PlatformIO
  • Putting the ESP32-CAM in download mode
  • Compiling and deploying the software
  • Setting up the ESP32CAM-RTSP
  • Connecting to the configuration
  • Connecting to the RTSP stream
  • RTSP authentication
  • Connecting to the JPEG motion server
  • Connecting to the image server
  • Updating the firmware (OTA)
  • API
  • Issues / Nice to know
  • Credits

Features

Supported protocols

  • RTSP The RTSP protocol is an industry standard and allows many CCTV systems and applications (like for example VLC) to connect directly to the ESP32CAM camera stream. It is also possible to stream directly to a server using ffmpeg. This makes the module a camera server allowing recording and the stream can be stored on a disk and replayed later. The video is encoded as Motion-JPEG (RTP payload 26) and streamed over RTP/UDP (default) or RTP/RTSP/TCP. Boards with an onboard microphone (e.g. the Seeed Studio XIAO ESP32S3 SENSE) can additionally stream G.711 a-law audio (RTP payload 8). The URL is rtsp://<ip address>:554/mjpeg/1 Authentication is optional; when enabled, clients must provide credentials (see RTSP authentication).

  • HTTP Motion JPEG The HTTP JPEG streamer makes it possible to watch the camera stream directly in your browser. The URL is http://<ip address>/stream

  • HTTP image The HTTP Image returns an HTTP JPEG image of the camera. The URL is http://<ip address>/snapshot

  • Over-the-air (OTA) firmware update The firmware can be updated over WiFi from PlatformIO or the Arduino IDE (espota). See Updating the firmware (OTA).

This software supports the following ESP32-CAM (and alike) modules:

  • AI THINKER
  • Espressif ESP-EYE
  • Espressif ESP32S2-CAM
  • Espressif ESP32S3-CAM-LCD
  • Espressif ESP32S3-EYE
  • Freenove WROVER KIT
  • M5STACK ESP32CAM
  • M5STACK_PSRAM
  • M5STACK_UNITCAM
  • M5STACK_UNITCAMS3
  • M5STACK_V2_PSRAM
  • M5STACK_WIDE
  • M5STACK M5PoECAM-W
  • M5STACK Timer CAM (Original and X)
  • Seeed Studio XIAO ESP32S3 SENSE
  • TTGO T-CAMERA
  • TTGO T-JOURNAL

The software provides a configuration web server that can be used to:

  • Provide information about the state of the device, WiFi connection and camera,
  • Set the WiFi parameters,
  • Set the timeout for connecting to the access point,
  • Set an access password,
  • Select the image size,
  • Select the frame rate,
  • Select the JPEG quality,
  • Enable the use of the PSRAM,
  • Set the number of frame buffers,
  • Configure the camera options:
    • Brightness
    • Contrast
    • Saturation
    • Special effect (Normal, Negative, Gray-scale, Red/Green/Blue tint, Sepia)
    • White balance
    • Automatic White Balance gain
    • White Balance mode
    • White Balance mode
    • Exposure control
    • Auto Exposure (dsp)
    • Auto Exposure level
    • Manual exposure value
    • Gain control
    • Manual gain control
    • Auto gain ceiling
    • Black pixel correction
    • White pixel correction
    • Gamma correction
    • Lens correction
    • Horizontal mirror
    • Vertical flip
    • Downsize enable
    • Color bar

The software also provides a mDNS server to be easily discoverable on the local network. It advertises HTTP (port 80) and RTSP (port 554).

Required

  • ESP32-CAM module or similar,
  • USB to Serial (TTL level) converter, piggyback board ESP32-CAM-MB or other way to connect to the device,
  • PlatformIO software (free download)

Boards

There are a lot of boards available that are all called ESP32-CAM. However, there are differences in CPU (type/speed/cores), how the camera is connected, presence of PSRAM or not... To select the right board use the table below and use the configuration that is listed below for your board:

Board Image CPU SRAM Flash PSRAM Camera Extras Manufacturer site
Espressif ESP32-Wrover CAM ESP32 520KB 4MB 8MB OV2640
AI-Thinker ESP32-CAM ESP32 520KB 4MB 4MB OV2640 https://docs.ai-thinker.com/esp32-cam
Espressif ESP-EYE ESP32 520KB 4MB 8MB OV2640
Espressif ESP32-S3-EYE ESP32-S3 520KB 4MB 8MB OV2640 https://www.espressif.com/en/products/devkits/esp-eye/overview
LilyGo camera module ESP32 Wrover 520KB 4MB 8MB OV2640 / OV5640
LilyGo Simcam OV2640
LilyGo TTGO-T Camera OV2640
M5Stack ESP32CAM ESP32 520KB 4MB - OV2640 Microphone https://docs.m5stack.com/en/unit/esp32cam
M5Stack UnitCam ESP32-WROOM-32E 520KB 4MB - OV2640 https://docs.m5stack.com/en/unit/unit_cam
M5Stack Camera ESP32 520KB 4MB - OV2640 https://docs.m5stack.com/en/unit/m5camera
M5Stack Camera PSRAM ESP32 520KB 4MB 4MB OV2640 https://docs.m5stack.com/en/unit/m5camera
M5Stack UnitCamS3 ESP32-S3-WROOM-1-N16R8 520KB 16MB 8MB OV2640 https://docs.m5stack.com/en/unit/Unit-CamS3
Seeed Studio XIAO ESP32S3 Sense ESP32-S3R8 520KB 8MB 8MB OV2640 Microphone https://www.seeedstudio.com/XIAO-ESP32S3-Sense-p-5639.html

Installing and running PlatformIO

PlatformIO is available for all major operating systems: Windows, Linux and MacOS. It is also provided as a plugin to Visual Studio Code. More information can be found at: https://docs.platformio.org/en/latest/installation.html below the basics.

Install Visual Studio Code and install the PlatformIO plugin.

Putting the ESP32-CAM in download mode

ESP32-CAM-MB

When using the ESP32-CAM-MB board, press and hold the GPIO0 button on the ESP32-CAM-MB board. Then press short the reset button (on the inside) on the ESP32-CAM board and release the GPIO0 button. This will put the ESP32-CAM board in download mode.

FTDI adapter

When using an FTDI adapter, make sure the adapter is set to 3.3 volt before connecting. Use the wiring schema below.

After programming remove the wire to the GPIO0 pin to exit the download mode.

Compiling and deploying the software

Open a command line or terminal window and clone this repository from GitHub.

bash
git clone https://github.com/rzeldent/esp32cam-rtsp.git

Go into the folder

bash
cd esp32cam-rtsp

Next, the firmware has to be built and deployed to the ESP32. There are two flavours to do this; using the command line or the graphical interface of Visual Studio Code.

Using the command line

Make sure you have the latest version of the Espressif toolchain.

bash
pio pkg update -g -p espressif32

First the source code has to be compiled to build all targets

bash
pio run

If only a specific target is required, for example the esp32cam_ttgo_t_journal type:

bash
pio run -e esp32cam_ttgo_t_journal

When finished, firmware has to be uploaded. Make sure the ESP32-CAM is in download mode (see previous section) and type:

bash
 pio run -t upload

or, again, for a specific target, for example esp32cam_ai_thinker

bash
pio run -t upload -e esp32cam_ai_thinker

When done remove the jumper when using a FTDI adapter or press the reset button on the ESP32-CAM. To monitor the output, start a terminal using:

bash
 pio device monitor

Using Visual Studio Code

Open the project in Visual Studio Code with the PlatformIO extension installed. Run the following tasks using Terminal -> Run Task (or Ctrl+Alt+T). Make sure the ESP32-CAM is in download mode during uploads.

  • PlatformIO: Build (esp32cam) — compiles the firmware
  • **PlatformIO: Up

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C++ai-thinkercameracctvesp32

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库