{"id":50509710,"url":"https://github.com/dmatking/esp32-video-stream","last_synced_at":"2026-06-02T19:01:13.501Z","repository":{"id":348416353,"uuid":"1196597695","full_name":"dmatking/esp32-video-stream","owner":"dmatking","description":"MJPEG-over-TCP video stream receiver for ESP32-S3 with ST7789 display","archived":false,"fork":false,"pushed_at":"2026-04-01T05:25:52.000Z","size":820,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-01T05:39:30.958Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dmatking.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-30T21:16:21.000Z","updated_at":"2026-04-01T05:25:55.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dmatking/esp32-video-stream","commit_stats":null,"previous_names":["dmatking/esp32-video-stream"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/dmatking/esp32-video-stream","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmatking%2Fesp32-video-stream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmatking%2Fesp32-video-stream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmatking%2Fesp32-video-stream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmatking%2Fesp32-video-stream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmatking","download_url":"https://codeload.github.com/dmatking/esp32-video-stream/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmatking%2Fesp32-video-stream/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33833277,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-02T02:00:07.132Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-02T19:01:10.946Z","updated_at":"2026-06-02T19:01:13.493Z","avatar_url":"https://github.com/dmatking.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# esp32-video-stream\n\nMJPEG-over-TCP video stream receiver for ESP32. A Python server streams pre-encoded MJPEG frames over TCP. The ESP32 firmware decodes each frame and pushes it to the display.\n\n![demo](demo.gif)\n\n## Supported Boards\n\n| Board | Display | Decoder | FPS |\n|-------|---------|---------|-----|\n| Waveshare ESP32-S3 Touch LCD 2.0\" | ST7789 320x240 SPI | tjpgd (software, ROM) | ~12 |\n| ESP32-P4-Function-EV-Board | EK79007 1024x600 MIPI-DSI | Hardware JPEG decoder | 30 |\n\n## Protocol\n\nEach frame is sent as a 4-byte little-endian length prefix followed by JPEG data. The ESP32 connects to the server as a TCP client.\n\n## Setup\n\n### Server (PC / Pi)\n\nRequires `ffmpeg` installed. Place video files in a `videos/` directory.\n\n```\npython stream_video.py videos [--port 5000] [--width 320] [--height 240] [--fps 30] [--compression 10]\n```\n\nThe `--compression` flag maps to ffmpeg's `-q:v` (2-31, lower means better quality). Videos are pre-encoded to MJPEG AVI on first run and cached in `videos/.cache/`. All videos in the directory are played in a loop as a playlist.\n\nThe server supports multiple simultaneous clients — connect several ESP32 boards and they all receive the same stream.\n\nFor the P4 board:\n```\npython stream_video.py videos --width 1024 --height 600\n```\n\nFor the S3 board:\n```\npython stream_video.py videos --width 320 --height 240\n```\n\n### Firmware\n\nRequires ESP-IDF v5.5+. WiFi credentials are loaded from `~/.esp_creds` via `SDKCONFIG_DEFAULTS` so they are never committed. Create the file with your network details:\n\n```\n# ~/.esp_creds\nCONFIG_WIFI_SSID=\"YourNetworkName\"\nCONFIG_WIFI_PASS=\"YourPassword\"\n```\n\n#### Building for ESP32-S3\n\n```\nidf.py set-target esp32s3\nidf.py build flash monitor\n```\n\n#### Building for ESP32-P4\n\n```\nidf.py set-target esp32p4\nidf.py build flash monitor\n```\n\nThe target selection is persistent — once set, subsequent `idf.py build` commands use the same target until you change it. Switching targets requires a clean build (handled automatically by `set-target`).\n\nThe default server address is `192.168.68.65:5000`. Change it in `idf.py menuconfig` under **Video Stream** or edit `sdkconfig.defaults`.\n\n## How it works\n\n1. `stream_video.py` pre-encodes videos to MJPEG AVI at the target resolution, then reads pre-baked JPEG frames and sends them length-prefixed over TCP at the target frame rate.\n2. The firmware connects over WiFi, receives JPEG frames, and decodes them into the display framebuffer.\n3. **ESP32-S3:** Software tjpgd decode to RGB565, flushed to ST7789 over SPI at 40 MHz.\n4. **ESP32-P4:** Hardware JPEG decode directly into the MIPI-DSI DPI framebuffer (zero-copy, double-buffered). WiFi is provided by an ESP32-C6 co-processor over SDIO via esp_hosted.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmatking%2Fesp32-video-stream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmatking%2Fesp32-video-stream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmatking%2Fesp32-video-stream/lists"}