Repository navigation
Description
Scope update (2026-06-19): This issue is now a sub-issue of #3311 (the
fl::Fledbundle subsystem umbrella). The.fledcontainer is no longer just a video-side concern — it's the deployment unit for the whole fled subsystem (video + screenmap + channels + scripts). Doc path retargeted fromsrc/fl/video/FLED_FORMAT.md→src/fl/fled/FLED_FORMAT.md. The "future scripts" forward-roadmap note in the original framing is now in-scope umbrella work tracked by #3311.
Problem
The .fled container format is a FastLED native — produced by zackees/ledmapper (the Mapped Video Maker / Movie Player web app) and consumed by FastLED on-device — but the FastLED repo has no documentation of the format. A consumer working in src/fl/fled/ (or src/fl/video/) today has to reverse-engineer the on-disk layout from gfx-fled.ts / inspect-fled.mjs in ledmapper, or stumble onto ledmapper's docs/fled-format.md by accident.
This is a documentation-only issue. The format itself is stable (v1); the spec lives in ledmapper; FastLED just needs to mirror it locally under the new src/fl/fled/ subtree (per #3311) and surface it to agents.
What .fled is
A self-describing container for LED data:
- 12-byte binary header (magic
FLED, version, pixel_format, json_length) - UTF-8 JSON payload carrying a
ScreenMap(so a video and its physical LED geometry stay paired in one file) plus optionalvideo.fps - Raw frame payload —
frame_count × ledCount × bytesPerLed
Today the container holds video (rgb8/gray8/rgba8/rgbw8/rgb565le pixel formats) bundled with screenmaps. The format is designed to grow — the pixel-format enum has 250 reserved values (0x05–0xFF) and the JSON envelope can carry additional sections for future content types (e.g. channels, script.micropython, script.wasm). Per #3311, the next sections to land in the envelope are channels (fl::MultiChannelConfig JSON) and the script-carrying sections.
Canonical spec: zackees/ledmapper/docs/fled-format.md
Reference inspector: zackees/ledmapper/scripts/inspect-fled.mjs
What to add (this issue's scope)
1. src/fl/fled/FLED_FORMAT.md — detailed local doc
Mirror the canonical spec in the FastLED repo so on-device consumers (sketches, library devs, agents working in src/fl/fled/ or src/fl/video/) can find it without leaving the repo. Recommended structure:
- One-paragraph "what is .fled" intro.
- Verbatim or near-verbatim copy of the v1 binary layout table + pixel-format enum table from ledmapper's spec.
- "Authority" callout: the canonical spec is in ledmapper; if the two ever disagree, ledmapper wins because it's the producer. This doc is a convenience mirror.
- Cross-link to
inspect-fled.mjsfor diagnostic / dump tooling. - "Future" section noting that the pixel-format enum and JSON envelope are designed to grow:
- Additional pixel formats (BC1/BC3-compressed frames, indexed palettes, etc.)
- Additional JSON envelope sections —
channels(fl::MultiChannelConfig), embedded scripts (MicroPython bytecode, WASM modules) — riding the same container so a single.fledfile can carry "video + screenmap + channels + behavior" as a self-contained pattern bundle. The script-carrying piece is roadmap; thechannelssection is the next v1 addition (tracked under feat(fl/fled): create new fl::Fled bundle subsystem (value + runner + section accessors) under src/fl/fled/ #3311).
2. src/fl/fled/README.md — MUST link to FLED_FORMAT.md at the top
The fl/fled/ subtree's README is created as part of the umbrella work in #3311. The very first content block of that README MUST be a link to FLED_FORMAT.md so anyone landing on the subtree finds the on-disk format spec immediately. Wording suggestion:
# fl::Fled
> **On-disk format spec:** [FLED_FORMAT.md](./FLED_FORMAT.md) — the binary header + JSON envelope + section layout. Canonical spec lives in [zackees/ledmapper](https://github.com/zackees/ledmapper/blob/main/docs/fled-format.md); this is the local mirror.
<rest of README>This is non-negotiable: the spec link is the first thing on the page, not buried below an intro paragraph.
3. Update src/fl/video/README.md if one exists, or add a short header to src/fl/video/_build.cpp.hpp / video_impl.h referencing the new FLED_FORMAT.md
src/fl/video/ is the legacy landing page for .rgb / .fled consumers and stays in use. Add a one-line "the .fled container format is documented in ../fled/FLED_FORMAT.md" reference wherever a video-side reader would naturally land.
4. Brief summary in agent documentation
Add a 5-10 line entry to one of:
agents/docs/cpp-standards.mdunder a new "On-device video / .fled format" subsection, OR- A new short
agents/docs/fled-format.mdlinked from the index table at the top ofCLAUDE.md
The summary should answer:
- What is a
.fledfile? (one line) - Where is the canonical spec? (link to ledmapper)
- Where is the local mirror? (link to
src/fl/fled/FLED_FORMAT.md) - What's the in-tree consumer? (
fl::Fledfrom feat(fl/fled): create new fl::Fled bundle subsystem (value + runner + section accessors) under src/fl/fled/ #3311 once landed; legacyfl::Videocontinues to consume.rgband the.fledvideo section) - Forward-roadmap one-liner: "the container is designed to carry channels config and MicroPython / WASM scripts in addition to video"
If adding to CLAUDE.md, the natural row is in the "By directory" line — append src/fl/fled/ → agents/docs/fled-format.md (or wherever the brief lands).
5. Optional: add inspect-fled.mjs equivalent to FastLED
Not in scope for this issue, but worth noting: a Python ci/inspect_fled.py or shell bash fled inspect <file> wrapper would let on-device test setups validate .fled payloads without depending on Node. Defer to a follow-up if useful.
Out of scope
- Changing the format itself (it's v1 and stable; any extension is a separate spec PR coordinated with ledmapper).
- Implementing the MicroPython / WASM script-carrying extension. That's the roadmap mention; the actual implementation tracks under feat(fl/fled): create new fl::Fled bundle subsystem (value + runner + section accessors) under src/fl/fled/ #3311.
- Implementing the
channelsJSON section. Also feat(fl/fled): create new fl::Fled bundle subsystem (value + runner + section accessors) under src/fl/fled/ #3311's umbrella scope. - Renaming
.rgb→.fledanywhere on-device — the legacy.rgbconsumers are still around; Arduino due with 1.5.8 #133 in ledmapper handled the producer side. - Creating
src/fl/fled/README.mdfrom scratch. That file is created by the umbrella feat(fl/fled): create new fl::Fled bundle subsystem (value + runner + section accessors) under src/fl/fled/ #3311 work; this issue just guarantees the FLED_FORMAT.md link is the first content block.
Refs
- feat(fl/fled): create new fl::Fled bundle subsystem (value + runner + section accessors) under src/fl/fled/ #3311 — umbrella
fl::Fledbundle subsystem (this issue is a sub-issue) - PR feat(video): add fl::PatternPlayer high-level mapped video file player #3292 —
fl::PatternPlayer(the catalyzing PR; will be retired when feat(fl/fled): create new fl::Fled bundle subsystem (value + runner + section accessors) under src/fl/fled/ #3311 lands) - ledmapper canonical spec: https://github.com/zackees/ledmapper/blob/main/docs/fled-format.md
- ledmapper diagnostic: https://github.com/zackees/ledmapper/blob/main/scripts/inspect-fled.mjs
- ledmapper consumer reference:
src/gfx/gfx-fled.ts
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
docs(fled): document FLED container format (#3318)