esp32.diy

ESP32CAM-RTSP: RTSP & MJPEG Streaming Server Firmware

Oct 11, 2026 · 5 min read

Intermediate 1.2k stars 218 forks C++ GPL-3.0 Updated 2026-09-29

Espressif ESP32-Wrover CAM with OV2640 camera and 8 MB PSRAM

TL;DR esp32cam-rtsp turns a supported ESP32-CAM module into a live RTSP video server, an HTTP Motion JPEG streamer, and an HTTP snapshot endpoint. Everything is configured through a built-in web interface — no code changes required.
What you need
  • AI-Thinker ESP32-CAM
  • Espressif ESP32-Wrover CAM
  • ESP32-S3-CAM V3 (Type-C)
  • Espressif ESP-EYE
  • Espressif ESP32S3-EYE
  • M5Stack ESP32CAM
  • M5Stack UnitCam
  • M5Stack UnitCamS3
  • Seeed Studio XIAO ESP32S3 Sense
  • TTGO T-Camera
  • TTGO T-Journal
  • LilyGo camera module
  • Freenove WROVER KIT
  • USB-to-Serial TTL adapter or ESP32-CAM-MB piggyback board
  • OV2640 camera (built into supported modules)
BoardESP32 / ESP32-S2 / ESP32-S3 camera modules
FrameworkArduino via PlatformIO
LanguageC++
LicenseGPL-3.0
Latest Release1.0.8 (2026-09-29)
ProtocolsRTSP, HTTP Motion JPEG, HTTP Snapshot, OTA

What You Will Build and Why

After flashing esp32cam-rtsp, your ESP32-CAM module becomes a self-contained streaming camera server that speaks three protocols at once.

A built-in configuration web server lets you set Wi-Fi credentials, resolution, frame rate, JPEG quality, and dozens of camera parameters — brightness, contrast, saturation, white balance, exposure, gain, lens correction, and more — all from a browser without touching a line of code. An mDNS server advertises the device on your local network on both HTTP (port 80) and RTSP (port 554), so you can discover it without manually hunting for its IP address. Over-the-air (OTA) firmware updates are also supported, so once the board is on your Wi-Fi you can reflash it wirelessly from PlatformIO or the Arduino IDE.

AI-Thinker ESP32-CAM with IPEX connector for an external antenna\2
AI-Thinker ESP32-CAM with IPEX connector for an external antenna
AI-Thinker ESP32-CAM standard version with onboard PCB antenna\2
AI-Thinker ESP32-CAM standard version with onboard PCB antenna
ESP32-S3-CAM V3 with USB-C connector, 8 MB PSRAM, and OV2640/OV3660 support\2
ESP32-S3-CAM V3 with USB-C connector, 8 MB PSRAM, and OV2640/OV3660 support
Espressif ESP-EYE development board with OV2640 and 8 MB PSRAM\2
Espressif ESP-EYE development board with OV2640 and 8 MB PSRAM

Hardware and Software You Need

Hardware

Software

Typical use cases

DIY Security Camera

Mount any supported ESP32-CAM module and point your NVR, CCTV software, or VLC at the RTSP stream for an inexpensive, self-contained wireless camera.

Home Automation Feed

Feed the RTSP or Motion JPEG stream directly into Home Assistant, Frigate, or similar platforms for motion detection, recording, and smart home integration.

ffmpeg Recording Pipeline

Stream to ffmpeg on a local server to record footage to disk, generate time-lapses, or re-encode to a more efficient format — no extra hardware needed.

Lightweight Remote Monitoring

Poll the HTTP snapshot endpoint at intervals to retrieve a single JPEG frame, keeping bandwidth low for remote monitoring over constrained connections.

Putting Your ESP32-CAM in Download Mode

The exact procedure depends on how your board connects to your computer.

USB Type-C boards (e.g., ESP32-S3-CAM V3): Connect a USB-C cable. The board normally enters download mode automatically. If an upload fails, hold BOOT, press and release RESET, then release BOOT.

ESP32-CAM-MB piggyback board: Hold the GPIO0 button on the MB board. While holding it, briefly press the reset button on the ESP32-CAM module, then release GPIO0.

FTDI adapter: Set the adapter to 3.3 V before making any connections. Wire it to the ESP32-CAM according to the wiring diagram in the repository (assets/ESP32CAM-to-FTDI.png). After flashing, remove the wire from GPIO0 to exit download mode, then press reset to reboot normally.

Building and Flashing the Firmware

Open a terminal, clone the repository, and enter the project directory:

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

Update the Espressif platform toolchain:

pio pkg update -g -p espressif32

Build firmware for all supported boards:

pio run

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

pio run -e esp32cam_ttgo_t_journal

With the board in download mode, flash the firmware. For a specific target such as esp32cam_ai_thinker:

pio run -t upload -e esp32cam_ai_thinker

When flashing completes, remove the FTDI GPIO0 jumper (or press the reset button on the board) to reboot into normal mode. Open the serial monitor to watch startup output:

pio device monitor

Visual Studio Code users can run the same build and upload steps through Terminal → Run Task (or Ctrl+Alt+T) using the PlatformIO tasks listed in the panel.

First-Time Setup and Connecting to Streams

On first boot, the firmware starts as a Wi-Fi access point. Connect your phone or laptop to that access point, then open a browser and navigate to the configuration web server address shown in the serial monitor. Enter your Wi-Fi SSID and password, choose your desired resolution, frame rate, JPEG quality, and any camera options, then save. The device reboots and joins your network.

Once it is online, open VLC and go to Media → Open Network Stream, then enter the RTSP URL: rtsp://<ip address>:554/mjpeg/1

To watch the Motion JPEG stream in a browser, navigate to http://<ip address>/stream.

To grab a single still frame, request http://<ip address>/snapshot.

If you enabled RTSP authentication in the web interface, clients must supply credentials either in the URL or when prompted by the player. The configuration page also shows the current state of the device, Wi-Fi connection, and camera, so it doubles as a status dashboard.

Going Further and Known Limitations

Ideas to extend the build

Limitations to keep in mind

Verdict

esp32cam-rtsp is a mature, actively maintained firmware project that covers the full streaming stack — RTSP, HTTP Motion JPEG, HTTP snapshots, and OTA updates — across an unusually broad range of ESP32-CAM boards. The browser-based configuration interface removes the need to touch any code for most deployments, making it accessible to beginners while remaining practical for more advanced integrations with NVR systems and ffmpeg pipelines. The Motion-JPEG codec and ESP32 hardware constraints mean it is best suited to local network use rather than high-resolution or low-latency applications, but within those limits it delivers a solid, plug-and-stream experience.

Sources

github.comrzeldent/esp32cam-rtsp — repository & README

Facts in this article come from the project's public README and GitHub metadata at the time of writing. Images belong to their respective owners and link back to the original source.