esp32.diy

ESP32-CAM Video Recorder Junior: Build a Wi-Fi SD Card Camera

Oct 13, 2026 · 6 min read

Intermediate 403 stars 79 forks C++ GPL-3.0 Updated 2026-06-18

The config2.txt web editor lets you set Wi-Fi credentials, timezone, frame size, clip length, and more from any browser without touching the SD card.

TL;DR ESP32-CAM-Video-Recorder-junior turns a bare ESP32-CAM module into a self-contained video recorder that writes MJPEG AVI files directly to an SD card at up to 12.5 fps in HD. A built-in web server lets you stream live video, browse and download recordings, and manage every setting through a config file or browser — no PC required after the first flash.
What you need
  • AI-Thinker ESP32-CAM
  • Freenove ESP32S3
  • diymore ESP32S3
  • OV2640 camera module
  • OV5640 camera module
  • MicroSD card
  • Momentary switch (optional, GPIO 12 / GPIO 46 on S3)
BoardAI-Thinker ESP32-CAM or Freenove/diymore ESP32S3
LanguageC++
FrameworkArduino (IDE 2.3.1, esp32-arduino 3.3.10)
Recording FormatMJPEG AVI
Max Frame Rate12.5 fps at HD (1280×720)
LicenseGPL-3.0

What You Will Build

This project transforms an AI-Thinker ESP32-CAM — a module that costs a few dollars and fits in a shirt pocket — into a fully independent video recorder. Once flashed and powered, it writes a continuous series of MJPEG AVI files to a MicroSD card with no host computer involved.

Out of the box it records 30-minute HD videos at 12.5 fps and creates a new file automatically when each segment ends. Connect it to your Wi-Fi network and you gain a live stream in any browser, a web-based file manager to browse and download recordings, and over-the-air firmware updates. A timelapse mode lets you slow capture to 1 fps and play back at any speedup factor.

A newer v62 build adds dual-router support (the module picks whichever access point is stronger), an always-on local access point so you can reach it without any router at all, the ability to peek inside a video at any timestamp before downloading, and automatic re-indexing of files that were not closed cleanly after a power loss.

Timelapse sample: UXGA resolution, 1 fps capture, played back at 30× speed.\2
Timelapse sample: UXGA resolution, 1 fps capture, played back at 30× speed.
Realtime sample: HD 1280×720 at 12.4 fps recorded directly to SD card.\2
Realtime sample: HD 1280×720 at 12.4 fps recorded directly to SD card.
Main web status page showing disk space, Wi-Fi signal, and recording controls.\2
Main web status page showing disk space, Wi-Fi signal, and recording controls.
Photos screen — capture ten JPEG frames at three-second intervals and scroll through them in the browser.\2
Photos screen — capture ten JPEG frames at three-second intervals and scroll through them in the browser.

What You Need

Hardware

Software

Typical use cases

DIY Security Camera

Mount the ESP32-CAM in a weatherproof enclosure, wire a PIR to GPIO 12, and let the firmware record triggered clips to the SD card while streaming a live view to your browser.

Timelapse Photography

Set the frame rate to 1 fps in config2.txt, point the camera at a garden or construction site, and retrieve a ready-to-play AVI over Wi-Fi when the shoot is done.

RC Vehicle Onboard Camera

Attach the module to a small RC car or rover. The firmware records continuously to SD with no Wi-Fi needed, so you can review footage after each run.

motionEye Network Camera

Use the /capture endpoint to feed still frames into motionEye or a similar NVR, running cloud-connected monitoring alongside local SD card recording at the same time.

How It Works

The firmware runs three concurrent FreeRTOS tasks — camera capture, SD card write, and Wi-Fi/web server — each with its own mutex so none blocks the others. The camera captures JPEG frames from the OV2640 at the configured interval and appends them into an open AVI container on the SD card. Because each frame is an independent JPEG (MJPEG), the file stays valid even if power is cut; the re-index endpoint can rebuild a broken file's index afterward.

When Wi-Fi is enabled, two streaming channels are available at ports 81 and 82, and a lightweight web server exposes endpoints for live control (/stop, /start, /capture) and the file manager. Wi-Fi power-save mode is explicitly disabled to prevent the modem sleep from corrupting JPEG frames — a subtle hardware interaction that the project documents in detail.

All recording parameters (frame size, quality, clip length, Wi-Fi on/off, timezone, up to two router credentials) are read from a plain-text config2.txt file on the SD card at boot, so you can change behaviour without reflashing.

Install and Flash

Option A — One-click installer (no compile needed)

Open https://jameszah.github.io/ESP32-CAM-VideoCam/ in a Chromium-based browser, connect your ESP32-CAM programmer, and follow the prompts. The installer pushes a pre-compiled binary and you are done.

Option B — Arduino IDE

  1. Install the esp32 board package version 3.3.10 via Tools → Board Manager.

  2. Install the ESPping library via Tools → Manage Libraries (v62 / S3 build only).

  3. Download all files from the v62 folder of the repository.

  4. Open the main .ino file in Arduino IDE 2.3.1.

  5. Select your board and partition scheme:

    AI-Thinker ESP32-CAM: set board type as AI-Thinker ESP32-CAM with Minimum Spiffs 1.9MB with ota.

    ESP32S3 variant: use the following settings from the IDE menus:

    Board Library: ESP32S3 Dev Module
    Partition Scheme: Minimal SPIFFS 1.9MB App 128KB SPIFFS
    PSRAM: OPI PSRAM
    Flash Size: 8MB
    
  6. Compile and upload. On first boot with a clean SD card the firmware creates a default config2.txt, starts an access point named desklens (password 12344321), and is reachable at 192.168.4.1. Click Edit config2.txt to enter your own Wi-Fi credentials, timezone, and recording preferences.

Configure and Use

Edit config2.txt on the SD card (or through the web interface) to control every recording parameter. The file is self-documented with inline comments — leave two spaces before the // comment delimiter. Key parameters include recording length, frame size (SVGA, HD, UXGA, and others), quality (lower number = higher quality = larger file), frames per second, and whether Wi-Fi starts automatically.

Once Wi-Fi is connected the module gets an IP from your router (for example 192.168.1.100). Useful endpoints:

Endpoint Action
192.168.1.100 Main status page
192.168.1.100:81/stream Live stream channel 1
192.168.1.100:82/stream Live stream channel 2
192.168.1.100/stop Stop recording
192.168.1.100/start Start recording
192.168.1.100/capture Single-frame capture (for use with motionEye)
192.168.1.100/ota Enable OTA firmware update (password: mrpeanut)

The built-in file manager shows SD card usage, lets you enter folders, download individual AVI files or entire folders, rename, delete, or upload files from a drag-and-drop zone. Under good conditions you can download at roughly 2 Mbps while recording is active, or about 3 Mbps when recording is paused.

Ideas to Extend It — and Limitations

Ways to go further

Limitations to keep in mind

Verdict

ESP32-CAM-Video-Recorder-junior is a mature, actively maintained firmware that squeezes reliable 12.5 fps HD MJPEG recording, browser-based file management, live streaming, and OTA updates out of a module that fits on a fingertip. The one-click installer removes the compile barrier for beginners, while the config file and REST endpoints give experienced makers plenty of room to integrate it into larger systems. The main trade-off is file size — MJPEG is not space-efficient — but for short clips, timelapse, and monitoring use cases the simplicity of the format is a genuine advantage.

Sources

github.comjameszah/ESP32-CAM-Video-Recorder-junior — repository & README

Facts in this article come from the project's public README and GitHub metadata at the time of writing. Images belong to their respective owners and link back to the original source.