ESP32-CAM as RTSP camera. Not working.

esp_man
Posts: 25
Joined: Tue Mar 21, 2023 12:04 pm

ESP32-CAM as RTSP camera. Not working.

Postby esp_man » Thu Sep 18, 2025 9:15 am

Hello.
I need connect ESP32-CAM to CCTV recorder, so I need RTSP server, not the popular HTTP one.
I also used the HTTP version, and it worked well (of course only in browser, not with the CCTV recorder). So module itself is electrically fine.
But now I need RTSP, so I'm trying to use example project from this library:
https://www.arduinolibraries.info/libra ... tsp-server
I changed only SSID/PASSWORD, and disable audio.
Also I change model into "define CAMERA_MODEL_AI_THINKER", because I have PCB looking like this:
Image

After flashing the firmware, the module displays this at startup, indicating that it is working (at least in some way):

Code: Select all

Connecting to WiFi...
Connecting to WiFi...
Connected to WiFi
Camera Setup Complete
Camera Quality is: 10
RTSP server started successfully using default values, Connect to rtsp://192.168.2.57:554/

==== Device Information ====
ESP32 Chip ID: XXXXXXXXXX
Flash Chip Size: 4 MB
PSRAM Size: 2 MB

==== Sketch Information ====
Sketch Size: 1022 KB
Free Sketch Space: 3 MB
Sketch MD5: 3834994b490d37cad9dd5c17f3d116cd

==== Task Information ====
Total tasks: 13

==== Network Information ====
IP Address: 192.168.2.57
MAC Address: XX:XX:XX:XX:XX:XX
SSID: TP-LINK_XXXXXX
RSSI: -51 dBm

==== RTSP Server Information ====
RTSP Port: 554
Sample Rate: 0
Transport Type: 4
Video Port: 5430
Audio Port: 5432
Subtitles Port: 5434
RTP IP: 239.255.0.1
RTP TTL: 64

RTSP Address: rtsp://192.168.2.57:554
==============================
The module responds to pings at the address 192.168.2.57.
But the problem is that CCTV recorder could not find the module. (of course all the equipment are on the same local network)
Also I trying to log into module using web browser, or receive stream using VLC (at port 554 and also 5430). Without success.
Is this ESP module/code not working properly, or am I perhaps configuring something incorrectly in VLC?
Or maybe CAMERA_MODEL_AI_THINKER is not proper setting for this board?

ahsrabrifat
Posts: 201
Joined: Sat Jan 18, 2025 2:31 pm

Re: ESP32-CAM as RTSP camera. Not working.

Postby ahsrabrifat » Sun Sep 21, 2025 5:43 pm

The default multicast RTP (239.255.0.1) does not work with all clients. Many CCTV NVRs and even VLC expect unicast RTP over TCP/UDP, not multicast.

Some builds of VLC won’t auto-negotiate properly unless the URL is exact.
Before blaming the NVR, confirm that VLC can actually see the ESP32’s RTSP.
Open VLC > Media > Open Network Stream.
Enter rtsp://192.168.2.57:554/
or, if that fails:
rtsp://192.168.2.57:554/mjpeg/1
rtsp://192.168.2.57:554/stream
If you see “connection refused”, the ESP32 is not actually listening.
If you see “no suitable decoder”, the ESP32 might be sending a format your VLC build doesn’t like.If you confirm that VLC can’t open the stream,You can try a known working ESP32-CAM RTSP firmware:
https://github.com/rzeldent/esp32cam-rtsp
https://github.com/balena-labs-projects/video-capture
Here is a good project based on the ESP32-CAM that you may find interesting. https://www.pcbway.com/project/sharepro ... 8757c.html

esp_man
Posts: 25
Joined: Tue Mar 21, 2023 12:04 pm

Re: ESP32-CAM as RTSP camera. Not working.

Postby esp_man » Mon Sep 29, 2025 10:39 am

Thanks for reply.
Enter rtsp://192.168.2.57:554/
or, if that fails:
rtsp://192.168.2.57:554/mjpeg/1
rtsp://192.168.2.57:554/stream
VLC doesn't want to connect at any of these addresses.

lbernstone
Posts: 1131
Joined: Mon Jul 22, 2019 3:20 pm

Re: ESP32-CAM as RTSP camera. Not working.

Postby lbernstone » Mon Sep 29, 2025 4:37 pm

You need to put in the address your device gets from dhcp (or manually configured). That was an example URL from his network.

esp_man
Posts: 25
Joined: Tue Mar 21, 2023 12:04 pm

Re: ESP32-CAM as RTSP camera. Not working.

Postby esp_man » Tue Sep 30, 2025 7:06 am

Are you saying that the address provided in the UART terminal by the ESP module is not the correct address?
Also IP scanner confirms that this module responds at that address.
If this address is not valid, where can I find the correct one?

Who is online

Users browsing this forum: ChatGPT-User, PerplexityBot and 4 guests