You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-3Lines changed: 12 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,7 @@
3
3
4
4
Application for ESP32 / ESP32S3 with OV2640 / OV5640 camera to record JPEGs to SD card as AVI files and playback to browser as an MJPEG stream. The AVI format allows recordings to replay at correct frame rate on media players. If a microphone is installed then a WAV file is also created and stored in the AVI file.
5
5
The application supports:
6
+
*[RTSP Server](#rtsp) stream Video, Audio and Subtitles
6
7
*[Motion detection by camera](#motion-detection-by-camera) or PIR / radar sensor
7
8
* Time lapse recording
8
9
*[Audio Recording](#audio-recording) from I2S or PDM microphones
@@ -27,8 +28,9 @@ The ESP32 cannot support all of the features as it will run out of heap space. F
27
28
***This is a complex app and some users are raising issues when the app reports a warning, but this is the app notifying the user that there is an problem with their setup, which only the user can fix. Be aware that some clone boards have different specs to the original, eg PSRAM size. Please only raise issues for actual bugs (ERR messages, unhandled library error or crash). Thanks.
28
29
To suggest an improvement or enhancement use Discussions.***
29
30
30
-
Changes up to version 10.5.3:
31
+
Changes up to version 10.5.4:
31
32
* Stream to [NVR](#stream-to-nvr) using integration to RTSPServer library contributed by [@rjsachse](https://github.com/rjsachse).
33
+
* RTSP server now has multiple client support as well as user/pass authentication.
32
34
* Frame resolution selection mismatch corrected due to [#10801](https://github.com/espressif/arduino-esp32/issues/10801) in arduino core v3.1.0
33
35
* SD card 4 bit mode configurable (see `utilsFS.cpp`)
34
36
* Shared I2C fixed following code changes in Arduino core v3.1.1
@@ -453,7 +455,7 @@ Streaming performance depends on quality of network connection, but can be incre
453
455
454
456
#### RTSP
455
457
456
-
This requires an additional library to be installed - see [RTSPServer](https://github.com/rjsachse/RTSPServer) library for details.
458
+
This requires an additional library to be installed - see [RTSPServer](https://github.com/rjsachse/ESP32-RTSPServer) library for details. Must be version 1.3.1 or above
457
459
458
460
To integrate library with this app, set `#define INCLUDE_RTSP` to `true`.
459
461
@@ -464,7 +466,14 @@ To enable RTSP, under **Edit Config** -> **Streaming** tab, select:
464
466
465
467
Then save and reboot.
466
468
467
-
To view the stream, connect to `rtsp://<camera_ip>:554` using app supporting RTSP.
469
+
To view the stream, connect to `rtsp://<camera_ip>:<RTSPport>` using app supporting RTSP.
470
+
471
+
Or if authentication is enabled (username and password):
RTSP now supports multiple clients for multicast. You can also override this logic and enable multiple clients for all transports (TCP, UDP, Multicast) by commenting out //#define OVERRIDE_RTSP_SINGLE_CLIENT_MODE in rtsp.cpp.
475
+
However, enabling multiple clients for all transports can slow the stream down and may cause issues, so use with care. It is better to leave it for only one client if using TCP or UDP unicast for best results. For more details,
useAuth = rtspServer.setCredentials(RTSP_Name, RTSP_Pass); // Set RTSP authentication
126
134
RTSPServer::TransportType transport = determineTransportType();
127
135
rtpIp.fromString(RTP_ip);
128
136
rtspServer.transport = transport;
@@ -134,16 +142,19 @@ void prepRTSP() {
134
142
rtspServer.rtpAudioPort = rtpAudioPort;
135
143
rtspServer.rtpSubtitlesPort = rtpSubtitlesPort;
136
144
rtspServer.rtpIp = rtpIp;
145
+
rtspServer.maxRTSPClients = rtspMaxClients;
137
146
rtspServer.rtpTTL = rtpTTL;
138
147
139
148
if (transport != RTSPServer::NONE) {
140
149
if (rtspServer.init()) {
141
150
LOG_INF("RTSP server started successfully with transport%s", transportStr);
142
-
LOG_INF("Connect to: rtsp://%s:%d", WiFi.localIP().toString().c_str(), rtspServer.rtspPort);
151
+
useAuth ?
152
+
LOG_INF("Connect to: rtsp://<username>:<password>@%s:%d (credentials not shown for security reasons)", WiFi.localIP().toString().c_str(), rtspServer.rtspPort) :
153
+
LOG_INF("Connect to: rtsp://%s:%d", WiFi.localIP().toString().c_str(), rtspServer.rtspPort);
143
154
144
155
// start RTSP tasks, need bigger stack for video
145
156
if (rtspVideo) xTaskCreate(sendRTSPVideo, "sendRTSPVideo", 1024 * 5, NULL, SUSTAIN_PRI, &sustainHandle[1]);
146
-
if (rtspAudio) xTaskCreate(sendRTSPAudio, "sendRTSPAudio", 1024 * 4, NULL, SUSTAIN_PRI, &sustainHandle[2]);
157
+
if (rtspAudio) xTaskCreate(sendRTSPAudio, "sendRTSPAudio", 1024 * 5, NULL, SUSTAIN_PRI, &sustainHandle[2]);
147
158
if (rtspSubtitles) xTaskCreate(startRTSPSubtitles, "startRTSPSubtitles", 1024 * 1, NULL, SUSTAIN_PRI, &sustainHandle[3]);
0 commit comments