[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-s60sc--ESP32-CAM_MJPEG2SD":3,"tool-s60sc--ESP32-CAM_MJPEG2SD":61},[4,18,26,36,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",159267,2,"2026-04-17T11:29:14",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,"2026-04-10T11:39:34",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[52,13,15,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":32,"last_commit_at":59,"category_tags":60,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":66,"readme_en":67,"readme_zh":68,"quickstart_zh":69,"use_case_zh":70,"hero_image_url":71,"owner_login":72,"owner_name":73,"owner_avatar_url":74,"owner_bio":73,"owner_company":73,"owner_location":73,"owner_email":73,"owner_twitter":73,"owner_website":73,"owner_url":75,"languages":76,"stars":93,"forks":94,"last_commit_at":95,"license":96,"difficulty_score":97,"env_os":98,"env_gpu":99,"env_ram":100,"env_deps":101,"category_tags":106,"github_topics":108,"view_count":32,"oss_zip_url":73,"oss_zip_packed_at":73,"status":17,"created_at":129,"updated_at":130,"faqs":131,"releases":166},8600,"s60sc\u002FESP32-CAM_MJPEG2SD","ESP32-CAM_MJPEG2SD","ESP32 Camera motion capture application to record JPEGs to SD card as AVI files and stream to browser as MJPEG. If a microphone is installed then a WAV file is also created. Files can be uploaded via FTP or downloaded to browser.","ESP32-CAM_MJPEG2SD 是一款专为 ESP32 及 ESP32-S3 开发板打造的多功能摄像头应用，能将 OV2640 等常见模组瞬间变身智能监控终端。它核心解决了低成本硬件在视频录制与传输上的痛点：不仅支持将运动检测或连续拍摄的画面实时保存为标准的 AVI 视频文件（含音频同步），还能通过浏览器以 MJPEG 格式流畅直播，让用户无需复杂后端即可远程查看与管理录像。\n\n这款工具特别适合电子爱好者、嵌入式开发者以及需要低成本定制监控方案的科研人员。无论是家庭安防、野生动物观测，还是无人机第一视角飞行记录，它都能胜任。其技术亮点在于极高的扩展性：除了基础的视频功能，还集成了 MQTT 智能家居联动、Telegram 报警通知、RTSP 推流、遥测数据记录甚至简单的对讲功能。同时，它支持丰富的外设接口，可连接云台、传感器及各类 I2C 设备。值得注意的是，为了获得最佳性能并运行全部高级特性，建议搭配内存更大的 ESP32-S3 系列主板使用。这是一个功能强大且开放的社区项目，让 DIY 视频监控变得既专业又触手可及。","\n# ESP32-CAM_MJPEG2SD\n\nApplication for ESP32 \u002F ESP32S3 with OV2640 \u002F OV3660 \u002F OV5640 \u002F PY260 camera to record JPEGs to SD card as AVI files and playback to browser as an MJPEG stream. The AVI format allows recordings to replay at correct frame rate on media players. If a microphone is installed then a WAV file is also created and stored in the AVI file.  \nThe application supports:\n* [Motion detection by camera](#motion-detection-by-camera) or PIR \u002F radar sensor \u002F accelerometer\n* [Continuous recording](#continuous-recording) - Time lapse or dashcam style\n* [Audio Recording](#audio-recording) from I2S or PDM microphones\n* Camera pan \u002F tilt servos and lamp control\n* [RTSP Server](#rtsp) stream Video, Audio and Subtitles\n* [Telemetry Recording](#telemetry-recording) during camera recording.\n* [Remote Control](#remote-control) of camera mounted vehicle.\n* Alert notification using [Telegram](#telegram-bot) or Email\n* Concurrent streaming to web browser and [remote NVR](#stream-to-nvr) using HTTP or RTSP\n* Transfer recordings using FTP, HTTPS, [WebDAV](#webdav), or download from browser\n* [MQTT](#mqtt) control with Home Assistant integration.\n* [External Heartbeat](#external-heartbeat) support.\n* Support for peripherals: SG90 servos, MX1508 H-bridge, 28BYJ-48 stepper, HW-504 joystick, BMP280, MPU9250, MY9221 \u002F WS2812 \u002F SK6812 Led\n* Support for [I2C devices](#i2c-devices): BMP280, BME280, MPU6050, MPU9250, SSD1306, LCD1602, etc.\n* Interface for [Machine Learning](#machine-learning) support.\n* [Camera Hub](#camera-hub) feature to access other ESP32-CAM_MJPEG2SD devices.\n* [Photogrammetry](#photogrammetry) feature to capture photos for 3D imaging.\n* Use of [Auxiliary Board](#auxiliary-board) for additional pins.\n* [Intercom](#intercom) feature using mic and speaker on ESP and mic and speaker on user device browser.\n* Option of [Ethernet](#configuration-web-page) network selection instead of Wifi\n\nThe ESP32 cannot support all of the features as it will run out of heap space. For better functionality and performance, use one of the new ESP32S3 camera boards, eg Freenove ESP32S3 Cam, ESP32S3 XIAO Sense, ESP32-S3-Cam (AI Thinker style), but avoid no-name boards marked `ESPS3 RE:1.0`\n\n***This is a complex app and some users are raising issues when the app reports a warning, but this is the app notifying the user that there is an problem with their setup, which only the user can fix. Be aware that some clone boards have different specs to the original, eg PSRAM size. Please only raise issues for actual bugs (ERR messages, unhandled library error or crash). Thanks.  \nTo suggest an improvement or enhancement use Discussions.*** \n\nChanges for version up to 10.9.3:\n* Addition of [Ethernet](#configuration-web-page) network selection instead of Wifi\n* Pins added for [`CAMERA_MODEL_Waveshare_ESP32_S3_ETH`](https:\u002F\u002Fwww.waveshare.com\u002Fwiki\u002FESP32-S3-ETH)\n* Define pins for external W5500 Ethernet controller\n* Fix for issue [#650](https:\u002F\u002Fgithub.com\u002Fs60sc\u002FESP32-CAM_MJPEG2SD\u002Fissues\u002F650)\n* Motion detection by MPU6050 or MPU9250 accelerometer\n* Support for OV5640 auto focus\n* Logging and memory usage improvements\n* Fix for issue [#697](https:\u002F\u002Fgithub.com\u002Fs60sc\u002FESP32-CAM_MJPEG2SD\u002Fissues\u002F697)\n* Fix for issue [#698](https:\u002F\u002Fgithub.com\u002Fs60sc\u002FESP32-CAM_MJPEG2SD\u002Fissues\u002F698)\n* Internal improvements\n\n## Purpose\n\nThe application enables video capture of motion detection or continuous recording. Examples include security cameras, wildlife monitoring, rocket flight monitoring, FPV vehicle control.\n\nSaving a set of JPEGs as a single file is faster than as individual files and is easier to manage, particularly for small image sizes. Actual rate depends on quality and size of SD card and complexity and quality of images. A no-name 4GB SDHC labelled as Class 6 was 3 times slower than a genuine Sandisk 4GB SDHC Class 2. The following recording rates were achieved on a freshly formatted Sandisk 4GB SDHC Class 2 on a AI Thinker OV2640 board, set to maximum JPEG quality and clock rate of 20MHz. With a clock rate of 24Mhz on ESP32S3, the maximum frame rates can increase 50->60, 25->30 but it may be necessary to reduce JPEG quality.\n\nFrame Size | OV2640 camera max fps | mjpeg2sd max fps | Detection time ms\n------------ | ------------- | ------------- | -------------\n96X96 | 50 | 45 |  15\nQQVGA | 50 | 45 |  20\nQCIF  | 50 | 45 |  30\nHQVGA | 50 | 45 |  40\n240X240 | 50 | 45 |  55\nQVGA | 50 | 40 |  70\nCIF | 50 | 40 | 110\nHVGA | 50 | 40 | 130\nVGA | 25 | 20 |  80\nSVGA | 25 | 20 | 120\nXGA | 12.5 | 5 | 180\nHD | 12.5 | 5 | 220\nSXGA | 12.5 | 5 | 300\nUXGA | 12.5 | 5 | 450\n\nThe ESP32S3 (using Freenove ESP32S3 Cam board hosting ESP32S3 N8R8 module) runs the app about double the speed of the ESP32 mainly due to much faster PSRAM. It can record at the maximum OV2640 frame rates including [audio](#audio-recording) for all frame sizes except UXGA (max 10fps).\n\n## Design\n\nThe ESP32 Cam module has 4MB of PSRAM (8MB on most ESP32S3) which is used to buffer the camera frames and the construction of the AVI file to minimise the number of SD file writes, and optimise the writes by aligning them with the SD card sector size. For playback the AVI is read from SD into a multiple sector sized buffer, and sent to the browser as timed individual frames. By dewfault the SD card is used in **MMC 1 line** mode, as this is practically as fast as **MMC 4 line** mode on the ESP32 and frees up pin 4 (connected to onboard Lamp), and pin 12 which can be used for eg a PIR. On the ESP32S3 however, tests by [@josef2600](https:\u002F\u002Fgithub.com\u002Fjosef2600) indicate that **MMC 4 line** mode provides a [doubling](https:\u002F\u002Fgithub.com\u002Fs60sc\u002FESP32-CAM_MJPEG2SD\u002Fissues\u002F529#issuecomment-2588088722) of speed.  \n\nThe AVI files are named using a date time format **YYYYMMDD_HHMMSS** with added frame size, FPS recording rate, duration in secs, eg **20200130_201015_VGA_15_60.avi**, and stored in a per day folder **YYYYMMDD**. If audio is included the filename ends with **_S**.  If telemetry is available the filename ends with **_M**.  \nThe ESP32 time is set from an NTP server or connected browser client.\n\n## Installation\n\nDownload github files into the Arduino IDE sketch folder, removing `-master` from the application folder name.\nCompile with at least arduino-esp32 core v3.1.1 which contains network fixes and frame selection changes.\nSelect the required ESP-CAM board by uncommenting ONE only of the `#define CAMERA_MODEL_*` in `appGlobals.h` unless using the one of the defaults:\n* ESP32 Cam board - `CAMERA_MODEL_AI_THINKER`\n* Freenove ESP32S3 Cam board - `CAMERA_MODEL_FREENOVE_ESP32S3_CAM`  \n\nOptional features are not included by default. To include a feature, in `appGlobals.h` set relevant `#define INCLUDE_*` to `true`. \n\nSelect the ESP32 or ESP32S3 Dev Module board and compile with PSRAM enabled and the following Partition scheme:\n* ESP32 - `Minimal SPIFFS (...)`\n* ESP32S3 - `8M with spiffs (...)` or `16MB(3MB APP...)`\n\n**NOTE:**\n* **If you get compilation errors you need to update your `arduino-esp32` core library in the IDE to latest v3.x\nusing [Boards Manager](https:\u002F\u002Fgithub.com\u002Fs60sc\u002FESP32-CAM_MJPEG2SD\u002Fissues\u002F61#issuecomment-1034928567)**\n* **If you get error: `Startup Failure: Check SD card inserted`, or `Camera init error 0x105` it is usually a [camera board selection](https:\u002F\u002Fgithub.com\u002Fs60sc\u002FESP32-CAM_MJPEG2SD\u002Fissues\u002F219#issuecomment-1627785417) issue**\n* **If you get warning: `Crash loop detected, check log`, it is usually an inadequate power supply.**\n\n\nOn first installation, the application will start in wifi AP mode - connect to SSID: **ESP-CAM_MJPEG_...**, to allow router to be selected and router password entered via the web page on `192.168.4.1`. The configuration data file (except passwords) is automatically created, and the application web pages automatically downloaded from GitHub to the SD card **\u002Fdata** folder when an internet connection is available.\n\nSubsequent updates to the application, or to the **\u002Fdata** folder files, can be made using the **OTA Upload** tab. The **\u002Fdata** folder can also be reloaded from GitHub using the **Reload \u002Fdata** button on the **Edit Config** tab, or by using a WebDAV client.\n\nAn alternative installation process by [@ldijkman](https:\u002F\u002Fgithub.com\u002Fldijkman) is described [here](https:\u002F\u002Fyoutu.be\u002FYLLGBM3i2aQ).\n\nBrowser functions only fully tested on Chrome.\n\n\n## Main Function\n\nA recording is generated either by the camera itself detecting motion, or by holding a given pin high (kept low by internal pulldown when released), eg by using an active high motion sensor such as a PIR (HC-SR501) or microwave radar (CWL-0516), or an I2C accelerometer (MPU6050), or a non motion detector such as a sound sensor (KY-037).\nIn addition a recording can be requested manually using the **Start Recording** button on the web page.\n\nTo play back a recording, select the file using **Playback & File Transfers** sidebar button to select the day folder then the required AVI file.\nAfter selecting the AVI file, press **Start Playback** button to playback the recording. \nThe **Start Stream** button shows a live video only feed from the camera. \n\nRecordings can then be uploaded to an FTP or HTTPS server or downloaded to the browser for playback on a media application, eg VLC.\nTo incorporate FTP or HTTPS server, set `#define INCLUDE_FTP_HFS` to `true`.\n\n## Continuous Recording\n\nA time lapse feature is available which can run in parallel with motion capture. \nSelect **Time Lapse** button under **Motion Detect & Recording** sidebar button. Time Lapse configuration is under **Motion** button in **Edit Config** tab.\nTime lapse files have the format **20200130_201015_VGA_15_60_T.avi**.\n\nA continuous recording feature generates a sequence of files from power up, similar to dashcam recording style. Use **DashCam** slider in **Motion Detect & Recording** sidebar button to select a value representing the length in minutes of each file. Need to press **Save Settings** button then **Reboot ESP** to commence recording.\nSelect slider value 0 to switch off feature. Creates file names with format **20200130_201015_VGA_15_60_C.avi**. \nMotion detection is disabled while continuous recording is running.\n\nTime Lapse & Dashcam features are mutually exclusive.\n\n\n## Other Functions and Configuration\n\nThe operation of the application can be modified dynamically as below, by using the main web page, which should mostly be self explanatory.\n\nConnections:\n* The Wifi\u002FEthernet choice, Time zone, FTP\u002FHTTPS, SMTP, and authentication parameters can be defined in **Access Settings** sidebar button. \n  - for **Time Zone** use dropdown, or paste in values from second column [here](https:\u002F\u002Fraw.githubusercontent.com\u002Fnayarsystems\u002Fposix_tz_db\u002Fmaster\u002Fzones.csv)\n* To make the changes persistent, press the **Save** button\n    * For network changes, ESP must be rebooted.\n* mdns name services in order to use `http:\u002F\u002F[Host Name]` instead of ip address.\n\nTo change the recording parameters:\n* `Resolution` is the pixel size of each frame\n* `Frame Rate` is the required frames per second\n* `Quality` is the level of JPEG compression which affects image size.\n\nSD storage management:\n* Folders or files within folders can be deleted by selecting the required file or folder from the drop down list then pressing the **Delete** button and confirming.\n* Folders or files within folders can be uploaded to a remote server via FTP \u002F HTTPS by selecting the required file or folder from the drop down list then pressing the **File Upload** button. Can be uploaded in AVI format.\n* Download selected AVI file from SD card to browser using **Download** button.\n* Delete, or upload and delete oldest folder when card free space is running out.  \n\nView application log via web page, displayed using **Show Log** tab:\n  * Select log type for display:\n    * RTC RAM: Cyclic 7KB log saved in RTC RAM (default)\n    * Websocket: log is dynamically output via websocket\n    * SD card: Unlimited size log saved to SD card\n  * Use slider to enable SD logging, but can slow recording rate\n  * Use buttons to refresh or clear selected log\n\n\n## Configuration Web Page\n\nMore configuration details accessed via **Edit Config** tab, which displays further buttons:\n\n**Network**:\n* Default network interface is Wifi, but Ethernet can be used instead using boards with built in Ethernet, eg: [`CAMERA_MODEL_Waveshare_ESP32_S3_ETH`](https:\u002F\u002Fwww.waveshare.com\u002Fwiki\u002FESP32-S3-ETH), or by connecting an external W5500 Ethernet controller.\n* Feature only available for ESP32S3 boards.\n* All existing services automatically use the selected network interface after reboot.\n* If Network interface in **Access Settings** side tab was previously set to Ethernet:\n  * App runs in quiet mode (WiFi and BLE off).\n  * First boot still prepares the SD `\u002Fdata` folder and UI.\n  * WiFi AP wizard is suppressed; access the device by its DHCP IP or mDNS `http(s):\u002F\u002F\u003Chostname>.local` if your network supports it.\n  * PoE variants are supported at the hardware level; power delivery is handled by the board.\n  * Contributed by [@RedCanti](https:\u002F\u002Fgithub.com\u002FRedCanti)\n* If Network interface in **Access Settings** side tab was previously set to Eth+AP:\n  * Wifi AP is available concurrently with Ethernet, but uses a separate network.\n  * Do not open web pages on each network concurrently.\n* To use an external W5500 Ethernet controller, after selecting Ethernet or Eth+AP, an additional tab **Ethernet** is present in the **Edit Config** tab for entering the SPI pins numbers used to connect to the W5500 Ethernet controller.\n\n**Motion**: \nSee [**Motion detection by Camera**](#motion-detection-by-camera) section.\n\n**Peripherals** eg:\n* Select if a PIR or radar sensor is to be used (which can also be used in parallel with camera motion detection).\n* Control pan \u002F tilt cradle for camera.\n* Connect a PDM or I2S microphone and I2S amplifier.\n* Connect a DS18B20 temperature sensor.\n* Monitor voltage of battery supply on ADC pin.\n* Wakeup on LDR after deep sleep at night.\n\nTo incorporate peripherals, set `#define INCLUDE_PERIPH` to `true`.\n\nThe **Peripherals** tab also enables further config tabs to be displayed:\n* **Audio**: to configure microphones and amplifiers.\n* **RC Config**: to configure hardware for remote control vehcles.\n* **Servos**: to configure servos for camera control and RC steering\n* **PG Control**: to configure and control hardware for photogrammetry.  \n\nAfter changes are applied, need to press `Save` then `Reboot ESP` to restart peripherals with changes.\n\nNote that there are not enough free pins on the ESP32 camera module to allow all external sensors to be used. Pins that can be used (with some limitations) are: 3, 4, 12, 13, 26, 27 32, 33.\n* pin 3: Labelled U0R. Only use as input pin, as also used for flashing. \n* pin 4: Also used for onboard lamp. Lamp can be disabled by removing its current limiting resistor. \n* pin 12: Only use as output pin.\n* pin 13: Is weakly pulled high.\n* pins 26, 27: I2C pins shareable with camera - see [I2C devices](#i2c-devices)\n* pin 32: Controls camera power on \u002F off. Not broken out, but with electronics knowledge can be disconnected leaving camera permanently on by referring to the board schematic.\n* pin 33: Used by onboard red LED. Not broken out, but can repurpose the otherwise pointless VCC pin by removing its adjacent resistor marked 3V3, and the red LED current limiting resistor, then running a wire between the VCC pin and the red LED resistor solder tab.\n\nDo not use any other exposed pin including pin 16 used by PSRAM.\n\nThe ESP32S3 Freenove board can support multiple peripherals with its spare pins.\nThe ESP32S3 XIAO Sense board has fewer free pins but more than the ESP32.\n\nOn-board LEDs:\n* ESP32: Lamp 4, signal 33.\n* ESP32S3:\n  * Freenove: Lamp 48, signal 2.\n  * XIAO: Lamp n\u002Fa, signal 21.\n\n**Other**:\nSD, email, telegram, etc management. To icorporate email (SMTP), set `#define INCLUDE_SMTP` to `true`.\n\nWhen a feature is enable or disabled, the **Save** button should be used to persist the change, and the ESP should be rebooted using **Reboot ESP** button.\n\n\n## Motion detection by Camera\n\nAn AVI recording can be generated by the camera itself detecting motion using the `motionDetect.cpp` file.  \nJPEG images of any size are retrieved from the camera and 1 in N images are sampled on the fly for movement by decoding them to very small grayscale bitmap images which are compared to the previous sample. The small sizes provide smoothing to remove artefacts and reduce processing time.\n\nFor movement detection a high sample rate of 1 in 2 is used. When movement has been detected, the rate for checking for movement stop is reduced to 1 in 10 so that the JPEGs can be captured with only a small overhead. The **Detection time ms** table shows typical time in millis to decode and analyse a frame retrieved from the OV2640 camera.\n\nMotion detection by camera is enabled by default, to disable click off **Enable motion detect** in **Motion Detect & Recording** sidebar button. Motion detection is not available for frame sizes > SXGA due to jpeg decoder limitations.\n\n\u003Cimg align=right src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fs60sc_ESP32-CAM_MJPEG2SD_readme_b0766e03306f.png\" width=\"200\" height=\"200\">\n\nAdditional options are provided on the camera index page, where:\n* `Motion Sensitivity` sets a threshold for movement detection, higher is more sensitive.\n* `Show Motion` if enabled and the **Start Stream** button pressed, shows images of how movement is detected for calibration purposes. Grayscale images are displayed with red pixels showing movement.\n* `Min Frames` is the minimum number of frames to be captured or the file is deleted.  \n \n\n## Audio Recording\n\nAn I2S microphone eg INMP441 is supported by both ESP32 and ESP32S3. A PDM microphone eg MP34DT01 is only supported on ESP32S3. Audio recording works fine on ESP32S3 but is not viable on ESP32 as it significantly slows down the frame rate. \n\nThe audio is formatted as 16 bit single channel PCM with sample rate of 16kHz. An I2S microphone needs 3 free pins, a PDM microphone needs 2 free pins (the I2S SCK pin must be set to -1). Pin values (predefined for XIAO Sense) are set under **Audio** button on the configuration web page.\n\nThe web page has a slider for **Microphone Gain**. The higher the value the higher the gain for ESP microphone. Selecting **0** cancels the microphone.\n\nThe Speaker icon button on the web page can be used to listen to the microphone from the browser.\n\nTo incorporate, set `#define INCLUDE_AUDIO` to `true`.\n\n\n## Intercom\n\nThe intercom feature allows two way conversation between an ESP32 with microphone and amplifier \u002F speaker installed and the device hosting the app web page where the browser has access to the host device microphone and speaker. Access to the device microphone may have security constraints, see `audio.cpp`. This feature is only viable on an ESP32S3 and needs a good WiFi connection and spatial separation at both ends to prevent a feedback loop.\n\nAn I2S amplifier needs 1 free pin on the ESP32S3 if an I2S microphone is installed as they can share the clock pins. Pin values are set under **Audio** button on the configuration web page. \n\nThe web page has a slider for **Amplifier Volume**. The higher the value the higher the volume for ESP speaker. Selecting **0** cancels the speaker.\n\nOn the left side on the main web page are icons for browser device microphone and speaker. Selecting the icon (if not grayed out) activates the browser microphone or speaker. \n\n\n## OV5640 & OV3660\n\nThe OV5640 and OV3660 pinouts are compatible with boards designed for the OV2640 but the voltage supply is too high for their internal 1.5V regulator, so the camera overheats unless a heat sink is applied.\n\nFor recording purposes the OV5640 should only be used with an ESP32S3 board. Frame sizes above `FHD` framesize should only be used for still images due to memory limitations.\n\nRecordable frame rates for the OV5460 highest framesizes on an ESP32S3 are:\n\nFrame Size | FPS \n------------ | -------------\nQXSGA | 4\nWQXGA | 5\nQXGA | 5\nQHD | 6\nFHD | 6\nP_FHD | 6\n\nTo use the Auto Focus feature on suitably equipped modules, instal `ESP32_OV5640_AF` library and in `appConfigs.h` set `#define INCLUDE_AF true`\n\n## PY260\n\nThe PY260 is a 5MP camera supplied with the M5Stack Unit CamS3 5MP module (CAMERA_MODEL_M5STACK_CAMS3_UNIT).  \nIt has different sensor settings to the Omnivision series cameras, defined in side tab **Picture Settings**\n\n## Auxiliary Board\n\nTo free up pins on the camera board, this app can be installed on both a camera board and an auxiliary board with the latter hosting hardware such as BDC motors, steppers and servos. \nThe communication with the auxiliary board can be either of:\n* Instead of the commands from the app web page being set to the camera board, they are redirected to the \nauxiliary board\n* The cam board forwarding commands from the app web page to the auxiliary board over a UART connection.\n\nThe auxiliary board can be used to drive the hardware for:\n* RC speed, steering and lights real time control.\n* Camera pan and tilt.\n* Photogrammetry operation.\n\n Instal app on camera board in usual way. Under **Peripherals** tab, either:\n * Enter IP address of the auxiliary board in field: `Send RC \u002F Servo \u002F PG commands to auxiliary IP` then save and reboot. Relevant commands from cam board web page will now be sent to the auxiliary board. \n * Enter UART pin numbers and select `Use UART for Auxiliary connection`, then save and reboot. Relevant commands from cam board web page will be sent to the cam board then forwarded to the auxiliary board. \n \n Instal app on auxiliary board after uncommenting ONLY `#define AUXILIARY` in camera selection block in `appGlobals.h`. The auxiliary board does not need camera, SD card or PSRAM, just wifi and enough pins to connect to the relevant hardware. Note that MCPWM for BDC motors is not supported by ESP32-C3.  \n \n The Auxil web page on the auxiliary board is a cut down version of the camera app web page. The configuration details under **RC Config**, **Servo Config** and **PG Config** tabs must be entered on the auxiliary board web page, not the cam web page. If using UART, enter relevant pin numbers on both web pages and wire RX to TX between boards plus a common ground.\n \nTo incorporate, set `#define INCLUDE_UART` to `true`.\n\n## HTTPS\n\nBy default the app uses a HTTP web interface, but it can be set up to use HTTPS. To incorporate, set `#define INCLUDE_CERTS` to `true`.  \nDue to mbedtls memory use and processor load from app, HTTPS is only useable on ESP32-S3 but can still be unstable due to lack of memory and interrupt watchdog resets.\nAlternatively under **Access Settings** a web user login and password can be defined for a bit more security for HTTP access.\n\nSee `certificates.cpp` for how to generate and instal certificates. To prevent browser warning for untrusted site, import the server certificate into the browser as given in `certificates.cpp`.\n\nTo switch HTTPS on \u002F off, press **Access Settings** sidebar button and set **Use HTTPS** slider on \u002F off.\n\nNote: if HTTPS is on but the certificates are not correct the web page can not be accessed so the certificate files on the SD card will need to be manually deleted.\n\nSeparately from app HTTPS status, to protect against man-in-middle attacks when accessing remote servers, set **Check Certs** slider on. See `certificates.cpp` for how to obtain remote server certificates.\n\n## MQTT\n\nTo enable MQTT, under **Edit Config** -> **Others** tab, enter fields:\n* `Mqtt server ip to connect`\n* `Mqtt topic path prefix`\n* optionally `Mqtt user name` and `Mqtt user password`\n* Then set `Mqtt enabled` \n\nMQTT will auto connect if configuration is not blank on ping success.\n\nIt will send messages e.g. Record On\u002FOff Motion On\u002FOff to the mqtt broker on channel \u002Fstatus.  \ntopic: `homeassistant\u002Fsensor\u002F{esp cam hostname}\u002Fstate -> {\"MOTION\":\"ON\", \"TIME\":\"10:07:47.560\"}`\n\nYou can also publish control commands to the \u002Fcmd channel in order to control camera.\ntopic: `homeassistant\u002Fsensor\u002F{esp cam hostname}\u002Fcmd -> dbgVerbose=1;framesize=7;fps=1`\n\nTo incorporate, set `#define INCLUDE_MQTT` to `true`.\n\n### Home assistant MQTT camera integration\n\nIntegration with Home Assistant [MQTT Camera](https:\u002F\u002Fwww.home-assistant.io\u002Fintegrations\u002Fcamera.mqtt\u002F) contributed by [@gemi254](https:\u002F\u002Fgithub.com\u002Fgemi254) - send mqtt discovery messages to:\n* publish an image payload on motion detection that will be displayed on the dashboard\n* automatically create a home assistant camera device inside mqtt devices integration.\n* publish motion on\u002Foff messages on channel `homeassistant\u002Fsensor\u002F{esp cam hostname}\u002Fmotion` that can be used for home automations.\n* publish an image payload on motion detection that will be displayed on the dashboard.\n\nTo incorporate set `#define INCLUDE_HASIO` to `true`.\n\n\u003Ca href=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fs60sc_ESP32-CAM_MJPEG2SD_readme_c44877c71ac1.png\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fs60sc_ESP32-CAM_MJPEG2SD_readme_c44877c71ac1.png\" width=\"500\" height=\"350\">\u003C\u002Fa>\n\n\n## External Heartbeat\n\nContributed by [@alojzjakob](https:\u002F\u002Fgithub.com\u002Falojzjakob), see also https:\u002F\u002Fgithub.com\u002Falojzjakob\u002FEspSee\n\nAllow access to multiple cameras behind single dynamic IP with different ports port-forwarded through the router. Another limitation was to avoid using DDNS because it was hard\u002Fimpossible to set up on given router.\nYou will be able to easily construct list of your cameras with data contained in JSON sent to your server\u002Fwebsite.\n\nTo enable External Heartbeat, under **Edit Config** -> **Others** tab, enter fields:\n* `Heartbeat receiver domain or IP` (e.g. www.espsee.com)\n* `Heartbeat receiver URI` (e.g. \u002Fheartbeat\u002F)\n* `Heartbeat receiver port` (443 for ssl, 80 for non-ssl, or your custom port)\n* optionally `Heartbeat receiver auth token` (if you use EspSee, it will provide auth token for your user account)\n* Then set `External Heartbeat Server enabled` \n\nHeartbeat will be sent every 30 (default) seconds. It will do a POST request to defined domain\u002FURI (i.e. www.mydomain.com\u002Fmy-esp32cam-hub\u002Findex.php) with JSON body, containing useful information you might need for your specific application.\n\nIf you are using EspSee, it will do a POST request to defined domain\u002FURI (i.e. https:\u002F\u002Fwww.espsee.com\u002Fheartbeat\u002F?token=[your_token]) with JSON body, containing useful information about your camera allowing this website to connect it to your user account and provide a way to easily access your camera(s) without the need for DDNS.\n\nIf you want to have multiple cameras accessible from the same external IP (behind router) you might need to do port forwarding and set ports on EspSee camera entries accordingly.\n\nTo incorporate, set `#define INCLUDE_EXTHB` to `true`.\n\n\n## Port Forwarding\n\nTo access the app remotely over the internet, set up port forwarding on your router for browser on HTTP port, eg:\n\n![image2](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fs60sc_ESP32-CAM_MJPEG2SD_readme_2ffe0fa3d231.png)\n\nOn remote device, enter url: `your_router_external_ip:10880`  \nTo obtain `your_router_external_ip` value, use eg: https:\u002F\u002Fapi.ipify.org  \nSet a static IP address for your ESP camera device.  \nFor security, **Authentication settings** should be defined in **Access Settings** sidebar button.\n\nNote that some internet providers will use [CGNAT](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FCarrier-grade_NAT), which will make port forwarding hard to achieve or impossible (you might need to contact your ISP and ask them for a solution if they are willing to help).\n\n## I2C Devices\n\n\u003Cimg align=right src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fs60sc_ESP32-CAM_MJPEG2SD_readme_48e7e091b68e.jpg\" width=\"300\" height=\"450\">\n\nMultiple I2C devices can share the same two I2C pins. As the camera also uses I2C then the other devices can either share the camera I2C pins or use a separate I2C port. The shared I2C concept was contributed by [@rjsachse](https:\u002F\u002Fgithub.com\u002Frjsachse). \n\nThe former approach saves pins, particularly on the ESP32, but generally ESP32 cam boards do not have the pins exposed so some soldering of wires is required. The ESP32S3 boards generally have all pins exposed.  \n\nThe image shows how wires can be connected to the shared I2C port on the ESP32 AI Thinker style cams. The orange wire is the SDA pin (GPIO26) and the white wire is the SCL pin (GPIO27). Each wire is soldered to the top of an on-board resistor.\n\nBy default, the I2C port is shared with the camera, but a separate port can be used by defining alternative SDA and SCL pins under the **Peripherals** tab.\n\nTo incorporate I2C support, set `#define INCLUDE_I2C` to `true`.\nTo enable a particular I2C device, set corresponding `#define USE_*` to `true` in `appGlobals.h`.\n\n## Telemetry Recording\n\nThis feature is better used on an ESP32S3 camera board due to performance and memory limitations on ESP32.\n\nTelemetry such as environmental and motion data (eg from BMP280 and MPU9250 on GY-91 board) can be captured during a camera recording. It is stored in a separate CSV file for presentation in a spreadsheet. The CSV file is named after the corresponding AVI file. A subtitle (SRT) file is also created named after the corresponding AVI file. The CSV and SRT files are uploaded or deleted along with the corresponding AVI file. For downloading, the AVI, CSV and SRT files are bundled into a zip file. If the SRT file is in the same folder as the AVI file, telemetry data subtitles will be displayed by a media player. \n\nThe user needs to add the code for the required sensors to the file `telemetry.cpp`. Contains simple example for the BMP280 and MPU9250 devices.\n\nTo switch on telemetry recording, select the `Use telemetry recording` option bunder the **Peripherals** button. The frequency of data collection is set by `Telemetry collection interval (secs)`.\n\nNote: esp-camera library [conflict](https:\u002F\u002Fforum.arduino.cc\u002Ft\u002Fconflicitng-declaration-in-adafruit_sensor-esp32-camera\u002F586568) if use Adafruit sensor library.\n\nTo incorporate, set `#define INCLUDE_TELEM` to `true`.\n\n## Telegram Bot\n\nOnly enable one of Telegram or SMTP email.  \nUse [IDBot](https:\u002F\u002Ft.me\u002Fmyidbot) to obtain your Chat ID.  \nUse [BotFather](https:\u002F\u002Ft.me\u002Fbotfather) to create a Telegram Bot and obtain the Bot Token.  \nIn **Edit Config** page under **Other** tab, paste in `Telegram chat identifier` and `Telegram Bot token` and select `Use Telegram Bot`.  \nYou may want to make the bot private.  \nNote that this feature uses a lot of heap space due to TLS.\n\nThe Telegram Bot will now receive motion alerts from the app showing a frame from the recording with a caption containing a command link for the associated recording (max 50MB) which can be downloaded and played.  \n\nTo incorporate, set `#define INCLUDE_TGRAM` to `true`.\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fs60sc_ESP32-CAM_MJPEG2SD_readme_c3a3bec1c43a.png\" width=\"500\" height=\"500\">\n\n\n## Remote Control\n\nProvides for remote control of device on which camera is mounted, e.g RC vehicle for FPV etc.  \nBest used with ESP32-S3 for frame rate and control responsiveness.\n\nTo enable, in **Edit Config** page under **Peripherals**, select `Enable remote control`, then save and reboot\nThis will show an extra config button **RC Config**.  \nPressing the **RC Config** button will allow pins to be defined for:\n- SG90 type steering servo\n- H-bridge motor control (tested with MX1508)\n- On \u002F off lights\n- Further parameters for vehicle control.\n\nSteering can either be provided by servo control, or by track steering using separately controlled left and right side motors.\n\nThe streaming view will now have a red button in the top left. Press this to show \u002F hide overlaid steering and motor controls. Camera view buttons can be used to change to full screen. Tethered vehicles can also be controlled via a HW-504 type joystick. Camera view (and microphone and telemetry if enabled) can be recorded.  \nMotion detection should be disabled beforehand.  \n\nThis feature can make use of an [Auxiliary Board](#auxiliary-board).  \n\nTo incorporate, set `#define INCLUDE_PERIPH` to `true` and `#define INCLUDE_MCPWM` to `true`.\n\n#### Only use this feature if you are familiar with coding and electronics, and can fix issues yourself\n\n## Machine Learning\n\nMachine Learning AI can be used to further discriminate whether to save a recording when motion detection has occurred by classsifying whether the object in the frame is of interest, eg a human, type of animal, vehicle etc. \n\nOnly feasible on ESP32S3 due to memory use and built in AI Acceleration support.\n#### Only use this feature if you are familiar with Machine Learning\n\nThe interface is designed to work with user models packaged as Arduino libraries by the [Edge Impulse](https:\u002F\u002Fedgeimpulse.com\u002F) AI platform.\nMore details in `appGlobals.h`.   \n\nUse 96x96 grayscale or RGB images and train the model with for example the following Transfer learning Neural Network settings:  \n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fs60sc_ESP32-CAM_MJPEG2SD_readme_b22b153e8259.png\" width=\"500\" height=\"400\">\n\n\n## Camera Hub\n\nThis tab enables the web interfaces of other ESP32-CAM_MJPEG2SD camera devices to be accessed. To show this tab, in **Edit Config** page under **Other**, select `Show Camera Hub tab`.  \n\nIn the tab, enter IP address of another camera and press **Add IP** button, a screen showing an image from the camera is displayed with its IP address overlayed. Repeat for each camera to be monitored. Click on an image to open the web page for that camera.  \n\nPress **X** icon on image to remove that IP address. Press **Delete All** button to remove all IP addresses. Press **Refresh** button to update each screen with the latest image from that camera.  \n\nThe IP addresses are stored in the browser local storage, not the app itself.\n\n## Stream to NVR\n\nThis feature is better used on an ESP32S3 camera board due to performance and memory limitations on ESP32.\n\nEither HTTP or RTSP can be used, but not together. RTSP is more sophisticated.\n\nStreaming performance depends on quality of network connection, but can be increased by switching off motion detection, as if a recording occurs during streaming it will take priority and the streams may stutter.\n\n#### RTSP\n\nThis requires an additional library to be installed - see [RTSPServer](https:\u002F\u002Fgithub.com\u002Frjsachse\u002FESP32-RTSPServer) library for details. Must be version 1.3.1 or above\n\nTo integrate library with this app, set `#define INCLUDE_RTSP` to `true`.\n\nTo enable RTSP, under **Edit Config** -> **Streaming** tab, select: \n* `Enable RTSP Video` for video stream\n* `Enable RTSP Audio` for audio stream (need to setup [microphone](#audio-recording) beforehand).\n* `Enable RTSP Subtitles` for subtitle stream (need to setup [telemetry](#telemetry-recording) beforehand, otherwise just a timestamp and FPS will be output)\n\nThen save and reboot. \n\nTo view the stream, connect to `rtsp:\u002F\u002F\u003Ccamera_ip>:\u003CRTSPport>` using app supporting RTSP.\n\nOr if authentication is enabled (username and password):\n`rtsp:\u002F\u002F\u003CRTSPuser>:\u003CRTSPpass>@\u003Ccamera_ip>:\u003CRTSPport>`\n\nRTSP now supports multiple clients for multicast. You can also override this logic and enable multiple clients for all transports (TCP, UDP, Multicast) by commenting out \u002F\u002F#define OVERRIDE_RTSP_SINGLE_CLIENT_MODE in rtsp.cpp. \nHowever, enabling multiple clients for all transports can slow the stream down and may cause issues, so use with care. It is better to leave it for only one client if using TCP or UDP unicast for best results. For more details, \ncheck out the README in the RTSPServer library.\n\n#### HTTP\n\nHTPP streaming is available if `#define INCLUDE_RTSP` is set to `false`.\n\nStreams separate from the web browser are available for capture by a remote NVR. To enable these streams, under **Edit Config** -> **Streaming** tab, select: \n* `Enable Video stream on \u002Fsustain?video=1` for MJPEG stream\n* `Enable Audio stream on \u002Fsustain?audio=1` for WAV stream (need to setup [microphone](#audio-recording) beforehand).\n* `Enable Subtitle stream on \u002Fsustain?srt=1` for SRT stream (need to setup [telemetry](#telemetry-recording) beforehand, otherwise just a timestamp will be output).\n\nThen save and reboot. \n\nIf multiple streams are enabled they need to be processed by an intermediate tool for synchronisation, eg [go2rtc](https:\u002F\u002Fgithub.com\u002FAlexxIT\u002Fgo2rtc) (but which does not handle subtitles [yet?](https:\u002F\u002Fgithub.com\u002FAlexxIT\u002Fgo2rtc\u002Fissues\u002F932)). See [ESP32-CAM_Audio](https:\u002F\u002Fgithub.com\u002Fspawn451\u002FESP32-CAM_Audio#usage) for go2rtc configuration examples. \n\n\n## WebDAV\n\nA simple WebDAV server is included. A WebDAV client such as Windows 10 File Explorer can be used to access and manage the SD card content. In a folder's address bar enter `\u003Cip_address>\u002Fwebdav`, eg `192.168.1.132\u002Fwebdav`  \nFor Windows 11, Android, MacOS, Linux see `webDav.cpp` file.\n\nTo incorporate, set `#define INCLUDE_WEBDAV` to `true`\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fs60sc_ESP32-CAM_MJPEG2SD_readme_54783807b8a8.png\" width=\"600\" height=\"300\">\n\n## Photogrammetry\n\nESP can be used to capture a series of photographs of small objects, controlling a stepper motor driven turntable, using either the ESP camera for low resolution images, or a DSLR camera for high resolution images remotely controlled by the ESP. The captured images can be used to generate a 3D model.  \n\nTo enable this feature, in **Edit Config** page under **Peripherals**, select `Enable photogrammetry`, then save and reboot.  \nThis will show an extra config button **PG Config**. Pressing this button will bring up options for controlling the photogrammetry process.  \n\nThis feature can make use of an [Auxiliary Board](#auxiliary-board).  \n\nSee `photogram.cpp` for more information. To incorporate, set `#define INCLUDE_PGRAM` to `true`\n\n","# ESP32-CAM_MJPEG2SD\n\n适用于搭载OV2640\u002FOV3660\u002FOV5640\u002FPY260摄像头的ESP32\u002FESP32S3，可将JPEG图像以AVI格式录制到SD卡，并通过MJPEG流在浏览器中播放。AVI格式使录制内容能够在媒体播放器上以正确的帧率回放。若安装了麦克风，则会同时创建一个WAV文件并嵌入到AVI文件中。\n\n该应用支持：\n* [摄像头运动检测](#motion-detection-by-camera)或PIR\u002F雷达传感器\u002F加速度计\n* [连续录制](#continuous-recording)——延时摄影或行车记录仪模式\n* [音频录制](#audio-recording)——来自I2S或PDM麦克风\n* 摄像头云台伺服电机及灯光控制\n* [RTSP服务器](#rtsp)——视频、音频和字幕流\n* [遥测数据记录](#telemetry-recording)——在摄像机录制期间\n* [远程控制](#remote-control)——对搭载摄像机的车辆进行远程操控\n* 警报通知——通过[Telegram](#telegram-bot)或电子邮件\n* 同时向Web浏览器和[远程NVR](#stream-to-nvr)进行流式传输——使用HTTP或RTSP协议\n* 通过FTP、HTTPS、[WebDAV](#webdav)传输录制文件，或直接从浏览器下载\n* [MQTT](#mqtt)控制——与Home Assistant集成\n* [外部看门狗](#external-heartbeat)支持\n* 外设支持：SG90伺服电机、MX1508 H桥、28BYJ-48步进电机、HW-504操纵杆、BMP280、MPU9250、MY9221\u002FWS2812\u002FSK6812 LED灯\n* I2C设备支持：BMP280、BME280、MPU6050、MPU9250、SSD1306、LCD1602等\n* 机器学习接口支持\n* [相机中心](#camera-hub)功能——用于访问其他ESP32-CAM_MJPEG2SD设备\n* [摄影测量](#photogrammetry)功能——用于拍摄照片以进行3D建模\n* 使用[扩展板](#auxiliary-board)以获得更多引脚\n* [对讲](#intercom)功能——利用ESP上的麦克风和扬声器，以及用户设备浏览器中的麦克风和扬声器\n* 可选[以太网](#configuration-web-page)网络连接——替代WiFi\n\n由于ESP32的堆内存有限，无法支持所有功能。为获得更好的性能和功能，建议使用新款ESP32S3摄像头开发板，例如Freenove ESP32S3 Cam、ESP32S3 XIAO Sense、ESP32-S3-Cam（AI Thinker款式），但应避免使用标有“ESPS3 RE:1.0”的无品牌板。\n\n***这是一个复杂的应用程序，部分用户在应用提示警告时会提出问题，但这实际上是应用在提醒用户其硬件配置存在问题，而只有用户本人才能解决这些问题。请注意，一些克隆板的规格可能与原版不同，例如PSRAM容量。请仅针对实际的软件错误（ERR消息、未处理的库错误或崩溃）提交问题。如需提出改进建议，请使用讨论区。***\n\n10.9.3版本更新内容：\n* 新增[以太网](#configuration-web-page)网络选项，替代WiFi\n* 为[`CAMERA_MODEL_Waveshare_ESP32_S3_ETH`](https:\u002F\u002Fwww.waveshare.com\u002Fwiki\u002FESP32-S3-ETH)添加引脚\n* 定义外接W5500以太网控制器的引脚\n* 修复问题[#650](https:\u002F\u002Fgithub.com\u002Fs60sc\u002FESP32-CAM_MJPEG2SD\u002Fissues\u002F650)\n* 支持使用MPU6050或MPU9250加速度计进行运动检测\n* 支持OV5640自动对焦\n* 日志记录和内存使用优化\n* 修复问题[#697](https:\u002F\u002Fgithub.com\u002Fs60sc\u002FESP32-CAM_MJPEG2SD\u002Fissues\u002F697)\n* 修复问题[#698](https:\u002F\u002Fgithub.com\u002Fs60sc\u002FESP32-CAM_MJPEG2SD\u002Fissues\u002F698)\n* 内部改进\n\n## 应用目的\n\n该应用程序可用于运动检测或连续录制视频。典型应用场景包括安防摄像头、野生动物监测、火箭飞行监控以及FPV飞行器控制。\n\n将一组JPEG图像保存为单个文件比分别保存为多个文件更快，也更易于管理，尤其是在图像尺寸较小的情况下。实际速率取决于SD卡的质量和容量，以及图像的复杂度和质量。一块标称Class 6的无品牌4GB SDHC卡，其写入速度仅为正品Sandisk 4GB SDHC Class 2卡的三分之一。以下是在全新格式化的Sandisk 4GB SDHC Class 2卡上，使用AI Thinker OV2640开发板、设置为最高JPEG质量和20MHz时钟频率时测得的录制速率。而在ESP32S3上采用24MHz时钟频率时，最大帧率可从50提升至60、25提升至30，但可能需要适当降低JPEG质量。\n\n帧尺寸 | OV2640摄像头最大帧率 | mjpeg2sd最大帧率 | 检测时间 ms\n------------ | ------------- | ------------- | -------------\n96×96 | 50 | 45 |  15\nQQVGA | 50 | 45 |  20\nQCIF  | 50 | 45 |  30\nHQVGA | 50 | 45 |  40\n240×240 | 50 | 45 |  55\nQVGA | 50 | 40 |  70\nCIF | 50 | 40 | 110\nHVGA | 50 | 40 | 130\nVGA | 25 | 20 |  80\nSVGA | 25 | 20 | 120\nXGA | 12.5 | 5 | 180\nHD | 12.5 | 5 | 220\nSXGA | 12.5 | 5 | 300\nUXGA | 12.5 | 5 | 450\n\nESP32S3（采用Freenove ESP32S3 Cam开发板，搭载ESP32S3 N8R8模块）运行该应用的速度大约是ESP32的两倍，主要得益于其更快的PSRAM。它能够以OV2640的最大帧率进行录制，包括[音频](#audio-recording)，除UXGA外的所有帧尺寸均可达到最高帧率（UXGA最高10fps）。\n\n## 设计\n\nESP32 Cam模块配备4MB PSRAM（大多数ESP32S3则为8MB），用于缓存摄像头帧以及构建AVI文件，从而减少SD卡的写入次数，并通过与SD卡扇区大小对齐来优化写入操作。在播放时，AVI文件会从SD卡读取到多扇区大小的缓冲区中，然后按时间顺序逐帧发送到浏览器。默认情况下，SD卡以**MMC 1线**模式工作，因为这种模式在ESP32上几乎与**MMC 4线**模式一样快，同时释放了连接板载灯的引脚4，以及可用于PIR等传感器的引脚12。然而，在ESP32S3上，[@josef2600](https:\u002F\u002Fgithub.com\u002Fjosef2600)的测试表明，**MMC 4线**模式可使速度提高一倍（参见[此处](https:\u002F\u002Fgithub.com\u002Fs60sc\u002FESP32-CAM_MJPEG2SD\u002Fissues\u002F529#issuecomment-2588088722)）。\n\nAVI文件以日期时间格式命名，格式为**YYYYMMDD_HHMMSS**，并在末尾附加帧尺寸、录制帧率和持续时间（秒），例如**20200130_201015_VGA_15_60.avi**，存储在按天创建的文件夹**YYYYMMDD**中。如果包含音频，文件名将以**_S**结尾；若有遥测数据，则以**_M**结尾。ESP32的时间由NTP服务器或连接的浏览器客户端同步设定。\n\n## 安装\n\n将 GitHub 项目文件下载到 Arduino IDE 的草图文件夹中，并移除应用文件夹名称中的 `-master`。\n\n请使用至少 arduino-esp32 核心 v3.1.1 版本进行编译，该版本包含网络修复和帧选择方面的改进。\n\n在 `appGlobals.h` 文件中，仅取消注释一个 `#define CAMERA_MODEL_*` 宏来选择所需的 ESP-CAM 板，除非使用默认设置：\n* ESP32 Cam 板 - `CAMERA_MODEL_AI_THINKER`\n* Freenove ESP32S3 Cam 板 - `CAMERA_MODEL_FREENOVE_ESP32S3_CAM`\n\n默认情况下不包含可选功能。如需启用某项功能，请在 `appGlobals.h` 中将相应的 `#define INCLUDE_*` 设置为 `true`。\n\n选择 ESP32 或 ESP32S3 开发板，并启用 PSRAM，同时使用以下分区方案：\n* ESP32 - `Minimal SPIFFS (...)`\n* ESP32S3 - `8M with spiffs (...)` 或 `16MB(3MB APP...)`\n\n**注意：**\n* **如果出现编译错误，请通过 [Boards Manager](https:\u002F\u002Fgithub.com\u002Fs60sc\u002FESP32-CAM_MJPEG2SD\u002Fissues\u002F61#issuecomment-1034928567) 将 IDE 中的 `arduino-esp32` 核心库更新至最新 v3.x 版本。**\n* **如果出现错误：`启动失败：请检查 SD 卡是否已插入` 或 `相机初始化错误 0x105`，通常是由于 [相机板选择错误](https:\u002F\u002Fgithub.com\u002Fs60sc\u002FESP32-CAM_MJPEG2SD\u002Fissues\u002F219#issuecomment-1627785417) 导致的。**\n* **如果出现警告：`检测到崩溃循环，请查看日志`，通常是因为电源供应不足。**\n\n\n首次安装时，应用程序将以 Wi‑Fi AP 模式启动——连接到 SSID：**ESP-CAM_MJPEG_...**，以便通过 `192.168.4.1` 上的网页选择路由器并输入路由器密码。配置数据文件（除密码外）会自动创建，且当有互联网连接时，应用程序的网页会自动从 GitHub 下载到 SD 卡的 **\u002Fdata** 文件夹中。\n\n后续对应用程序或 **\u002Fdata** 文件夹中文件的更新，可以通过 **OTA 上传** 选项卡完成。此外，也可以通过 **编辑配置** 选项卡上的 **重新加载 \u002Fdata** 按钮，或使用 WebDAV 客户端，从 GitHub 重新加载 **\u002Fdata** 文件夹。\n\n由 [@ldijkman](https:\u002F\u002Fgithub.com\u002Fldijkman) 提供的另一种安装流程，请参见 [此处](https:\u002F\u002Fyoutu.be\u002FYLLGBM3i2aQ)。\n\n浏览器功能仅在 Chrome 浏览器上经过全面测试。\n\n\n## 主要功能\n\n录制可通过以下两种方式触发：一是由摄像头自身检测到运动；二是保持某个引脚处于高电平状态（松开时内部下拉电阻将其拉低），例如使用主动高电平输出的运动传感器，如 PIR（HC‑SR501）或微波雷达（CWL‑0516），或者 I2C 加速度计（MPU6050），亦或是非运动检测类传感器，如声音传感器（KY‑037）。\n\n此外，还可以通过网页上的 **开始录制** 按钮手动发起录制。\n\n要回放录制内容，首先使用侧边栏中的 **播放与文件传输** 按钮选择日期文件夹，再选择所需的 AVI 文件。选定 AVI 文件后，点击 **开始播放** 按钮即可播放录像。\n\n而 **开始直播** 按钮则仅显示来自摄像头的实时视频流。\n\n录制内容随后可以上传至 FTP 或 HTTPS 服务器，也可下载到浏览器并在媒体播放器（如 VLC）中播放。若需集成 FTP 或 HTTPS 服务器，请将 `#define INCLUDE_FTP_HFS` 设置为 `true`。\n\n## 连续录制\n\n系统提供延时摄影功能，可与运动捕捉功能并行运行。在侧边栏的 **运动检测与录制** 按钮下，选择 **延时摄影** 按钮。延时摄影的配置可在 **编辑配置** 选项卡的 **运动** 部分进行。\n\n延时摄影文件的命名格式为：**20200130_201015_VGA_15_60_T.avi**。\n\n连续录制功能会在设备开机后按顺序生成一系列文件，类似于行车记录仪的录制方式。使用 **运动检测与录制** 侧边栏按钮中的 **行车记录仪** 滑块，选择每个文件的时长（以分钟为单位）。设置完成后需先点击 **保存设置** 按钮，再点击 **重启 ESP** 才能开始录制。\n\n将滑块值设为 0 可关闭此功能。生成的文件名格式为：**20200130_201015_VGA_15_60_C.avi**。连续录制期间，运动检测功能将被禁用。\n\n延时摄影与行车记录仪功能互斥。\n\n\n## 其他功能与配置\n\n应用程序的操作可按如下方式动态调整，操作界面主要直观易懂，用户可通过主页面完成相关设置。\n\n连接设置：\n* 在侧边栏的 **访问设置** 按钮中，可配置 Wi‑Fi\u002F以太网、时区、FTP\u002FHTTPS、SMTP 以及认证参数。\n  - 对于 **时区**，可使用下拉菜单，或直接粘贴来自 [此处](https:\u002F\u002Fraw.githubusercontent.com\u002Fnayarsystems\u002Fposix_tz_db\u002Fmaster\u002Fzones.csv) 第二列的时区代码。\n* 若要使更改永久生效，请点击 **保存** 按钮。\n  * 网络设置更改后，必须重启 ESP 设备。\n* 启用 mdns 域名服务，以便使用 `http:\u002F\u002F[主机名]` 而不是 IP 地址。\n\n修改录制参数：\n* **分辨率** 是每帧的像素尺寸。\n* **帧率** 是每秒所需帧数。\n* **质量** 是 JPEG 压缩级别，会影响图像文件大小。\n\nSD 存储管理：\n* 可通过下拉列表选择要删除的文件或文件夹，然后点击 **删除** 按钮并确认。\n* 也可通过下拉列表选择要上传的文件或文件夹，然后点击 **文件上传** 按钮，将其以 AVI 格式上传至远程服务器。\n* 使用 **下载** 按钮可将选定的 AVI 文件从 SD 卡下载到浏览器。\n* 当 SD 卡剩余空间不足时，可删除最旧的文件夹，或将文件上传后再删除。\n\n通过网页上的 **显示日志** 选项卡查看应用程序日志：\n* 可选择不同的日志类型进行显示：\n  * RTC RAM：RTC RAM 中循环存储的 7KB 日志（默认）。\n  * WebSocket：日志通过 WebSocket 动态输出。\n  * SD 卡：无限容量的日志保存在 SD 卡上。\n* 使用滑块可启用 SD 卡日志记录，但可能会降低录制速率。\n* 可使用按钮刷新或清除所选日志。\n\n## 配置网页\n\n更多配置详情可通过“编辑配置”选项卡访问，该选项卡会显示更多按钮：\n\n**网络**：\n* 默认网络接口为Wi‑Fi，但也可使用以太网，方法是使用内置以太网功能的开发板，例如 [`CAMERA_MODEL_Waveshare_ESP32_S3_ETH`](https:\u002F\u002Fwww.waveshare.com\u002Fwiki\u002FESP32-S3-ETH)，或通过连接外部W5500以太网控制器。\n* 此功能仅适用于ESP32S3开发板。\n* 重启后，所有现有服务将自动使用所选的网络接口。\n* 如果在“访问设置”侧边栏中已将网络接口设置为以太网：\n  * 应用程序将以静默模式运行（Wi‑Fi和BLE关闭）。\n  * 初始启动仍会准备SD卡上的`\u002Fdata`文件夹和用户界面。\n  * Wi‑Fi AP向导将被禁用；可通过设备的DHCP IP地址或mDNS `http(s):\u002F\u002F\u003Chostname>.local`访问设备（如果您的网络支持）。\n  * 硬件层面支持PoE版本；电源由开发板直接提供。\n  * 由[@RedCanti](https:\u002F\u002Fgithub.com\u002FRedCanti)贡献。\n* 如果在“访问设置”侧边栏中已将网络接口设置为Eth+AP：\n  * 以太网与Wi‑Fi AP可同时启用，但它们使用独立的网络。\n  * 请勿同时在两个网络上打开网页。\n* 若要使用外部W5500以太网控制器，在选择以太网或Eth+AP后，“编辑配置”选项卡中会出现一个额外的“以太网”选项卡，用于输入连接W5500以太网控制器的SPI引脚编号。\n\n**运动检测**：\n请参阅“通过摄像头进行运动检测”章节。\n\n**外设**，例如：\n* 选择是否使用PIR或雷达传感器（这些传感器也可与摄像头运动检测并行使用）。\n* 控制摄像头的云台。\n* 连接PDM或I2S麦克风及I2S功放。\n* 连接DS18B20温度传感器。\n* 监控ADC引脚上的电池电压。\n* 在夜间深度睡眠后，通过光敏电阻唤醒。\n\n要集成外设，请将`#define INCLUDE_PERIPH`设置为`true`。\n\n“外设”选项卡还会显示其他配置选项卡：\n* **音频**：用于配置麦克风和功放。\n* **遥控配置**：用于配置遥控车辆的硬件。\n* **舵机**：用于配置控制摄像头和遥控转向的舵机。\n* **摄影测量控制**：用于配置和控制摄影测量相关的硬件。\n\n应用更改后，需先点击“保存”，再点击“重启ESP”，以使外设在更改生效后重新启动。\n\n请注意，ESP32摄像头模块上的可用引脚数量有限，无法支持所有外部传感器。可使用的引脚（存在一定限制）有：3、4、12、13、26、27、32、33。\n* 引脚3：标记为U0R。仅用作输入引脚，因为它也用于固件烧录。\n* 引脚4：同时也用于板载灯。可通过移除其限流电阻来关闭灯。\n* 引脚12：仅用作输出引脚。\n* 引脚13：内部弱上拉。\n* 引脚26、27：为I2C引脚，可与摄像头共享——详见“I2C设备”章节。\n* 引脚32：用于控制摄像头的电源开关。未引出至外部，但具备电子知识的用户可根据电路图将其断开，从而使摄像头始终处于开启状态。\n* 引脚33：用于板载红色LED。未引出至外部，但可通过移除其相邻的3V3电阻和红色LED限流电阻，并在VCC引脚与红色LED限流电阻焊盘之间连接导线，从而实现对VCC引脚的再利用。\n\n请勿使用任何其他暴露的引脚，包括PSRAM所使用的引脚16。\n\nFreenove版的ESP32S3开发板拥有较多空闲引脚，可支持多种外设。\n而XIAO Sense版的ESP32S3虽然空闲引脚较少，但仍多于ESP32。\n\n板载LED：\n* ESP32：灯4，信号33。\n* ESP32S3：\n  * Freenove：灯48，信号2。\n  * XIAO：无灯，信号21。\n\n**其他**：\n管理SD卡、电子邮件、Telegram等。若要集成电子邮件（SMTP），请将`#define INCLUDE_SMTP`设置为`true`。\n\n启用或禁用某项功能时，应使用“保存”按钮以持久化更改，并通过“重启ESP”按钮重启ESP。\n\n\n## 通过摄像头进行运动检测\n\n摄像头本身可通过`motionDetect.cpp`文件检测运动并生成AVI录像。它会从摄像头获取任意尺寸的JPEG图像，并以1\u002FN的比例实时采样，将这些图像解码为非常小的灰度位图，然后与前一帧样本进行比较。这种小尺寸的处理方式可以平滑图像、去除伪影，并缩短处理时间。\n\n对于运动检测，采用较高的采样率，即每2帧检测一次。一旦检测到运动，检查运动停止的频率会降低至每10帧检测一次，以便在几乎不增加额外开销的情况下捕获JPEG图像。下表“检测时间ms”展示了从OV2640摄像头获取并解码分析一帧图像所需的大致毫秒数。\n\n摄像头运动检测默认启用；如需禁用，请在“运动检测与录制”侧边栏按钮中取消勾选“启用运动检测”。由于JPEG解码器的限制，运动检测不适用于SXGA以上分辨率的帧大小。\n\n\u003Cimg align=right src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fs60sc_ESP32-CAM_MJPEG2SD_readme_b0766e03306f.png\" width=\"200\" height=\"200\">\n\n摄像头首页还提供了其他选项，其中：\n* “运动灵敏度”用于设置运动检测的阈值，数值越高灵敏度越高。\n* “显示运动”：若启用并按下“开始直播”按钮，将显示运动检测的过程图像，用于校准。灰度图像中，红色像素表示运动区域。\n* “最小帧数”：指至少需要捕获多少帧图像，否则文件会被删除。\n\n\n## 音频录制\n\nESP32和ESP32S3均支持I2S麦克风，例如INMP441。而PDM麦克风，例如MP34DT01，则仅在ESP32S3上支持。音频录制在ESP32S3上运行良好，但在ESP32上则不可行，因为会显著降低帧率。\n\n音频格式为16位单声道PCM，采样率为16kHz。I2S麦克风需要3个空闲引脚，而PDM麦克风则需要2个空闲引脚（I2S SCK引脚必须设置为-1）。引脚配置值（针对XIAO Sense预设）可在配置网页的“音频”按钮下设置。\n\n网页上有一个“麦克风增益”滑块。数值越高，麦克风增益越大。选择“0”则会取消麦克风功能。\n\n网页上的扬声器图标按钮可用于通过浏览器收听麦克风采集的声音。\n\n要集成音频功能，请将`#define INCLUDE_AUDIO`设置为`true`。\n\n## 对讲机\n\n对讲机功能允许配备麦克风和功放\u002F扬声器的ESP32与托管应用程序网页的设备之间进行双向通话，其中浏览器可以访问主机设备的麦克风和扬声器。访问设备麦克风可能受到安全限制，请参阅 `audio.cpp`。此功能仅在ESP32S3上可行，且两端需要良好的WiFi连接和空间隔离，以防止产生反馈回路。\n\n如果安装了I2S麦克风，I2S功放只需要ESP32S3上一个空闲引脚，因为它们可以共用时钟引脚。引脚值可在配置网页的**音频**按钮下设置。\n\n网页上有一个用于调节**功放音量**的滑块。数值越高，ESP扬声器的音量越大。选择**0**则会关闭扬声器。\n\n主页面左侧显示浏览器设备麦克风和扬声器的图标。选择这些图标（若未置灰）即可激活浏览器的麦克风或扬声器。\n\n\n## OV5640 & OV3660\n\nOV5640和OV3660的引脚排列与专为OV2640设计的板子兼容，但其供电电压过高，超出了内部1.5V稳压器的承受范围，因此相机容易过热，除非加装散热片。\n\n出于录制目的，OV5640应仅与ESP32S3板子配合使用。由于内存限制，高于“FHD”分辨率的帧尺寸仅适用于拍摄静态图像。\n\n在ESP32S3上，OV5460最高分辨率下的可录制帧率如下：\n\n帧尺寸 | FPS  \n------------ | -------------\nQXSGA | 4\nWQXGA | 5\nQXGA | 5\nQHD | 6\nFHD | 6\nP_FHD | 6\n\n要在具备相应功能的模块上使用自动对焦功能，需安装`ESP32_OV5640_AF`库，并在`appConfigs.h`中设置`#define INCLUDE_AF true`。\n\n## PY260\n\nPY260是一款500万像素的摄像头，随M5Stack Unit CamS3 5MP模块（CAMERA_MODEL_M5STACK_CAMS3_UNIT）提供。它具有不同于Omnivision系列相机的传感器设置，具体参数在侧边栏的**图片设置**选项卡中定义。\n\n## 辅助板\n\n为释放摄像头板上的引脚资源，本应用可同时安装在摄像头板和辅助板上，后者负责驱动诸如BDC电机、步进电机和舵机等硬件。与辅助板的通信方式有以下两种：\n\n* 不再将来自应用网页的指令直接发送到摄像头板，而是将其重定向到辅助板。\n* 摄像头板通过UART连接将应用网页的指令转发到辅助板。\n\n辅助板可用于驱动以下硬件：\n* 实时控制遥控车的速度、转向和灯光。\n* 控制摄像头的水平和垂直转动。\n* 执行摄影测量操作。\n\n在摄像头板上按常规方式安装应用。在**外设**选项卡下，选择以下任一方式：\n* 在“将RC\u002F伺服\u002F摄影测量指令发送至辅助IP”字段中输入辅助板的IP地址，保存并重启。此后，来自摄像头板网页的相关指令将被发送到辅助板。\n* 输入UART引脚编号并选择“使用UART进行辅助连接”，保存并重启。来自摄像头板网页的相关指令将先发送到摄像头板，再由摄像头板转发到辅助板。\n\n在辅助板上安装应用前，需在`appGlobals.h`中的摄像头选择模块中取消注释`#define AUXILIARY`。辅助板无需摄像头、SD卡或PSRAM，只需具备WiFi功能及足够的引脚来连接相关硬件即可。请注意，ESP32-C3不支持用于BDC电机的MCPWM。\n\n辅助板上的Auxil网页是摄像头应用网页的简化版本。**遥控配置**、**伺服配置**和**摄影测量配置**选项卡下的配置信息必须在辅助板网页上输入，而不能在摄像头网页上输入。如果使用UART连接，则需在两块板的网页上分别输入相关引脚编号，并将RX与TX相连，同时确保两块板共用一个地线。\n\n要启用此功能，需将`#define INCLUDE_UART`设置为`true`。\n\n## HTTPS\n\n默认情况下，该应用使用HTTP网页界面，但也可以配置为使用HTTPS。要启用此功能，需将`#define INCLUDE_CERTS`设置为`true`。由于mbedtls的内存占用以及应用对处理器的负载，HTTPS仅能在ESP32-S3上使用，但由于内存不足和中断看门狗复位，仍可能不稳定。此外，在**访问设置**中，还可以为HTTP访问定义用户登录名和密码，以提高安全性。\n\n有关如何生成和安装证书的信息，请参阅`certificates.cpp`文件。为避免浏览器提示“站点不安全”，请按照`certificates.cpp`中的说明将服务器证书导入浏览器。\n\n要切换HTTPS的开启或关闭状态，可点击侧边栏的**访问设置**按钮，并调整**使用HTTPS**滑块。\n\n注意：如果HTTPS已启用但证书配置不正确，将无法访问网页，此时需要手动删除SD卡上的证书文件。\n\n除了应用本身的HTTPS状态外，为防止在访问远程服务器时发生中间人攻击，还应开启**检查证书**滑块。有关如何获取远程服务器证书的信息，请参阅`certificates.cpp`文件。\n\n## MQTT\n\n要启用MQTT功能，在**编辑配置** -> **其他**选项卡中，填写以下字段：\n* “要连接的MQTT服务器IP”\n* “MQTT主题路径前缀”\n* 可选地，“MQTT用户名”和“MQTT密码”\n* 然后将“MQTT启用”设置为开启。\n\n如果配置不为空且Ping测试成功，MQTT将自动连接。它会向mqtt代理发送消息，例如记录开始\u002F停止、运动检测开始\u002F停止，发布在`\u002Fstatus`通道上。主题为：`homeassistant\u002Fsensor\u002F{esp cam hostname}\u002Fstate -> {\"MOTION\":\"ON\", \"TIME\":\"10:07:47.560\"}`\n\n您还可以向`\u002Fcmd`通道发布控制命令，以控制摄像头。主题为：`homeassistant\u002Fsensor\u002F{esp cam hostname}\u002Fcmd -> dbgVerbose=1;framesize=7;fps=1`\n\n要启用此功能，需将`#define INCLUDE_MQTT`设置为`true`。\n\n### Home Assistant MQTT摄像头集成\n\n与Home Assistant的[MQTT摄像头](https:\u002F\u002Fwww.home-assistant.io\u002Fintegrations\u002Fcamera.mqtt\u002F)集成由[@gemi254](https:\u002F\u002Fgithub.com\u002Fgemi254)贡献——发送MQTT发现消息，以：\n* 在检测到运动时发布图像载荷，显示在仪表盘上。\n* 自动在MQTT设备集成中创建一个Home Assistant摄像头设备。\n* 向`homeassistant\u002Fsensor\u002F{esp cam hostname}\u002Fmotion`通道发布运动开始\u002F停止的消息，可用于家庭自动化场景。\n* 在检测到运动时发布图像载荷，显示在仪表盘上。\n\n要启用此功能，需将`#define INCLUDE_HASIO`设置为`true`。\n\n\u003Ca href=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fs60sc_ESP32-CAM_MJPEG2SD_readme_c44877c71ac1.png\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fs60sc_ESP32-CAM_MJPEG2SD_readme_c44877c71ac1.png\" width=\"500\" height=\"350\">\u003C\u002Fa>\n\n## 外部心跳\n\n由 [@alojzjakob](https:\u002F\u002Fgithub.com\u002Falojzjakob) 贡献，更多信息请参见 https:\u002F\u002Fgithub.com\u002Falojzjakob\u002FEspSee\n\n允许通过路由器端口转发的不同端口访问位于单个动态 IP 后的多台摄像头。另一个限制是避免使用 DDNS，因为在给定的路由器上很难或无法设置。\n\n您将能够轻松构建包含发送到您的服务器\u002F网站的 JSON 数据中的摄像头列表。\n\n要启用外部心跳，在 **编辑配置** -> **其他** 选项卡中，填写以下字段：\n* `心跳接收器域名或 IP`（例如 www.espsee.com）\n* `心跳接收器 URI`（例如 \u002Fheartbeat\u002F）\n* `心跳接收器端口`（SSL 使用 443，非 SSL 使用 80，或自定义端口）\n* 可选地填写 `心跳接收器认证令牌`（如果您使用 EspSee，它会为您的用户账户提供认证令牌）\n* 然后设置 `启用外部心跳服务器`\n\n心跳将每 30 秒（默认）发送一次。它会向定义的域名\u002FURI（即 www.mydomain.com\u002Fmy-esp32cam-hub\u002Findex.php）发送一个 POST 请求，请求体为 JSON 格式，包含您特定应用可能需要的有用信息。\n\n如果您使用 EspSee，它会向定义的域名\u002FURI（即 https:\u002F\u002Fwww.espsee.com\u002Fheartbeat\u002F?token=[your_token]）发送一个 POST 请求，请求体为 JSON 格式，包含有关您的摄像头的有用信息，使该网站能够将其与您的用户账户关联，并为您提供无需 DDNS 即可轻松访问摄像头的方法。\n\n如果您希望从同一外部 IP 地址（位于路由器后）访问多台摄像头，您可能需要进行端口转发，并相应地在 EspSee 摄像头条目中设置端口。\n\n要集成此功能，请将 `#define INCLUDE_EXTHB` 设置为 `true`。\n\n## 端口转发\n\n要通过互联网远程访问应用程序，请在您的路由器上为浏览器的 HTTP 端口设置端口转发，例如：\n\n![image2](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fs60sc_ESP32-CAM_MJPEG2SD_readme_2ffe0fa3d231.png)\n\n在远程设备上，输入网址：`your_router_external_ip:10880`  \n要获取 `your_router_external_ip` 值，可以使用例如 https:\u002F\u002Fapi.ipify.org  \n为您的 ESP 摄像头设备设置静态 IP 地址。  \n出于安全考虑，应在 **访问设置** 侧边栏按钮中定义 **身份验证设置**。\n\n请注意，某些互联网服务提供商将使用 [CGNAT](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FCarrier-grade_NAT)，这将使端口转发难以实现或根本不可能（您可能需要联系您的 ISP 并要求他们提供解决方案，如果他们愿意协助的话）。\n\n## I2C 设备\n\n\u003Cimg align=right src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fs60sc_ESP32-CAM_MJPEG2SD_readme_48e7e091b68e.jpg\" width=\"300\" height=\"450\">\n\n多个 I2C 设备可以共享相同的两个 I2C 引脚。由于摄像头也使用 I2C，因此其他设备可以共享摄像头的 I2C 引脚，也可以使用单独的 I2C 端口。共享 I2C 的概念由 [@rjsachse](https:\u002F\u002Fgithub.com\u002Frjsachse) 贡献。\n\n前一种方法可以节省引脚，尤其是在 ESP32 上，但通常 ESP32 摄像头板不会暴露这些引脚，因此需要焊接一些电线。而 ESP32S3 板通常会暴露所有引脚。\n\n图片展示了如何将电线连接到 ESP32 AI Thinker 型号摄像头上的共享 I2C 端口。橙色电线是 SDA 引脚（GPIO26），白色电线是 SCL 引脚（GPIO27）。每根电线都焊接到板上电阻器的顶部。\n\n默认情况下，I2C 端口与摄像头共享，但可以通过在 **外设** 选项卡中定义替代的 SDA 和 SCL 引脚来使用单独的端口。\n\n要集成 I2C 支持，请将 `#define INCLUDE_I2C` 设置为 `true`。\n要启用特定的 I2C 设备，请在 `appGlobals.h` 中将相应的 `#define USE_*` 设置为 `true`。\n\n## 遥测记录\n\n由于 ESP32 的性能和内存限制，此功能更适合在 ESP32S3 摄像头板上使用。\n\n在摄像头录制期间，可以捕获环境和运动数据等遥测信息（例如来自 GY-91 板上的 BMP280 和 MPU9250）。这些数据会存储在一个单独的 CSV 文件中，以便在电子表格中呈现。CSV 文件以对应的 AVI 文件命名。同时还会创建一个以对应 AVI 文件命名的字幕文件（SRT）。CSV 和 SRT 文件会随对应的 AVI 文件一起上传或删除。下载时，AVI、CSV 和 SRT 文件会被打包成一个 ZIP 文件。如果 SRT 文件与 AVI 文件在同一文件夹中，媒体播放器将显示包含遥测数据的字幕。\n\n用户需要将所需传感器的代码添加到 `telemetry.cpp` 文件中。其中包含 BMP280 和 MPU9250 设备的简单示例。\n\n要开启遥测记录，请在 **外设** 按钮下选择 `使用遥测记录` 选项。数据采集频率由 `遥测采集间隔（秒）` 设置。\n\n注意：如果使用 Adafruit 传感器库，esp-camera 库会出现 [冲突](https:\u002F\u002Fforum.arduino.cc\u002Ft\u002Fconflictng-declaration-in-adafruit_sensor-esp32-camera\u002F586568)。\n\n要集成此功能，请将 `#define INCLUDE_TELEM` 设置为 `true`。\n\n## Telegram 机器人\n\n只能启用 Telegram 或 SMTP 邮件中的一种。  \n使用 [IDBot](https:\u002F\u002Ft.me\u002Fmyidbot) 获取您的聊天 ID。  \n使用 [BotFather](https:\u002F\u002Ft.me\u002Fbotfather) 创建 Telegram 机器人并获取机器人令牌。  \n在 **编辑配置** 页面的 **其他** 选项卡中，粘贴 `Telegram 聊天标识符` 和 `Telegram 机器人令牌`，并选择 `使用 Telegram 机器人`。  \n您可能希望将机器人设置为私密。  \n请注意，此功能由于使用 TLS 而会占用大量堆内存。\n\nTelegram 机器人现在将接收来自应用程序的移动警报，显示录制画面的一帧，并附带包含相关录制文件（最大 50MB）下载链接的说明文字，用户可以下载并播放该文件。\n\n要集成此功能，请将 `#define INCLUDE_TGRAM` 设置为 `true`。\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fs60sc_ESP32-CAM_MJPEG2SD_readme_c3a3bec1c43a.png\" width=\"500\" height=\"500\">\n\n\n## 远程控制\n\n用于对安装摄像头的设备进行远程控制，例如 FPV 用的遥控车辆等。  \n最适合与 ESP32-S3 一起使用，以获得更高的帧率和更灵敏的控制响应。\n\n要启用此功能，在 **编辑配置** 页面的 **外设** 选项卡中，选择 `启用远程控制`，然后保存并重启。\n这将显示一个额外的配置按钮 **RC 配置**。\n按下 **RC 配置** 按钮后，您可以为以下设备定义引脚：\n- SG90 型转向舵机\n- H 桥电机控制（已测试 MX1508）\n- 开关灯\n- 其他车辆控制参数。\n\n转向可以通过舵机控制实现，也可以通过分别控制左右两侧电机来实现履带式转向。\n\n流媒体视图现在将在左上角显示一个红色按钮。点击该按钮可显示或隐藏叠加的转向和电机控制界面。摄像头视图按钮可用于切换到全屏模式。有线连接的车辆也可以通过 HW-504 型操纵杆进行控制。摄像头视图（以及麦克风和遥测，如果已启用）可以被录制。  \n在此之前应禁用运动检测。  \n\n此功能可以使用 [辅助板](#auxiliary-board)。  \n\n要集成此功能，请将 `#define INCLUDE_PERIPH` 和 `#define INCLUDE_MCPWM` 设置为 `true`。\n\n#### 仅当您熟悉编程和电子技术，并能自行解决问题时才使用此功能\n\n## 机器学习\n\n机器学习人工智能可用于进一步判断在检测到运动时是否应保存录像，方法是分类画面中的物体是否为感兴趣的对象，例如人、特定类型的动物、车辆等。\n\n由于内存占用和内置AI加速支持的限制，此功能仅在ESP32S3上可行。\n#### 请仅在熟悉机器学习的情况下使用此功能\n\n该界面设计用于与由[Edge Impulse](https:\u002F\u002Fedgeimpulse.com\u002F) AI平台打包成Arduino库的用户模型配合使用。\n更多详情请参阅`appGlobals.h`。\n\n请使用96×96像素的灰度或RGB图像，并使用以下迁移学习神经网络设置训练模型：\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fs60sc_ESP32-CAM_MJPEG2SD_readme_b22b153e8259.png\" width=\"500\" height=\"400\">\n\n\n## 相机中心\n\n此选项卡允许访问其他ESP32-CAM_MJPEG2SD相机设备的网页界面。要显示此选项卡，在“编辑配置”页面的“其他”部分中，选择“显示相机中心选项卡”。\n\n在该选项卡中，输入另一台相机的IP地址并按下“添加IP”按钮，系统将显示该相机的图像，并在其上叠加IP地址。对每台需要监控的相机重复此操作。单击某张图像即可打开该相机的网页。\n\n点击图像上的“X”图标可移除该IP地址。按下“删除全部”按钮可移除所有IP地址。按下“刷新”按钮可更新每个屏幕，显示来自相应相机的最新图像。\n\n这些IP地址存储在浏览器的本地存储中，而非应用程序本身。\n\n## 向NVR流式传输\n\n鉴于ESP32的性能和内存限制，此功能更适合在ESP32S3相机板上使用。\n\n可以使用HTTP或RTSP协议，但不能同时使用。RTSP更为复杂。\n\n流媒体性能取决于网络连接质量，但可通过关闭运动检测来提升，因为在流媒体过程中如果发生录制，录制会优先进行，可能导致流媒体卡顿。\n\n#### RTSP\n\n这需要安装一个额外的库——有关详细信息，请参阅[RTSPServer](https:\u002F\u002Fgithub.com\u002Frjsachse\u002FESP32-RTSPServer)库。必须是1.3.1版本或更高。\n\n要将该库集成到本应用中，需将`#define INCLUDE_RTSP`设置为`true`。\n\n要启用RTSP，在“编辑配置”->“流媒体”选项卡中，选择：\n* `启用RTSP视频`以开启视频流\n* `启用RTSP音频`以开启音频流（需提前设置[麦克风](#audio-recording)）。\n* `启用RTSP字幕`以开启字幕流（需提前设置[遥测](#telemetry-recording)，否则仅输出时间戳和FPS）。\n\n然后保存并重启。要观看流媒体，使用支持RTSP的应用程序连接至`rtsp:\u002F\u002F\u003Ccamera_ip>:\u003CRTSPport>`。\n\n若启用了身份验证（用户名和密码）：\n`rtsp:\u002F\u002F\u003CRTSPuser>:\u003CRTSPpass>@\u003Ccamera_ip>:\u003CRTSPport>`\n\nRTSP现在支持多客户端组播。您也可以通过注释掉rtsp.cpp中的\u002F\u002F#define OVERRIDE_RTSP_SINGLE_CLIENT_MODE来覆盖此逻辑，从而为所有传输方式（TCP、UDP、组播）启用多客户端。然而，为所有传输方式启用多客户端可能会降低流速并引发问题，因此请谨慎使用。为了获得最佳效果，建议在使用TCP或UDP单播时仍只保留一个客户端。更多详情，请参阅RTSPServer库中的README文件。\n\n#### HTTP\n\n如果`#define INCLUDE_RTSP`设置为`false`，则可使用HTTP流媒体。\n\n独立于网页浏览器的流媒体可供远程NVR捕获。要启用这些流媒体，在“编辑配置”->“流媒体”选项卡中，选择：\n* `在\u002Fsustain?video=1上启用视频流`以获取MJPEG流\n* `在\u002Fsustain?audio=1上启用音频流`以获取WAV流（需提前设置[麦克风](#audio-recording)）。\n* `在\u002Fsustain?srt=1上启用字幕流`以获取SRT流（需提前设置[遥测](#telemetry-recording)，否则仅输出时间戳）。\n\n然后保存并重启。\n\n如果启用了多个流，它们需要通过中间工具进行同步处理，例如[go2rtc](https:\u002F\u002Fgithub.com\u002FAlexxIT\u002Fgo2rtc)（但目前尚不支持字幕处理[？](https:\u002F\u002Fgithub.com\u002FAlexxIT\u002Fgo2rtc\u002Fissues\u002F932)）。有关go2rtc的配置示例，请参阅[ESP32-CAM_Audio](https:\u002F\u002Fgithub.com\u002Fspawn451\u002FESP32-CAM_Audio#usage)。\n\n## WebDAV\n\n内置了一个简单的WebDAV服务器。可以使用Windows 10文件资源管理器等WebDAV客户端访问和管理SD卡内容。在文件夹地址栏中输入`\u003Cip_address>\u002Fwebdav`，例如`192.168.1.132\u002Fwebdav`。\n\n对于Windows 11、Android、macOS、Linux，请参阅`webDav.cpp`文件。\n\n要启用此功能，需将`#define INCLUDE_WEBDAV`设置为`true`。\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fs60sc_ESP32-CAM_MJPEG2SD_readme_54783807b8a8.png\" width=\"600\" height=\"300\">\n\n## 摄影测量\n\nESP可用于拍摄小型物体的一系列照片，通过步进电机驱动的转盘进行控制；既可以使用ESP自带摄像头拍摄低分辨率图像，也可以使用由ESP远程控制的单反相机拍摄高分辨率图像。拍摄的图像可用于生成3D模型。\n\n要启用此功能，在“编辑配置”页面的“外设”部分中，选择“启用摄影测量”，然后保存并重启。\n\n此时将出现一个额外的配置按钮“PG Config”。点击该按钮将显示用于控制摄影测量过程的选项。\n\n此功能可以与[辅助板](#auxiliary-board)配合使用。\n\n更多信息请参阅`photogram.cpp`文件。要启用此功能，需将`#define INCLUDE_PGRAM`设置为`true`。","# ESP32-CAM_MJPEG2SD 快速上手指南\n\nESP32-CAM_MJPEG2SD 是一款功能强大的开源应用，支持在 ESP32\u002FESP32S3 开发板上连接 OV2640\u002FOV3660\u002FOV5640 等摄像头，将 JPEG 图像录制为 SD 卡上的 AVI 文件，并支持通过浏览器以 MJPEG 流形式回放。该工具支持运动检测、连续录制、音频录制、RTSP 推流、MQTT 集成及远程通知等高级功能。\n\n## 环境准备\n\n### 硬件要求\n*   **主控板**：推荐使用 **ESP32-S3** 系列（如 Freenove ESP32S3 Cam, XIAO ESP32S3 Sense），因其 PSRAM 更大、性能更强。普通 ESP32 Cam (AI Thinker) 也可用，但部分高级功能可能受限于内存。\n    *   *注意*：避免使用标记为 `ESPS3 RE:1.0` 的无名克隆板。\n*   **摄像头模块**：OV2640, OV3660, OV5640 或 PY260。\n*   **存储**：MicroSD 卡（建议使用知名品牌如 Sandisk，Class 2 及以上，格式化为 FAT32）。\n*   **可选外设**：麦克风 (I2S\u002FPDM)、PIR 传感器、舵机、LED 灯等。\n\n### 软件要求\n*   **Arduino IDE**：最新版本。\n*   **ESP32 核心库**：必须安装 `arduino-esp32` 核心库，版本需 **≥ v3.1.1**（包含网络修复和帧选择变更）。\n    *   安装方法：在 Arduino IDE 中打开 `工具` -> `开发板` -> `开发板管理器`，搜索 `esp32` 并安装由 Espressif Systems 提供的包。\n*   **浏览器**：推荐使用 **Google Chrome** 以获得最佳兼容性。\n\n## 安装步骤\n\n1.  **下载源码**\n    从 GitHub 下载本项目源码压缩包，解压后将文件夹重命名（去掉 `-master` 后缀），放入 Arduino IDE 的 `sketchbook\u002Flibraries` 或直接作为主程序打开。\n    ```bash\n    # 示例：假设已下载并解压\n    # 文件夹名称应为：ESP32-CAM_MJPEG2SD\n    ```\n\n2.  **配置开发板型号**\n    打开项目中的 `appGlobals.h` 文件。根据你使用的硬件，取消注释对应的摄像头模型定义（**仅保留一个**）：\n    *   对于常见的 ESP32-Cam (AI Thinker)：\n        ```cpp\n        #define CAMERA_MODEL_AI_THINKER\n        ```\n    *   对于 Freenove ESP32S3 Cam：\n        ```cpp\n        #define CAMERA_MODEL_FREENOVE_ESP32S3_CAM\n        ```\n    *   *注*：如需启用额外功能（如 FTP、MQTT 等），可在该文件中将对应的 `#define INCLUDE_*` 设置为 `true`。默认仅开启核心功能以节省内存。\n\n3.  **设置编译选项**\n    在 Arduino IDE 中进行如下设置：\n    *   **开发板选择**：\n        *   ESP32: 选择 `ESP32 Dev Module`\n        *   ESP32S3: 选择 `XIAO_ESP32S3` 或对应的 `ESP32S3 Dev Module`\n    *   **PSRAM**：选择 `Enabled` (务必开启)。\n    *   **分区方案 (Partition Scheme)**：\n        *   ESP32: 选择 `Minimal SPIFFS (...)`\n        *   ESP32S3: 选择 `8M with spiffs (...)` 或 `16MB(3MB APP...)`（根据闪存大小选择）。\n\n4.  **编译与上传**\n    点击编译按钮，确认无误后上传固件到开发板。\n    *   *提示*：若出现 `Startup Failure: Check SD card inserted` 或 `Camera init error`，请检查 `appGlobals.h` 中的板型定义是否正确，或确认 SD 卡\u002F摄像头接线牢固。\n\n## 基本使用\n\n1.  **初始配网**\n    *   上电后，设备默认进入 **AP 模式**。\n    *   使用手机或电脑连接 Wi-Fi，SSID 格式为 `ESP-CAM_MJPEG_...`。\n    *   在浏览器访问 `192.168.4.1`。\n    *   在网页中输入你的路由器 Wi-Fi 名称和密码，点击保存。设备重启后将连接到局域网。\n\n2.  **获取设备 IP**\n    *   设备连接路由器后，可通过路由器后台查看其分配的 IP 地址，或在串口监视器中查看输出日志获取 IP。\n    *   在浏览器输入该 IP 地址访问主控制界面。\n    *   *可选*：在 `Access Settings` 中配置 mDNS，之后可通过 `http:\u002F\u002F[主机名]` 访问。\n\n3.  **开始录制**\n    *   **手动录制**：点击网页侧边栏的 **Start Recording** 按钮即可开始录像。\n    *   **运动检测录制**：在 `Edit Config` -> `Motion` 中配置灵敏度，当摄像头检测到画面变化或外部传感器（如 PIR）触发时自动录制。\n    *   **延时摄影\u002F行车记录仪**：在 `Motion Detect & Recording` 菜单中选择 `Time Lapse` 或调整 `DashCam` 滑块进行连续录制。\n\n4.  **回放与导出**\n    *   点击侧边栏 **Playback & File Transfers**。\n    *   选择日期文件夹，找到生成的 `.avi` 文件（命名格式：`YYYYMMDD_HHMMSS_分辨率_FPS_时长.avi`）。\n    *   点击 **Start Playback** 在浏览器中直接预览。\n    *   点击 **Download** 将视频下载到本地，或使用 **File Upload** 上传至 FTP\u002FHTTPS 服务器。\n\n5.  **持久化配置**\n    *   修改任何设置后，务必点击网页上的 **Save** 按钮。\n    *   若修改了网络相关设置，需点击 **Reboot ESP** 重启设备生效。","一位生态保护区的研究员需要在夜间无人值守的情况下，自动记录珍稀野生动物的活动轨迹并同步回传音频数据。\n\n### 没有 ESP32-CAM_MJPEG2SD 时\n- **存储管理混乱**：相机只能保存大量零散的 JPEG 图片，后期整理需手动合成视频，耗时且容易丢失帧序。\n- **缺乏音画同步**：单独录制的音频文件无法与画面精准对齐，导致分析动物叫声与行为对应关系时极其困难。\n- **实时监控缺失**：设备处于“黑盒”状态，研究员必须亲自前往现场取出 SD 卡才能查看内容，无法远程确认设备是否正常工作。\n- **触发机制单一**：仅能依靠简单的定时拍摄，无法根据动物移动或环境声音智能启动录制，浪费大量存储空间在空白画面上。\n- **数据获取滞后**：发现异常情况后无法立即获取证据，往往错过最佳研究或保护时机。\n\n### 使用 ESP32-CAM_MJPEG2SD 后\n- **视频自动封装**：工具直接将抓拍序列合成为标准 AVI 文件，支持按正确帧率播放，极大简化了后期归档与分析流程。\n- **音画完美同步**：接入麦克风后，系统自动将 WAV 音频嵌入 AVI 文件中，确保每一声兽吼都能与画面动作精准匹配。\n- **远程实时串流**：研究员可通过浏览器直接观看 MJPEG 实时画面或通过 RTSP 推流至 NVR，随时掌握现场动态。\n- **智能多维触发**：利用摄像头像素变化检测运动，或结合 PIR\u002F雷达传感器及加速度计，仅在检测到目标时启动录制，高效利用存储。\n- **灵活数据传输**：支持通过 FTP、WebDAV 自动上传录像，或通过 Telegram 机器人发送警报，实现数据的即时获取与响应。\n\nESP32-CAM_MJPEG2SD 将廉价的硬件模块转化为具备音画同步、智能触发及远程管控能力的专业级野外监测终端，显著降低了科研门槛与维护成本。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fs60sc_ESP32-CAM_MJPEG2SD_c44877c7.png","s60sc",null,"https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fs60sc_aff56fd6.png","https:\u002F\u002Fgithub.com\u002Fs60sc",[77,81,85,89],{"name":78,"color":79,"percentage":80},"C++","#f34b7d",67.4,{"name":82,"color":83,"percentage":84},"HTML","#e34c26",20,{"name":86,"color":87,"percentage":88},"JavaScript","#f1e05a",7.2,{"name":90,"color":91,"percentage":92},"C","#555555",5.4,1587,336,"2026-04-17T02:09:09","AGPL-3.0",4,"未说明 (基于 Arduino IDE，支持 Windows, macOS, Linux)","不需要 GPU","ESP32: 4MB PSRAM; ESP32-S3: 推荐 8MB+ PSRAM",{"notes":102,"python":103,"dependencies":104},"1. 这是一个嵌入式固件项目，需在 Arduino IDE 中编译并烧录到 ESP32 或 ESP32-S3 开发板。2. 必须启用 PSRAM。3. 分区方案要求：ESP32 选 'Minimal SPIFFS'，ESP32-S3 选 '8M with spiffs' 或更大。4. 推荐使用 ESP32-S3 以获得双倍性能和更多功能（如音频、高分辨率）。5. 需配合 SD 卡存储录像文件。6. 避免使用无品牌的 ESP32-S3 克隆板（特别是标记为 RE:1.0 的），因其 PSRAM 规格可能不同导致崩溃。","不需要 Python",[105],"arduino-esp32 core >= v3.1.1",[107,14],"视频",[109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128],"esp32-cam","sd-card","mjpeg","video-processing","ov2640","esp32","motion-capture","microphone","avi","wav","esp32s3","freenove","ov5640","camera","arduino-esp32","telegram-bot","fpv","telemetry","machine-learning","rtsp","2026-03-27T02:49:30.150509","2026-04-18T02:20:35.446945",[132,137,142,147,152,157,162],{"id":133,"question_zh":134,"answer_zh":135,"source_url":136},38533,"如何在 ESP32-CAM 项目中添加扬声器输出以实现双向音频？","可以使用 INMP441 麦克风配合 MAX98357A 放大器和 3W 4 欧姆扬声器来实现音频输出。硬件连接需遵循 I2S 协议。开发者计划在未来集成 Espressif 音频开发框架 (ESP-ADF)。相关硬件信息和测试脚本可参考 'Sound with ESP32 – I2S Protocol' 教程。","https:\u002F\u002Fgithub.com\u002Fs60sc\u002FESP32-CAM_MJPEG2SD\u002Fissues\u002F404",{"id":138,"question_zh":139,"answer_zh":140,"source_url":141},38534,"如何修改代码以适配特定的机器人电机控制算法（如六足机器人）？","用户可以根据需要自行修改代码中的电机控制逻辑。项目维护者鼓励用户在完成自定义代码后提交 Pull Request，以便将特定机器人的控制算法合并到主项目中。已有用户成功实现了六足机器人的交替腿部运动控制。","https:\u002F\u002Fgithub.com\u002Fs60sc\u002FESP32-CAM_MJPEG2SD\u002Fissues\u002F464",{"id":143,"question_zh":144,"answer_zh":145,"source_url":146},38535,"使用 PlatformIO 编译时提示\"Startup Failure: Check SD card inserted\"怎么办？","该问题通常与开发环境配置或 SD 卡格式有关。请确保：1. 在 PlatformIO 中选择了正确的分区表 (Partition Scheme) 和开发板型号；2. SD 卡已格式化为 FAT32 格式（建议使用 SD Card Formatter 工具）；3. 检查控制台输出确认是否仅更改了 WiFi 设置。如果问题依旧，建议对比 Arduino IDE 的配置差异。","https:\u002F\u002Fgithub.com\u002Fs60sc\u002FESP32-CAM_MJPEG2SD\u002Fissues\u002F399",{"id":148,"question_zh":149,"answer_zh":150,"source_url":151},38536,"在 Apple 设备 (Safari) 或 Windows Chrome 浏览器上无法查看实时视频流怎么办？","如果录制和回放功能正常但无法查看实时流，通常不是应用程序代码问题，而是浏览器配置或兼容性问题。建议检查浏览器的安全设置、缓存或尝试更新固件版本。对于 OV3660 摄像头，建议在 ESP32S3 上使用并安装散热片；OV5640 也是 ESP32S3 的推荐搭配，但自动对焦需要额外驱动。","https:\u002F\u002Fgithub.com\u002Fs60sc\u002FESP32-CAM_MJPEG2SD\u002Fissues\u002F182",{"id":153,"question_zh":154,"answer_zh":155,"source_url":156},38537,"重启路由器后 ESP32 IP 地址变化导致难以查找，如何解决？","可以通过修改项目配置中的主机名 (Hostname) 来解决。在代码配置界面找到主机名设置，将其修改为固定名称（注意避免使用下划线等特殊字符，某些网络环境可能不支持），这样可以通过固定的主机名访问设备，而无需依赖变化的 IP 地址。","https:\u002F\u002Fgithub.com\u002Fs60sc\u002FESP32-CAM_MJPEG2SD\u002Fissues\u002F187",{"id":158,"question_zh":159,"answer_zh":160,"source_url":161},38538,"编译代码时出现\"Multiple libraries were found for WiFi.h\"错误如何解决？","此错误是因为系统中存在多个 WiFi 库导致冲突。解决方法是在 Arduino IDE 中明确指定使用的库路径，或者删除非 ESP32 官方包自带的冗余 WiFi 库文件夹。确保在板型管理器中安装的 ESP32 包是最新且完整的，并在编译时只启用 ESP32 硬件包下的 libraries\u002FWiFi。","https:\u002F\u002Fgithub.com\u002Fs60sc\u002FESP32-CAM_MJPEG2SD\u002Fissues\u002F67",{"id":163,"question_zh":164,"answer_zh":165,"source_url":151},38539,"推荐使用哪种摄像头模组和开发板组合以获得最佳性能？","推荐使用 ESP32S3 开发板搭配 OV5640 摄像头模组，并为摄像头安装散热片以防止过热。虽然 OV2640 也常用，但 OV5640 画质更好。如果使用 OV3660 鱼眼镜头也可行，但需注意兼容性。购买开发板时附带的 SD 卡质量可能较差，建议更换为知名品牌的高速 SD 卡。",[167,172,176,181,186,191,195,199,204,209,214],{"id":168,"version":169,"summary_zh":170,"released_at":171},313105,"v10.9.3","内部改进","2026-04-02T13:42:30",{"id":173,"version":174,"summary_zh":73,"released_at":175},313106,"v10.9.2","2026-01-28T13:54:51",{"id":177,"version":178,"summary_zh":179,"released_at":180},313107,"v10.9.1","结构更新","2026-01-15T00:21:19",{"id":182,"version":183,"summary_zh":184,"released_at":185},313108,"v10.8.3","内部变化","2025-09-21T09:30:06",{"id":187,"version":188,"summary_zh":189,"released_at":190},313109,"v10.8.0","以太网已添加","2025-08-26T18:57:30",{"id":192,"version":193,"summary_zh":73,"released_at":194},313110,"v10.6.2","2025-06-12T19:06:27",{"id":196,"version":197,"summary_zh":73,"released_at":198},313111,"v10.5.4","2025-01-29T16:25:38",{"id":200,"version":201,"summary_zh":202,"released_at":203},313112,"v9.9.4","支持 Arduino-ESP32 v2.x  \n同时，这是与 IO Extender 应用集成的最新版本。","2024-08-26T16:23:34",{"id":205,"version":206,"summary_zh":207,"released_at":208},313113,"v9.7.3","仅支持使用 Arduino 核心 v2.x 编译","2024-06-16T12:04:58",{"id":210,"version":211,"summary_zh":212,"released_at":213},313114,"v9.1.2","需要手动加载SD卡上的\u002Fdata文件夹，而不是通过自动下载。","2023-11-24T20:49:09",{"id":215,"version":216,"summary_zh":217,"released_at":218},313115,"V8.8","v9.0 之前的稳定版本  \n需要手动加载 SD 卡上的 \u002Fdata 文件夹，不能通过自动下载实现。","2023-10-12T20:59:19"]