Skip to content

Commit

Permalink
Merge branch 'feature/seeed_xiao_esp32s3' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
rzeldent committed Dec 18, 2023
2 parents f68e347 + 9ecdd1c commit 6850c2c
Show file tree
Hide file tree
Showing 26 changed files with 211 additions and 282 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,24 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up python
uses: actions/setup-python@v3
with:
python-version: '3.x'
architecture: 'x64'
submodules: 'true'
- uses: actions/cache@v3
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install PlatformIO
run: python -m pip install platformio
- name: Build firmware
run: platformio run
- name: Archive
uses: actions/upload-artifact@v3
with:
name: firmware.bin
name: firmwares.zip
path: .pio/build/*/firmware.bin
48 changes: 27 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ Flashing this software on a ESP32CAM module will make it a **RTSP streaming came

Supported protocols

- :white_check_mark: RTSP
- RTSP
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.
It is also possible to stream directly to a server using [ffmpeg](https://ffmpeg.org).
This makes the module a camera server allowing recording and the stream can be stored on a disk and replayed later.
The URL is rtsp://<ip address>:554/mjpeg/1

- :white_check_mark: HTTP Motion JPEG
- 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

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

Expand All @@ -36,15 +36,12 @@ This software supports the following ESP32-CAM (and alike) modules:
- WROVER-KIT
- M5STACK

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

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 board type,
- Select the image size,
- Select the frame rate,
- Select the JPEG quality
Expand Down Expand Up @@ -83,25 +80,30 @@ It advertises HTTP (port 80) and RTSP (port 554)
- USB to Serial (TTL level) converter, piggyback board ESP32-CAM-MB or other way to connect to the device,
- [**PlatformIO**](https://platformio.org/) software (free download)

## 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](https://visualstudio.microsoft.com).
More information can be found at: [https://docs.platformio.org/en/latest/installation.html](https://docs.platformio.org/en/latest/installation.html) below the basics.
## Boards

### Debian based systems command-line install
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:

Install platformIO
| Board | Configuration | Image | CPU | RAM | Camera | Site |
|--- |--- |--- |--- |--- |--- |--- |
| Espressif ESP32-Wropver CAM | | <img src="assets/boards/esp32-wrover-cam.jpg" height="100" /> | ESP32 | 520KB SRAM 4MB PSRAM | OV2640 | |
| AI-Thinker ESP32-CAM | ai_thinker_esp32cam | <img src="assets/boards/ai-thinker-esp32-cam-ipex.jpg" height="100" /> <img src="assets/boards/ai-thinker-esp32-cam.jpg" height="100" /> | ESP32-S / 160Mhz | 520KB SRAM 4MB PSRAM | OV2640 | https://docs.ai-thinker.com/en/esp32-cam |
| Espressif ESP-EYE | | <img src="assets/boards/espressif-esp-eye.jpg" height="100" /> | ESP32 | 520KB SRAM 4MB PSRAM | OV2640 | |
| Espressif ESP-S3-EYE| | <img src="assets/boards/espressif-esps3-eye.jpg" height="100" /> | ESP32-S3 | 520KB SRAM 4MB PSRAM | OV2640 | https://www.espressif.com/en/products/devkits/esp-eye/overview |
| LilyGo camera module| | <img src="assets/boards/lilygo-camera-module.jpg" height="100" /> | ESP32 Wrover | 520KB SRAM 4MB PSRAM | OV2640 / OV5640
| LilyGo Simcam| | <img src="assets/boards/lilygo-simcam.jpg" height="100" /> | | | OV2640 | |
| LilyGo TTGO-T Camera| | <img src="assets/boards/lilygo-ttgo-t-camera.jpg" height="100" /> || | OV2640 | |
| M5 Stack Camera| | <img src="assets/boards/m5stack-esp32-camera.jpg" height="100" /> ||| OV2640 | |
| Seeed studio Xiao ESPS3 Sense| seeed_xiao_esp32s3_sense | <img src="assets/boards/seeed-studio-xiao-esp32s3-sense.jpg" height="100" /> | ESP32-S3 | 520KB SRAM 4MB PSRAM | OV2640 | |

```sh
sudo apt-get install python-pip
sudo pip install platformio
pio upgrade
```
## Installing and running PlatformIO

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

Install [**Visual Studio code**](https://code.visualstudio.com) and install the PlatformIO plugin.
For command line usage Python and PlatformIO-Core is sufficient.
Install [**Visual Studio Code**](https://code.visualstudio.com) and install the PlatformIO plugin.

## Putting the ESP32-CAM in download mode

Expand Down Expand Up @@ -290,7 +292,7 @@ Not all the boards are equipped with PSRAM:
| ESP32CAM (USB-C) | No |
| AI THINKER | Yes |
| TTGO T-CAM | No |
| M5 STACK| | No |
| M5 STACK | No |
| WROVER KIT | Yes |

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.
Expand Down Expand Up @@ -323,6 +325,10 @@ esp32cam-rtsp depends on PlatformIO, Bootstrap 5 and Micro-RTSP by Kevin Hester.

## Change history

- Oktober 2023
- Added support for Seeed Xiao esp32s3
- New build system
- Updated documentation
- March 2023
- Added options to set PSRAM / Frame buffers
- Added JPEG Motion streaming
Expand Down
Binary file removed assets/ESP32-CAM-MB.jpg
Binary file not shown.
Binary file removed assets/ESP32-CAM.jpg
Binary file not shown.
Binary file added assets/boards/ai-thinker-esp32-cam-ipex.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/boards/ai-thinker-esp32-cam-mb.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/boards/ai-thinker-esp32-cam.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/boards/esp32-wrover-cam.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/boards/espressif-esp-eye.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/boards/espressif-esps3-eye.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/boards/lilygo-camera-module.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/boards/lilygo-simcam.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/boards/lilygo-ttgo-t-camera.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/boards/m5stack-esp32-camera.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions generate_html.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
. python3 -m pip install --upgrade pip setuptools wheel
. python3 -m pip install minify-html

. python3 ./minify.py ./html/index.html ./html/index.min.html
. python3 ./minify.py ./html/restart.html ./html/restart.min.html
. python3 ./minify.py ./html/index.html ./html/index.min.html
3 changes: 1 addition & 2 deletions generate_html.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
python3 -m pip install --upgrade pip setuptools wheel
python3 -m pip install minify-html

python3 ./minify.py ./html/index.html ./html/index.min.html
python3 ./minify.py ./html/restart.html ./html/restart.min.html
python3 ./minify.py ./html/index.html ./html/index.min.html
34 changes: 5 additions & 29 deletions html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,11 @@ <h3 class="text-center">
</h3>
</div>

{{#ConfigChanged}}
<div class="alert alert-danger">
<h3 class="text-center">
The configuration has been changed.<br>
It is recommended to restart the device.<br><br>
<button type="button" class="btn btn-danger" onclick="location.href='restart'">Restart</button>
</h3>
</div>
{{/ConfigChanged}}

<h2 class="text-center">ESP32</h2>
<div class="flex-table">
<div class="row">Board type:</div>
<div>{{BoardType}}</div>
<div class="row">SDK Version:</div>
<div>{{SDKVersion}}</div>
<div class="row">CPU model:</div>
Expand All @@ -135,8 +129,6 @@ <h2 class="text-center">Diagnostics</h2>
<div class="flex-table">
<div class="row">Uptime:</div>
<div>{{Uptime}}</div>
<div class="row">Chip temperature:</div>
<div>{{Temperature}} &deg;C</div>
<div class="row">RTSP sessions:</div>
<div>{{NumRTSPSessions}}</div>
<div class="row">Free heap:</div>
Expand All @@ -145,14 +137,6 @@ <h2 class="text-center">Diagnostics</h2>
<div>{{MaxAllocHeap}}</div>
</div>

<h2 class="text-center">Peripheral</h2>
<div class="flex-table">
<div class="row">Board type:</div>
<div>{{BoardType}}</div>
<div class="row">LED intensity:</div>
<div>{{LedIntensity}} [0-100]</div>
</div>

<h2 class="text-center">Network</h2>
<div class="flex-table">
<div class="row">Host name:</div>
Expand Down Expand Up @@ -191,10 +175,6 @@ <h2 class="text-center">Camera</h2>
<div>{{FrameSize}}</div>
<div class="row">JPEG quality:</div>
<div>{{JpegQuality}} [1-100]</div>
<div class="row">Enable PSRAM:</div>
<div>{{#EnablePSRAM}}Enabled{{/EnablePSRAM}}{{^EnablePSRAM}}Disabled{{/EnablePSRAM}}</div>
<div class="row">Number of frame buffers:</div>
<div>{{FrameBuffers}}</div>
<div class="row">Brightness:</div>
<div>{{Brightness}} [-2,2]</div>
<div class="row">Contrast:</div>
Expand Down Expand Up @@ -262,13 +242,9 @@ <h2 class="text-center">Special URLs / API</h2>
<div class="row">RTSP camera stream:</div>
<div><a href="rtsp://{{IpV4}}:{{RtspPort}}/mjpeg/1">rtsp://{{IpV4}}:{{RtspPort}}/mjpeg/1</a></div>
<div class="row">JPEG Motion stream:</div>
<div><a href="http://{{IpV4}}/stream" target="_blank">http://{{IpV4}}/stream</a></div>
<div><a href="http://{{IpV4}}/stream" target="_blank" rel="noopener">http://{{IpV4}}/stream</a></div>
<div class="row">Snapshot of the camera:</div>
<div><a href="http://{{IpV4}}/snapshot " target="_blank">http://{{IpV4}}/snapshot</a> </div>
<div class="row">Intensity of the flash led (0-255):</div>
<div><a href="http://{{IpV4}}/flash?v=0">http://{{IpV4}}/flash?v=0</a> (Authentication required)</div>
<div class="row">Restart the camera:</div>
<div><a href="http://{{IpV4}}/restart">http://{{IpV4}}/restart</a> (Authentication required)</div>
<div><a href="http://{{IpV4}}/snapshot " target="_blank" rel="noopener">http://{{IpV4}}/snapshot</a> </div>
</div>

</body>
Expand Down
Loading

0 comments on commit 6850c2c

Please sign in to comment.