# adunext/adu-motion-video architecture

> Architecture diagram of the GitHub repository adunext/adu-motion-video, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/adunext/adu-motion-video
- Repository: https://github.com/adunext/adu-motion-video

## Overview

This repository is a legacy local video-authoring toolkit and a collection of reusable animation packs; the README notes that newer `.motion` templates are distributed separately. In the documented workflow, a creator supplies narration, text, and media; a selected style pack is adapted into a browser project, previewed and revised, then exported as MP4 and an editable project. The graph preserves the documented style families and major authoring stages. Several implementation links are based on README statements or the SOURCE INDEX; unsampled internals are represented only where the tree supports a path.

Main entry points: [`scripts/build_macro_project.py`](https://github.com/adunext/adu-motion-video/blob/main/scripts/build_macro_project.py) (Project builder), [`packs`](https://github.com/adunext/adu-motion-video/tree/main/packs) (Animation packs), [`scripts/pipeline.py`](https://github.com/adunext/adu-motion-video/blob/main/scripts/pipeline.py) (Workflow commands), [`scripts/pack_catalog.py`](https://github.com/adunext/adu-motion-video/blob/main/scripts/pack_catalog.py) (Pack selection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_intake["Intake and packs"]
  node_workflow["Workflow commands<br/>[pipeline.py]"]
  node_catalog["Pack selection<br/>[pack_catalog.py]"]
  node_adapters["Style adapters"]
  node_packs["Animation packs"]
end

subgraph group_author["Project authoring"]
  node_macro["Project builder"]
  node_adapt["Project adaptation<br/>[adapt_project.py]"]
  node_talk["Narration intake<br/>[import_talk.py]"]
  node_repair["Talk repair<br/>[repair_talk.py]"]
end

subgraph group_media["Media and layout"]
  node_face["Face tracking<br/>[face_tracking.py]"]
  node_audio["Audio composition<br/>[macro_audio.py]"]
  node_fonts["Font policy<br/>[font_policy.py]"]
  node_layout["Output layout<br/>[pack_layout.py]"]
  node_subs["Subtitles<br/>[build_subs.py]"]
end

subgraph group_delivery["Preview and delivery"]
  node_preview["Preview and revision"]
  node_render["Video rendering<br/>[render_project.mjs]"]
  node_export["Project export<br/>[export_project.py]"]
  node_mp4["MP4 and editable project"]
end

node_creator(("Creator / assistant"))

node_creator -->|"provides inputs"| node_workflow
node_creator -->|"chooses style"| node_catalog
node_catalog -->|"resolves pack"| node_packs
node_adapters -->|"extracts authored scenes"| node_packs
node_workflow -.->|"runs authoring"| node_macro
node_macro -->|"adapts project"| node_adapt
node_macro -->|"imports narration"| node_talk
node_macro -->|"repairs narration"| node_repair
node_macro -->|"tracks presenter"| node_face
node_macro -->|"builds audio"| node_audio
node_macro -->|"checks fonts"| node_fonts
node_macro -->|"sets layout"| node_layout
node_macro -->|"builds subtitles"| node_subs
node_macro -->|"instantiates scenes"| node_packs
node_creator -->|"reviews output"| node_preview
node_preview -->|"renders video"| node_render
node_render -.->|"exports project"| node_export
node_export -->|"delivers files"| node_mp4

click node_workflow "https://github.com/adunext/adu-motion-video/blob/main/scripts/pipeline.py"
click node_catalog "https://github.com/adunext/adu-motion-video/blob/main/scripts/pack_catalog.py"
click node_adapters "https://github.com/adunext/adu-motion-video/tree/main/adapters"
click node_packs "https://github.com/adunext/adu-motion-video/tree/main/packs"
click node_macro "https://github.com/adunext/adu-motion-video/blob/main/scripts/build_macro_project.py"
click node_adapt "https://github.com/adunext/adu-motion-video/blob/main/scripts/adapt_project.py"
click node_talk "https://github.com/adunext/adu-motion-video/blob/main/scripts/import_talk.py"
click node_repair "https://github.com/adunext/adu-motion-video/blob/main/scripts/repair_talk.py"
click node_face "https://github.com/adunext/adu-motion-video/blob/main/scripts/face_tracking.py"
click node_audio "https://github.com/adunext/adu-motion-video/blob/main/scripts/macro_audio.py"
click node_fonts "https://github.com/adunext/adu-motion-video/blob/main/scripts/font_policy.py"
click node_layout "https://github.com/adunext/adu-motion-video/blob/main/scripts/pack_layout.py"
click node_subs "https://github.com/adunext/adu-motion-video/blob/main/scripts/build_subs.py"
click node_preview "https://github.com/adunext/adu-motion-video/blob/main/scripts/preview_delivery.py"
click node_render "https://github.com/adunext/adu-motion-video/blob/main/scripts/render_project.mjs"
click node_export "https://github.com/adunext/adu-motion-video/blob/main/scripts/export_project.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_workflow,node_catalog,node_adapters,node_packs toneBlue
class node_macro,node_adapt,node_talk,node_repair toneAmber
class node_face,node_audio,node_fonts,node_layout,node_subs toneMint
class node_preview,node_render,node_export,node_mp4 toneRose
class node_creator toneIndigo
```

## Components

### Intake and packs

- [Workflow commands](https://github.com/adunext/adu-motion-video/blob/main/scripts/pipeline.py): `scripts/pipeline.py`
- [Pack selection](https://github.com/adunext/adu-motion-video/blob/main/scripts/pack_catalog.py): `scripts/pack_catalog.py`
- [Style adapters](https://github.com/adunext/adu-motion-video/tree/main/adapters): `adapters`
- [Animation packs](https://github.com/adunext/adu-motion-video/tree/main/packs): `packs`

### Project authoring

- [Project builder](https://github.com/adunext/adu-motion-video/blob/main/scripts/build_macro_project.py): `scripts/build_macro_project.py`
- [Project adaptation](https://github.com/adunext/adu-motion-video/blob/main/scripts/adapt_project.py): `scripts/adapt_project.py`
- [Narration intake](https://github.com/adunext/adu-motion-video/blob/main/scripts/import_talk.py): `scripts/import_talk.py`
- [Talk repair](https://github.com/adunext/adu-motion-video/blob/main/scripts/repair_talk.py): `scripts/repair_talk.py`

### Media and layout

- [Face tracking](https://github.com/adunext/adu-motion-video/blob/main/scripts/face_tracking.py): `scripts/face_tracking.py`
- [Audio composition](https://github.com/adunext/adu-motion-video/blob/main/scripts/macro_audio.py): `scripts/macro_audio.py`
- [Font policy](https://github.com/adunext/adu-motion-video/blob/main/scripts/font_policy.py): `scripts/font_policy.py`
- [Output layout](https://github.com/adunext/adu-motion-video/blob/main/scripts/pack_layout.py): `scripts/pack_layout.py`
- [Subtitles](https://github.com/adunext/adu-motion-video/blob/main/scripts/build_subs.py): `scripts/build_subs.py`

### Preview and delivery

- [Preview and revision](https://github.com/adunext/adu-motion-video/blob/main/scripts/preview_delivery.py): `scripts/preview_delivery.py`
- [Video rendering](https://github.com/adunext/adu-motion-video/blob/main/scripts/render_project.mjs): `scripts/render_project.mjs`
- [Project export](https://github.com/adunext/adu-motion-video/blob/main/scripts/export_project.py): `scripts/export_project.py`
- **MP4 and editable project**

### Other components

- **Creator / assistant**

## Connections

- Creator / assistant → Workflow commands: provides inputs (evidence: `README.md`)
- Creator / assistant → Pack selection: chooses style (evidence: `README.md`)
- Pack selection → Animation packs: resolves pack (evidence: `scripts/pack_catalog.py`)
- Style adapters → Animation packs: extracts authored scenes (evidence: `adapters/doubao-console/extract.py`)
- Workflow commands → Project builder: runs authoring
- Project builder → Project adaptation: adapts project (evidence: `scripts/build_macro_project.py`)
- Project builder → Narration intake: imports narration (evidence: `scripts/build_macro_project.py`)
- Project builder → Talk repair: repairs narration (evidence: `scripts/build_macro_project.py`)
- Project builder → Face tracking: tracks presenter (evidence: `scripts/build_macro_project.py`)
- Project builder → Audio composition: builds audio (evidence: `scripts/build_macro_project.py`)
- Project builder → Font policy: checks fonts (evidence: `scripts/build_macro_project.py`)
- Project builder → Output layout: sets layout (evidence: `scripts/build_macro_project.py`)
- Project builder → Subtitles: builds subtitles (evidence: `scripts/build_macro_project.py`)
- Project builder → Animation packs: instantiates scenes (evidence: `scripts/build_macro_project.py`)
- Creator / assistant → Preview and revision: reviews output (evidence: `README.md`)
- Preview and revision → Video rendering: renders video (evidence: `README.md`)
- Video rendering → Project export: exports project
- Project export → MP4 and editable project: delivers files (evidence: `README.md`)
