XCAM is the LAN-ready ESP32 camera node for the XTOC video ISR page. It is built to make multi-camera field deployments straightforward: flash a camera, give it a site-friendly name, join it to the same network as the rest of the stack, and hand stable RTSP, MJPEG, or snapshot URLs to XTOC.
XTOC is the operator-facing video ISR surface in the ecosystem. XCAM is the edge collection layer underneath it: low-cost cameras on the LAN, fast browser access for local validation, and transport formats that slot directly into surveillance, ISR, and recording workflows without adding translation services in the middle.
See the XTOC suite: XTOC Tactical Operations Center Software Suite
For a fast XCAM bring-up, start with the standard ESP32-CAM board:
- Buy the board: ESP32-CAM board on Amazon
- Optional case: ESP32-CAM case on Thingiverse
These build photos show XCAM in a muted tactical-painted enclosure and staged for a helmet-mounted FPV streaming use case. The same local RTSP, MJPEG, and snapshot URLs can feed XTOC Video ISR or another trusted LAN viewer while the camera rides on a helmet mount.
| Painted XCAM enclosure | Helmet mount fit check |
|---|---|
![]() |
![]() |
| Helmet-mounted FPV view | Field kit layout |
![]() |
![]() |
Out of the box, each flashed node boots with a unique default identity such as xcam-a1b2c3. That matters when several units share the same LAN:
- each camera exposes a different setup SSID during provisioning
- each camera advertises a different
.localhostname after joining WiFi - each camera can be renamed to an operator-friendly location such as
xcam-east-gateorxcam-motorpool-2 - each camera presents stable URLs that can be copied directly into the XTOC video ISR page
Flashing this software on an ESP32-CAM module turns it into a compact RTSP streaming camera, HTTP Motion JPEG streamer, and HTTP snapshot server with a browser-based configuration interface.
- Flash one camera at a time.
- Join the camera's temporary WiFi network, which defaults to
xcam-<suffix>. - Open the config page and set WiFi credentials, board type, and the camera's permanent thing name.
- Use a location-based naming pattern that XTOC operators can understand immediately, such as
xcam-front-gate,xcam-yard-north, orxcam-drone-bench. - After reboot, add the camera to XTOC using one of the URLs shown on the status page:
rtsp://<thing-name>.local:554/mjpeg/1http://<thing-name>.local/streamhttp://<thing-name>.local/snapshot
If .local name resolution is not available on the target network, the status page also exposes IPv4 fallback URLs that can be used with DHCP reservations or static addressing.
-
RTSP The RTSP protocol is an industry standard and allows CCTV systems and applications such as VLC to connect directly to the XCAM stream. It is also possible to stream directly to a server using ffmpeg. This makes the module a camera server that can be recorded and replayed later. The URL is
rtsp://<thing-name>.local:554/mjpeg/1 -
HTTP Motion JPEG The HTTP MJPEG streamer makes it possible to watch the camera stream directly in your browser. The URL is
http://<thing-name>.local/stream -
HTTP image The HTTP Image returns an HTTP JPEG image of the camera. The URL is
http://<thing-name>.local/snapshot
This software supports the following ESP32-CAM (and alike) modules:
- AI THINKER
- EspressIf ESP-EYE
- EspressIf ESP32S2-CAM
- EspressIf ESP32S3-CAM-LCD
- EspressIf ESP32S3-EYE
- Freenove WROVER KIT
- M5STACK ESP32CAM
- M5STACK_PSRAM
- M5STACK_UNITCAM
- M5STACK_UNITCAMS3
- M5STACK_V2_PSRAM
- M5STACK_PSRAM
- M5STACK_WIDE
- M5STACK M5PoECAM-W
- M5STACK Timer CAM (Original and X)
- M5STACK
- Seeed Studio XIAO ESP32S3 SENSE
- TTGO T-CAMERA
- TTGO T-JOURNAL
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 thing name used for the camera identity, local hostname, and XTOC-facing URLs,
- Set the WiFi parameters,
- Set the timeout for connecting to the access point,
- Set an access password,
- Select the image size,
- Select the frame rate,
- Select the JPEG quality
- Enable the use of the PSRAM
- Set the number of frame buffers
- Configure the camera options:
- Brightness
- Contrast
- Saturation
- Special effect (Normal, Negative, Gray-scale, Red/Green/Blue tint, Sepia)
- White balance
- Automatic White Balance gain
- Wite Balance mode
- Exposure control
- Auto Exposure (dsp)
- Auto Exposure level
- Manual exposure value
- Gain control
- Manual gain control
- Auto gain ceiling
- Black pixel correction
- White pixel correction
- Gamma correction
- Lens correction
- Horizontal mirror
- Vertical flip
- Downside enable
- Color bar
- Configure camera-frame motion alerts for XTOC Sentinel ingestion:
- XTOC MANET bridge URL
- Sentinel label, node ID, and location
- Motion sample interval, pixel delta, area threshold, consecutive-hit count, cooldown, and bridge timeout
The software also includes mDNS so each camera is easy to discover on the local network. It advertises HTTP on port 80 and RTSP on port 554.
Motion alerts use the camera image itself. When enabled, XCAM compares a low-resolution digest of sampled frames and posts an XTOC T=11 SENTINEL alert packet to the configured MANET bridge URL, usually http://<xtoc-laptop-lan-ip>:8095/send.
- ESP32-CAM module or similar,
- USB to Serial (TTL level) converter, piggyback board ESP32-CAM-MB or other way to connect to the device,
- PlatformIO software (free download)
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:
| Board | Image | CPU | SRAM | Flash | PSRAM | Camera | Site | |
|---|---|---|---|---|---|---|---|---|
| Espressif ESP32-Wrover CAM | ![]() |
ESP32 | 520KB | 4Mb | 4MB | OV2640 | ||
| AI-Thinker ESP32-CAM | ![]() |
ESP32 | 520KB | 4Mb | 4MB | OV2640 | https://docs.ai-thinker.com/esp32-cam | |
| Espressif ESP-EYE | ![]() |
ESP32 | 520KB | 4Mb | 4MB | OV2640 | ||
| Espressif ESP-S3-EYE | ![]() |
ESP32-S3 | 520KB | 4Mb | 4MB | OV2640 | https://www.espressif.com/en/products/devkits/esp-eye/overview | |
| LilyGo camera module | ![]() |
ESP32 Wrover | 520KB | 4Mb | 4MB | OV2640 / OV5640 | ||
| LilyGo Simcam | ![]() |
OV2640 | ||||||
| LilyGo TTGO-T Camera | ![]() |
OV2640 | ||||||
| M5Stack ESP32CAM | ![]() |
ESP32 | 520Kb | 4Mb | - | OV2640 | Microphone | https://docs.m5stack.com/en/unit/esp32cam |
| M5Stack UnitCam | ![]() |
ESP32-WROOM-32E | 520KB | 4Mb | - | OV2640 | https://docs.m5stack.com/en/unit/unit_cam | |
| M5Stack Camera | ![]() |
ESP32 | 520Kb | 4Mb | - | OV2640 | https://docs.m5stack.com/en/unit/m5camera | |
| M5Stack Camera PSRAM | ![]() |
ESP32 | 520Kb | 4Mb | 4Mb | OV2640 | https://docs.m5stack.com/en/unit/m5camera | |
| M5Stack UnitCamS3 | ![]() |
ESP32-S3-WROOM-1-N16R8 | 520Kb | 16Mb | 8Mb | OV2640 | https://docs.m5stack.com/en/unit/Unit-CamS3 | |
| Seeed studio Xiao ESP32S3 Sense | ![]() |
ESP32-S3R8 | 520KB | 8Mb | 8MB | OV2640 | Microphone | https://www.seeedstudio.com/XIAO-ESP32S3-Sense-p-5639.html |
PlatformIO is available for all major operating systems: Windows, Linux and MacOS. It is also provided as a plugin to Visual Studio Code. More information can be found at: https://docs.platformio.org/en/latest/installation.html below the basics.
Install Visual Studio Code and install the PlatformIO plugin.
When using the ESP32-CAM-MB board, press and hold the GP0 button on the ESP32-CAM-MB board. Then press short the reset button (on the inside) on the ESP32-CAM board and release the GP0 button. This will put the ESP32-CAM board in download mode.
When using an FTDI adapter, make sure the adapter is set to 3.3 volt before connecting. Use the wiring schema below.
After programming remove the wire to tge GPIO0 pin to exit the download mode.
Open a command line or terminal window and clone this repository from GitHub.
git clone https://github.com/MKme/xcam.gitGo into the folder.
cd xcamNext, the firmware has to be build and deployed to the ESP32. There are two flavours to do this; using the command line or the graphical interface of Visual Studio Code.
Make sure you have the latest version of the Espressif toolchain.
pio pkg update -g -p espressif32First the source code has to be compiled to build all targets
pio runif only a specific target is required, for example the esp32cam_ttgo_t_journal type:
pio run -e esp32cam_ttgo_t_journalWhen finished, firmware has to be uploaded. Make sure the ESP32-CAM is in download mode (see previous section) and type:
pio run -t uploador, again, for a specific target, for example esp32cam_ai_thinker
pio run -t upload -e esp32cam_ai_thinkerWhen done remove the jumper when using a FTDI adapter or press the reset button on the ESP32-CAM. To monitor the output, start a terminal using:
pio device monitorOpen the project in a new window. Run the following tasks using the Terminal -> Run Task or CTRL+ALT+T command in the menu (or use the icons below on the toolbar). Make sure the ESP32-CAM is in download mode during the uploads.
- PlatformIO: Build (esp32cam)
- PlatformIO: Upload (esp32cam)
To monitor the behavior run the task, run: PlatformIO: Monitor (esp32cam)
After programming the ESP32, there is no configuration present. This needs to be added. To connect initially to the device, open the WiFi connections and select the WiFi network / access point shown as xcam-<suffix>. Initially there is no password present.
After connecting, the browser should automatically open the status page. If this does not happen automatically, connect to http://192.168.4.1. This page will display the current settings and status. On the bottom, there is a link to the config. Click on this link.
This link brings up the configuration screen when connecting for the first time.
Configure at least:
- The thing name. This should be unique per camera and ideally match the physical position that XTOC operators will use.
- The access point to connect to. No dropdown is present to show available networks.
- A password for accessing the Access Point (AP) when starting. This is required.
- The ESP32-CAM board type.
When finished press Apply to save the configuration. The screen will redirect to the status screen.
Here it is possible to reboot the device so the settings take effect.
It is also possible to restart manually by pressing the reset button.
After the initial configuration and the device is connected to an access point, the device can be configured over HTTP.
When a connection is made to http://<thing-name>.local the status screen is shown.
In case changes have been made to the configuration, this is shown and the possibility to restart is given.
Clicking on the change configuration button will open the configuration. It is possible that a password dialog is shown before entering.
If this happens, enter admin as the user and use the configured Access Point password.
RTSP stream is available at rtsp://<thing-name>.local:554/mjpeg/1.
This link can be opened with for example VLC.
The JPEG motion server is available using a normal web browser at http://<thing-name>.local/stream.
The image server is available using a normal web browser at http://<thing-name>.local/snapshot.
The XCAM status page also shows IPv4 fallback URLs for environments where .local name resolution is unavailable.
!
There is a minimum API present to perform some tasks using HTTP requests. For some requests authentication is required.
The authentication used is basic authentication. The user is always admin and the password the access point key.
If using a browser, remember that the authentication is stored in the browser session so needs to be entered only once.
The URLs are below:
Calling this URL will restart the device. Authentication is required.
Calling this URL will start the form for configuring the device in the browser. Authentication is required.
Calling this URL will return a JPEG snapshot of the camera in the browser. This request can also be used (for example using cURL) to save the snapshot to a file.
- The red LED on the back of the device indicates the device is not connected.
- Sometimes after configuration a reboot is required. If the error screen is shown that it is unable to make a connection, first try to reboot the device,
- When booting, the device waits 30 seconds for a connection (configurable). You can make a connection to the SSID and log in using the credentials below,
- When connected, go to the ip of the device and, when prompted for the credentials, enter 'admin' and the AP password. This is a required field before saving the credentials,
- When the password is lost, a fix is to completely erase the ESP32 using the
pio run -t erasecommand. This will reset the device including configuration. If using the esptool, you can do this usingesptool.py --chip esp32 --port /dev/ttyUSB0 erase_flash. However, after erasing, re-flashing of the firmware is required. - When finished configuring for the first time and the access point is entered, disconnect from the wireless network provided by the device. This should reset the device and connect to the access point. Resetting is also a good alternative...
- There are modules that have no or faulty PSRAM (despite advertised as such). This can be the case if the camera fails to initialize. It might help to disable the use of the PSRAM and reduce the buffers and the screen size.
Make sure the power is 5 volts and stable, although the ESP32 is a 3.3V module, this voltage is created on the board. If not stable, it has been reported that restarts occur when starting up (probably when power is required for WiFi). The software disables the brown out protection so there is some margin in the voltage. Some people suggest to add a capacitor over the 5V input to stabilize the voltage.
Some esp32cam modules have additional ram on the board. This allows to use this ram as frame buffer. The availability of PSRAM can be seen in the HTML status overview.
Not all the boards are equipped with PSRAM:
| Board | PSRAM |
|---|---|
| WROVER_KIT | 8Mb |
| ESP_EYE | 8Mb |
| ESP32S3_EYE | 8Mb |
| M5STACK_PSRAM | 8Mb |
| M5STACK_V2_PSRAM | Version B only |
| M5STACK_WIDE | 8Mb |
| M5STACK_ESP32CAM | No |
| M5STACK_UNITCAM | No |
| M5STACK_UNITCAMS3 | 8Mb |
| M5STACK_M5PoECAM-W | 8MB |
| AI_THINKER | 8Mb |
| TTGO_T_JOURNAL | No |
| ESP32_CAM_BOARD | ? |
| ESP32S2_CAM_BOARD | ? |
| ESP32S3_CAM_LCD | ? |
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. There are (a lot of?) boards around with faulty PSRAM. If the camera fails to initialize, this might be a reason. See on Reddit. In this case disable the use of PSRAM in the configuration and do not use camera modes that require PSRAM,
For the setting JPEG quality, a lower number means higher quality. Be aware that a very high quality (low number) can cause the ESP32 cam to crash or return no image.
The default settings are:
-
No PSRAM
- SVGA (800x600)
- 1 frame buffer
- JPEG quality 12
-
With PSRAM
- UXGA (1600x1200)
- 2 frame buffers
- JPEG quality 10
Be careful when connecting the camera module. Make sure it is connected the right way around (Camera pointing away from the board) and the ribbon cable inserted to the end before locking it.
XCAM is based on esp32cam-rtsp and depends on PlatformIO, Bootstrap 5, and Micro-RTSP by Kevin Hester.
- August 2024
- Added support for M5Stack M5PoECAM-W
- January 2024
- Moved settings to board definitions
- Added new boards
- Removed OTA to increase performance
- 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
- Feb 2023
- Added additional settings for camera configuration
- Nov 2022
- Added OTA
- Fix for grabbing frame
- Fixed bug: Increased WiFi password length
- Sep 2022
- Added GUI with bootstrap
- More information in web page
- Added camera preview in HTML
- Jul 2022
- Initial version






















