Skip to content

Commit 730d941

Browse files
authored
Merge pull request #54 from rzeldent/feature/http_stream
Added JPEG Motion streaming
2 parents 5dac987 + 2fdb589 commit 730d941

File tree

4 files changed

+90
-30
lines changed

4 files changed

+90
-30
lines changed

README.md

Lines changed: 46 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,26 @@
1-
# ESP32CAM-RTSP
1+
# ESP32CAM-RTSP :video_camera:
22

33
[![Platform IO CI](https://github.com/rzeldent/esp32cam-rtsp/actions/workflows/main.yml/badge.svg)](https://github.com/rzeldent/esp32cam-rtsp/actions/workflows/main.yml)
44

5-
Simple [RTSP](https://en.wikipedia.org/wiki/Real_Time_Streaming_Protocol) server.
6-
Easy configuration through the web interface.
5+
Simple [RTSP](https://en.wikipedia.org/wiki/Real_Time_Streaming_Protocol), [HTTP JPEG Streamer](https://en.wikipedia.org/wiki/Motion_JPEG) and image server with configuration through the web interface.
76

8-
Flashing this software on a ESP32CAM module will make it a **RTSP streaming camera** server.
9-
The RTSP protocol is an industry standard and allows many CCTV systems and applications (like for example [VLC](https://www.videolan.org/vlc/)) to connect directly to the ESP32CAM camera stream.
10-
It is also possible to stream directly to a server using [ffmpeg](https://ffmpeg.org).
11-
This makes the module a camera server allowing recording and the stream can be stored on a disk and replayed later.
7+
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**.
8+
9+
Supported protocols
10+
11+
- :white_check_mark: RTSP
12+
The RTSP protocol is an industry standard and allows many CCTV systems and applications (like for example [VLC](https://www.videolan.org/vlc/)) to connect directly to the ESP32CAM camera stream.
13+
It is also possible to stream directly to a server using [ffmpeg](https://ffmpeg.org).
14+
This makes the module a camera server allowing recording and the stream can be stored on a disk and replayed later.
15+
The URL is rtsp://<ip address>:554/mjpeg/1
16+
17+
- :white_check_mark: HTTP Motion JPEG
18+
The HTTP JPEG streamer makes it possible to watch the camera stream directly in your browser.
19+
The URL is http://<ip address>/stream
20+
21+
- :white_check_mark: HTTP image
22+
The HTTP Image returns an HTTP JPEG image of the camera.
23+
The URL is http://<ip address>/snapshot
1224

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

@@ -20,7 +32,7 @@ This software supports the following ESP32-CAM (and alike) modules:
2032

2133
![ESP32CAM module](assets/ESP32-CAM.jpg)
2234

23-
This software provides a **configuration web server**, that can be used to:
35+
The software provides a **configuration web server**, that can be used to:
2436

2537
- Provide information about the state of the device, wifi connection and camera,
2638
- Set the WiFi parameters,
@@ -31,6 +43,7 @@ This software provides a **configuration web server**, that can be used to:
3143
- Select the frame rate,
3244
- Select the JPEG quality
3345
- Enable the use of the PSRAM
46+
- Set the number of frame buffers
3447
- Configure the camera options:
3548
- Brightness
3649
- Contrast
@@ -186,12 +199,21 @@ In case changes have been made to the configuration, this is shown and the possi
186199
Clicking on the ```change configuration``` button will open the configuration. It is possible that a password dialog is shown before entering.
187200
If this happens, for the user enter 'admin' and for the password the value that has been configured as the Access Point password.
188201

189-
## Connecting to the RTSP stream
202+
## Connecting to the RTSP stream :video_camera:
190203

191204
RTSP stream is available at: [rtsp://esp32cam-rtsp.local:554/mjpeg/1](rtsp://esp32cam-rtsp.local:554/mjpeg/1).
192205
This link can be opened with for example [VLC](https://www.videolan.org/vlc/).
193206

194-
:warning: **Please be aware that there is no password present on the stream!**
207+
## Connecting to the JPEG motion server :video_camera:
208+
209+
The JPEG motion server server is available using a normal web browser at: [http://esp32cam-rtsp.local:/stream](http://esp32cam-rtsp.local/stream).
210+
211+
## Connecting to the image server :camera:
212+
213+
The image server server is available using a normal web browser at: [http://esp32cam-rtsp.local:/snapshot](http://esp32cam-rtsp.local/snapshot).
214+
215+
:bangbang: **Please be aware that there is no password present!**.
216+
Everybody with access to the device can see the streams or images! Beware of :trollface:!
195217

196218
## API
197219

@@ -238,19 +260,23 @@ If no v parameter is present, it will be set to the value of the flash LED inten
238260
- When finished configuring for the first time and the access point is entered, disconnect from the wireless network provided by the device.
239261
This should reset the device and connect to the access point.
240262
Resetting is also a good alternative...
263+
- There are modules that have no or faulty PSRAM (despite advertised as such).
264+
This can be the case if the camera fails to initialize.
265+
It might help to disable the use of the PSRAM and reduce the buffers and the screen size.
241266

242267
### Power
243268

244269
Make sure the power is 5 volts and stable, although the ESP32 is a 3.3V module, this voltage is created on the board.
245270
If not stable, it has been reported that restarts occur when starting up (probably when power is required for WiFi).
246271
The software disables the brown out protection so there is some margin in the voltage.
272+
Some people suggest to add a capacitor over the 5V input to stabilize the voltage.
247273

248-
### PSRAM / Buffers / JPeg quality
274+
### PSRAM / Buffers / JPEG quality
249275

250276
Some esp32cam modules have additional ram on the board. This allows to use this ram as frame buffer.
251277
The availability of PSRAM can be seen in the HTML status overview.
252278

253-
Not all the boards areq equipped with PSRAM:
279+
Not all the boards are equipped with PSRAM:
254280

255281
| Board | PSRAM |
256282
|--- |--- |
@@ -262,23 +288,23 @@ Not all the boards areq equipped with PSRAM:
262288
| WROVER KIT | Yes |
263289

264290
Depending on the image resolution, framerate and quality, the PSRAM must be enabled and/or the number of frame buffers increased to keep up with the data generated by the sensor.
265-
There are (a lot of?) boards around with faulty PSRAM. If the camera fails to initialize, this might be a reason.
291+
There are (a lot of?) boards around with faulty PSRAM. If the camera fails to initialize, this might be a reason. See on [Reddit](https://www.reddit.com/r/esp32/comments/z2hyns/i_have_a_faulty_psram_on_my_esp32cam_what_should/).
266292
In this case disable the use of PSRAM in the configuration and do not use camera modes that require PSRAM,
267293

268-
For the setting JPeg quality, a lower number means higher quality.
294+
For the setting JPEG quality, a lower number means higher quality.
269295
Be aware that a very high quality (low number) can cause the ESP32 cam to crash or return no image.
270296

271297
The default settings are:
272298

273299
- No PSRAM
274300
- SVGA (800x600)
275301
- 1 frame buffer
276-
- JPeg quality 12
302+
- JPEG quality 12
277303

278304
- With PSRAM
279305
- UXGA (1600x1200)
280306
- 2 frame buffers
281-
- jpeg quality 10
307+
- JPEG quality 10
282308

283309
### Camera module
284310

@@ -287,10 +313,13 @@ Make sure it is connected the right way around (Camera pointing away from the bo
287313

288314
## Credits
289315

290-
esp32cam-ready depends on PlatformIO, Bootstrap5 and Micro-RTSP by Kevin Hester.
316+
esp32cam-rtsp depends on PlatformIO, Bootstrap 5 and Micro-RTSP by Kevin Hester.
291317

292318
## Change history
293319

320+
- March 2023
321+
- Added options to set PSRAM / Frame buffers
322+
- Added JPEG Motion streaming
294323
- Feb 2023
295324
- Added additional settings for camera configuration
296325
- Nov 2022

html/index.html

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -277,28 +277,27 @@ <h5 class="card-header">Special URLs / API</h5>
277277
<div class="card-body">
278278
<div class="row">
279279
<span>
280-
The camera RTSP stream can be found at:
281-
<a href="rtsp://{{IpV4}}:{{RtspPort}}/mjpeg/1">rtsp://{{IpV4}}:{{RtspPort}}/mjpeg/1</a>
280+
RTSP camera stream: <a href="rtsp://{{IpV4}}:{{RtspPort}}/mjpeg/1">rtsp://{{IpV4}}:{{RtspPort}}/mjpeg/1</a>
282281
</span>
283282
</div>
284283
<div class="row">
285284
<span>
286-
A snapshot of the camera can be found at:
287-
<a href="http://{{IpV4}}/snapshot">http://{{IpV4}}/snapshot</a>
285+
JPEG Motion stream: <a href="http://{{IpV4}}/stream" target="_blank">http://{{IpV4}}/stream</a>
288286
</span>
289287
</div>
290288
<div class="row">
291289
<span>
292-
The intensity of the flash led (0-255) can be controlled using:
293-
<a href="http://{{IpV4}}/flash?v=0">http://{{IpV4}}/flash?v=value</a>.
294-
Authentication is required.
290+
Snapshot of the camera: <a href="http://{{IpV4}}/snapshot " target="_blank">http://{{IpV4}}/snapshot</a>
295291
</span>
296292
</div>
297293
<div class="row">
298294
<span>
299-
Restarting the camera can be done using:
300-
<a href="http://{{IpV4}}/restart">http://{{IpV4}}/restart</a>.
301-
Authentication is required.
295+
Intensity of the flash led (0-255): <a href="http://{{IpV4}}/flash?v=0">http://{{IpV4}}/flash?v=0</a>. Authentication is required.
296+
</span>
297+
</div>
298+
<div class="row">
299+
<span>
300+
Restart the camera: <a href="http://{{IpV4}}/restart">http://{{IpV4}}/restart</a>. Authentication is required.
302301
</span>
303302
</div>
304303
</div>

0 commit comments

Comments
 (0)