Here's what to expect

Plus, a quick video demo

Let's start with an introduction to the ESP32 camera boards

The ESP-EYE and ESP32-CAM are from the Espressif ESP-32 MCU series. 

The ESP-EYE and ESP32-CAM modules represents a cost-effective solution to achieve Wi-Fi connectivity and GPIO functionality. The ESP32 chip, integral to both the ESP-EYE and ESP32-CAM, offers 520KB of RAM, making it a powerful component for a range of applications. The ESP-EYE enhances this with an additional 8 Mbytes of external PSRAM and 4 Mbytes of flash memory, providing a robust platform for complex tasks and data storage. It needs to be said that we have chosen the ESP-EYE board for this demo even though it is one of the more expensive ESP32-based camera boards. 

The reason is that the ESP-EYE has USB access built-in as opposed to the ESP32-CAM. The ESP32-CAM is very similar to the ESP-EYE but lacks built in USB support. Instead, it has a UART interface exposed on the PINs, so you need to strap it to a USB-to-UART cable yourself.

Video and imaging capabilities of the ESP32 camera

The ESP32 chip is equipped with a built-in JPEG encoder and boasts a dual-core processor, facilitating efficient image processing and multitasking. Looking ahead, the ESP32-P4 is expected to feature H264 video encoding, further expanding the possibilities for video applications. Using the hardware accelerated JPEG encoder a RTSP server can be created that streams JPEG-compress video feeds. See here for further information on RTP JPEG streams.

Practical applications

This ESP-32 camera demo is ideally suited for low-cost consumer products where video or imaging functions are secondary yet critical features. Examples include pet feeders, bird cages, household appliances like ovens and refrigerators, and even 3D printers equipped with surveillance capabilities.

The architecture of the demo

Main components:

  • ESP-32 camera device
  • Nabto video app running on a smartphone iOS or Android
  • Nabto Platform for remote access mediation (using techniques like P2P / Real Time Communication)

Before starting the demo

The way this demo works is by pairing an IoT device (in this case the ESP-32 camera) with a mobile device or other device via the Nabto platform and creating a connection between the two. Specifically, this happens via the exchange of a device ID and product ID in the Nabto platform and the exchange of public keys, similar to Secure Socket Shell (SSH) applications. You can read our guides to security in the Nabto platform for more information.

Nabto allows you to remotely acess a Real Time Streaming Protocol video stream using an existing video player component or application, in this case, the Nabto video application, using Transmission Control Protocol (TCP) tunneling. The TCP tunnel ensures a secure connection even through firewalls without any added hassle. 

TCP is the main transmission protocol for a lot of network-based applciations, and it’s commonly used for IoT video cameras as well. Tunneling allows you to securely transmit sensitive data with minimal latency. For more information on TCP tunneling, read the accompanying doc or our recent blog post

Architecture of the video streaming software components

This demo uses an RTSP stream, which means that it requires the following video streaming software components:

  • ESP-EYE consisting of:
    • A small RTSP server that creates a RTSP feed from camera sensor data.
    • A Nabto TCP tunnel server end-point that connects to the RTSP server internally
  • The Nabto video app consisting of:
    • Nabto connection client libraries
    • Nabto client tunnel end-point
    • Video player that connects to the tunnel end-point
  • Local connections between app and ESP-32 camera using mDNS discovery
  • The Nabto platform that enables remote access from the Video app to the ESP-EYE

Requirements for the demo 

To complete this ESP-32 camera demo, some hardware and software requirements must be in place....

Read more »