[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-81297":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":10,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":34,"readmeContent":35,"aiSummary":36,"trendingCount":16,"starSnapshotCount":16,"syncStatus":37,"lastSyncTime":38,"discoverSource":39},81297,"open-director","seme-org\u002Fopen-director","seme-org","🎬 开源 AI 视频工作室 — 从一句话到成片。支持创意模式（AI 导演全流程自动生成）和批量模式（批量生产短视频）。Open-source AI video studio — from one sentence to final video. Supports creative mode (AI director full workflow) and batch mode (bulk short video production)","",null,"TypeScript",53,11,46,1,0,3,6,7,9,49.94,false,"main",true,[26,27,28,29,30,31,32,33],"ai-video","gemini","nextjs","openai","storyboard","subtitle","text-to-video","video-generator","2026-06-12 04:01:32","# OpenDirector\n\n> An open-source AI video studio with a 9-agent director pipeline — from a one-line idea to a fully rendered video with voiceover, BGM, and storyboard.\n\n[English](.\u002FREADME.md) | [中文](.\u002FREADME_CN.md)\n\n🌐 **Official Website**: [https:\u002F\u002Fod.seme.cc](https:\u002F\u002Fod.seme.cc)\n\n---\n\n## What is OpenDirector?\n\nOpenDirector is a **Docker-first, self-hosted** AI video production studio. Describe your idea in one sentence, and a team of 9 specialized AI agents collaborate to produce a complete video — with optional web research, a storyboard, character designs, voiceover, background music, and rendered output.\n\nJust `docker compose up` and start creating.\n\n---\n\n## Screenshots\n\n| AI Director Chat | Batch Production |\n|:---:|:---:|\n| ![AI Director](assets\u002Fweb.jpg) | ![Batch](assets\u002Fweb2.jpeg) |\n| **Creation Editor** | **Storyboard Preview** |\n| ![Creation Editor](assets\u002Fweb3.jpg) | ![Storyboard Preview](assets\u002Fweb4.jpg) |\n\n---\n\n## Demo Videos\n\n\u003Ctable>\n  \u003Ctr>\n    \u003Ctd width=\"50%\">\n      \u003Cvideo src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F8cdf67d1-f1d3-460e-9c62-43d26c5ab20e\" controls muted playsinline width=\"100%\">\u003C\u002Fvideo>\n    \u003C\u002Ftd>\n    \u003Ctd width=\"50%\">\n      \u003Cvideo src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F0ac73afe-116a-4ba0-9f8a-769c55d78b47\" controls muted playsinline width=\"100%\">\u003C\u002Fvideo>\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd width=\"50%\">\n      \u003Cvideo src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F2fb8f97e-e3cc-4ce7-ae4d-7dced1689197\" controls muted playsinline width=\"100%\">\u003C\u002Fvideo>\n    \u003C\u002Ftd>\n    \u003Ctd width=\"50%\">\n      \u003Cvideo src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F645c9f16-c64f-4e1c-a766-0b03b9837d9b\" controls muted playsinline width=\"100%\">\u003C\u002Fvideo>\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n\n\n---\n\n## How It Works\n\n```\nYour Idea\n   |\n   v\n[Research Agent] --> [Script Agent] --> [Art Style Agent] --> [Storyboard Agent]\n                                                            |\n                                                            v\n[Character Agent] --> [Location Agent] --> [Voice Agent] --> [BGM Agent]\n                                                            |\n                                                            v\n                                                     [Media Agent]\n                                                            |\n                                                            v\n                                                  [Render Worker] --> Final Video\n```\n\n9 specialized agents work in a pipeline:\n\n1. **Research Agent** — uses OpenAI `web_search_preview` when needed to check known stories, factual references, brands, products, and source notes\n2. **Script Agent** — generates the story outline and narrative structure, using research notes when available\n3. **Art Style Agent** — selects from 34 built-in styles (e.g. Futuristic Neon Noir, Dreamscape Watercolor Anime, Documentary Realism)\n4. **Storyboard Agent** — breaks the story into scenes with shot descriptions and dialogue\n5. **Character Agent** — designs characters with visual prompts and assigns voice profiles\n6. **Location Agent** — creates environment concepts for each scene\n7. **Voice Agent** — assigns TTS voices matched to character personality and gender\n8. **BGM Agent** — generates background music based on story atmosphere\n9. **Media Agent** — orchestrates image\u002Fvoice\u002Fmusic generation into final assets\n\nEach agent is a LangGraph node that streams its output in real-time — you can watch the plan build step by step.\nThe shared graph state now includes a `research` field with notes, cautions, and sources. The Script Agent consumes those notes without copying source text.\n\n---\n\n## Features\n\n### Creative Mode (AI Director Full Workflow)\n\n- Input one sentence, AI director auto-generates complete plan: brief, story, storyboard, voiceover, images, BGM\n- Optional web research for known stories, factual references, brands, products, and public information\n- **34 built-in art styles** across 9 categories: Cinematic, Commercial, Futuristic, Retro, Anime, 3D, Illustration, Realistic, Experimental\n- **AI-generated story scripts**, editable manually\n- **AI voiceover** with multiple voice options, real-time preview\n- **AI background music**, auto-generated based on story atmosphere\n- **Storyboard preview** with image + voiceover + BGM synced playback\n- Support **16:9 \u002F 9:16 \u002F 1:1** aspect ratios\n- Export at **480p \u002F 720p \u002F 1080p**\n\n### Batch Mode (Short Video Mass Production)\n\n- Input topics, **AI auto-generates multiple scripts**, batch produce short videos\n- **Configurable clip duration** (2-10 seconds), control material switching rhythm\n- Support **Chinese and English** video scripts\n- **Multiple TTS voices** with built-in Edge TTS (free), real-time preview\n- **Subtitle generation** with customizable font, size, color, position, stroke\n- **Background music** — random or specified local files, adjustable volume\n- Video materials are **HD and royalty-free** (Pexels \u002F Pixabay), local files also supported\n- Generate **multiple output variations** at once, pick the best one\n\n### General\n\n- **Multiple AI model providers** — OpenAI, Google Gemini, DeepSeek, Qwen, MiniMax, Ollama, and more\n- **Pluggable media providers** — AiHubMix, WaveSpeed, switch via environment variable\n- **Docker one-click deploy** — `docker compose up` and you're ready\n- **Fully self-hosted** — data stays on your server\n- **Chinese and English UI**\n\n---\n\n## Quick Start\n\n### Prerequisites\n\n- Docker & Docker Compose\n- (Optional) Node.js 20+ for local development\n\n### One-command start\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fseme-org\u002Fopen-director.git\ncd open-director\ncp .env.example .env\n# Edit .env with your API keys\ndocker compose up --build\n```\n\nThen open **http:\u002F\u002Flocalhost:3000**.\n\n### Default services\n\n| Service | URL | Credentials |\n|---------|-----|-------------|\n| App | http:\u002F\u002Flocalhost:3000 | — |\n| MinIO Console | http:\u002F\u002Flocalhost:9001 | `opendirector` \u002F `opendirector-secret` |\n| MySQL | localhost:3307 | See `.env.prod` |\n| Redis | localhost:6379 | — |\n\n---\n\n## Media Generation\n\nOpenDirector uses WaveSpeed for image generation. Character and location plates use a text-to-image model, while storyboard frames with character references must use an image-to-image\u002Fedit model so reference images are honored.\n\n```env\nWAVESPEED_API_KEY=\"your-wavespeed-key\"\nWAVESPEED_IMAGE_MODEL=\"nano-banana\"\nWAVESPEED_IMAGE_TO_IMAGE_MODEL=\"nano-banana-2-edit\"\nEDGE_TTS_VOICE=\"zh-CN-XiaoxiaoNeural\"\n```\n\nDo not set `WAVESPEED_IMAGE_TO_IMAGE_MODEL` to `nano-banana`: that alias routes to a text-to-image endpoint and can ignore character reference images.\n\nSpeech uses local Edge TTS. Background music uses local tracks from `assets\u002Fbgm\u002Fdefault\u002F`.\n\n---\n\n## LLM Configuration\n\nThe LLM is used for recipe generation, script writing, and the AI director. It uses OpenAI-compatible API format.\n\n```env\nOPENAI_API_KEY=\"your-key\"\nOPENAI_BASE_URL=\"https:\u002F\u002Fapi.openai.com\u002Fv1\"\nOPENAI_MODEL=\"gpt-4o-mini\"\n```\n\nUse OpenAI directly or an OpenAI-compatible endpoint for the LLM.\n\n---\n\n## Local Development\n\n```bash\npnpm install\npnpm db:generate\npnpm dev\n```\n\nThis starts the Next.js dev server on http:\u002F\u002Flocalhost:3000.\n\n### Environment files\n\n| File | Purpose |\n|------|---------|\n| `.env.example` | Documented template for all variables |\n| `.env` | Local machine overrides (git-ignored) |\n| `.env.prod` | Docker Compose production defaults |\n\n---\n\n## Architecture\n\n```\n┌─────────────────────────────────────────────────┐\n│                   Next.js App                   │\n│  (App Router, React 19, TypeScript, Tailwind)   │\n└────────┬──────────┬──────────┬──────────────────┘\n         │          │          │\n    ┌────▼───┐ ┌────▼───┐ ┌───▼────┐\n    │ MySQL  │ │ Redis  │ │ MinIO  │\n    │   8.4  │ │   7    │ │  S3    │\n    └────────┘ └────┬───┘ └────────┘\n                    │\n              ┌─────▼──────┐\n              │   Worker   │\n              │ (FFCreator) │\n              └────────────┘\n```\n\n### Monorepo structure\n\n```\nopen-director\u002F\n├── apps\u002F\n│   ├── web\u002F          # Next.js frontend + API routes + 9 AI agents\n│   └── render\u002F       # BullMQ render worker (FFCreator)\n├── assets\u002F\n│   └── fonts\u002F        # Subtitle rendering fonts\n├── prisma\u002F\n│   └── schema.prisma # Database schema (voices, art_styles, bgms, etc.)\n├── docker-compose.yml\n└── package.json\n```\n\n### Media provider architecture\n\n```\napps\u002Fweb\u002Fsrc\u002Fserver\u002Fagent\u002F\n├── media-provider.ts          # Types + factory + orchestrator\n├── schemas\u002F\n│   └── research.ts            # Research notes, cautions, and source schema\n├── voices.ts                  # TTS voice catalog (loaded from database)\n├── art-styles.ts              # Art style catalog (loaded from database)\n├── providers\u002F\n│   ├── wavespeed.ts           # WaveSpeed implementation\n│   ├── aihubmix.ts            # AiHubMix implementation\n│   ├── local-bgm.ts           # Local BGM (random track from database)\n│   └── wavespeed.test.ts      # Provider tests\n└── graph\u002Fnodes\u002Frecipe\u002F        # 9 LangGraph agent nodes\n```\n\n### Tech stack\n\n| Layer | Technology |\n|-------|-----------|\n| Frontend | Next.js 16, React 19, TypeScript, Tailwind CSS 4 |\n| AI | LangChain + LangGraph |\n| Database | Prisma + MySQL 8.4 |\n| Queue | BullMQ + Redis |\n| Storage | MinIO (S3-compatible) |\n| Render | FFCreator (FFmpeg-based) |\n| Auth | Custom credentials (Prisma-backed) |\n| i18n | next-intl (English + Chinese) |\n\n---\n\n## Routes\n\n### Pages\n\n| Route | Description |\n|-------|-------------|\n| `\u002F` | Landing page |\n| `\u002Fchat` | AI director studio |\n| `\u002Fchat\u002F[id]` | Existing conversation |\n| `\u002Fcreation\u002F[id]` | Creation editor (storyboard preview + export) |\n| `\u002Fspace` | User workspace |\n| `\u002Fbatch` | Batch video production |\n| `\u002Fsignin`, `\u002Fsignup` | Authentication |\n\n### API endpoints\n\n| Endpoint | Description |\n|----------|-------------|\n| `\u002Fapi\u002Fagent-chat` | AI director chat (streaming) |\n| `\u002Fapi\u002Fthreads` | Thread CRUD |\n| `\u002Fapi\u002Fmessages` | Message CRUD |\n| `\u002Fapi\u002Fassets` | Asset management |\n| `\u002Fapi\u002Frecipes\u002Fthread\u002F[id]` | Recipe operations |\n| `\u002Fapi\u002Fuploads\u002Finit`, `\u002Fcomplete` | File upload |\n| `\u002Fapi\u002Frender\u002Fquick-concat` | Video render |\n| `\u002Fapi\u002Fjobs\u002F[id]` | Job status |\n\n---\n\n## Configuration\n\n### Required\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `DATABASE_URL` | Set in `.env.prod` | MySQL connection string |\n| `REDIS_HOST` | `redis` | Redis host |\n| `REDIS_PORT` | `6379` | Redis port |\n| `S3_ENDPOINT` | `http:\u002F\u002Fminio:9000` | S3-compatible storage endpoint |\n| `S3_ACCESS_KEY_ID` | `opendirector` | S3 access key |\n| `S3_SECRET_ACCESS_KEY` | `opendirector-secret` | S3 secret key |\n| `S3_BUCKET` | `open-director` | S3 bucket name |\n\n### Media generation\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `WAVESPEED_API_KEY` | — | WaveSpeed API key |\n| `WAVESPEED_IMAGE_MODEL` | `nano-banana` | Text-to-image model for character and location plates |\n| `WAVESPEED_IMAGE_TO_IMAGE_MODEL` | `nano-banana-2-edit` | Image-to-image\u002Fedit model for storyboard frames with character references |\n| `EDGE_TTS_VOICE` | `zh-CN-XiaoxiaoNeural` | Local Edge TTS voice |\n\n### LLM\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `OPENAI_API_KEY` | — | OpenAI-compatible API key |\n| `OPENAI_BASE_URL` | — | API base URL |\n| `OPENAI_MODEL` | `gpt-4o-mini` | Model name |\n\n### Batch mode\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `PEXELS_API_KEY` | — | Pexels API key for stock videos |\n| `PIXABAY_API_KEY` | — | Pixabay API key for stock videos |\n| `BATCH_TTS_PROVIDER` | `edge` | Batch TTS provider |\n| `BATCH_EDGE_TTS_VOICE` | `zh-CN-XiaoxiaoNeural` | Batch Edge TTS voice |\n\n---\n\n## Deployment\n\n### Docker Compose (recommended)\n\n```bash\ndocker compose up -d --build\n```\n\nThis starts all services: MySQL, Redis, MinIO, web app, and render worker.\n\n### Manual\n\n```bash\npnpm install\npnpm db:generate\npnpm db:migrate\npnpm build\npnpm start\n```\n\n---\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch: `git checkout -b feature\u002Fmy-feature`\n3. Commit your changes: `git commit -m \"feat: add my feature\"`\n4. Push to the branch: `git push origin feature\u002Fmy-feature`\n5. Open a Pull Request\n\n### Development guidelines\n\n- Run `pnpm typecheck` before committing\n- Run `pnpm lint` to check code style\n- Follow [Conventional Commits](https:\u002F\u002Fwww.conventionalcommits.org\u002F) for commit messages\n\n---\n\n## Roadmap\n\n- [ ] AI Digital Human — talking-head video generation with digital avatars\n- [ ] Manga Drama — comic panel animation with expression switching and camera effects\n- [ ] Multi-language voiceover — expand TTS voice catalog with more languages\n","OpenDirector 是一个开源的 AI 视频工作室，能够从一句话生成完整的视频。项目通过九个专门的 AI 代理协同工作，实现创意模式下全流程自动生成视频和批量模式下批量生产短视频的核心功能。这些代理涵盖了从研究、脚本编写、艺术风格选择到故事板制作、角色设计、配音及背景音乐添加等环节，最终渲染输出成品视频。技术上基于 TypeScript 构建，并采用 Docker 容器化部署，易于安装和使用。适用于需要快速创作视频内容但又缺乏专业制作资源的个人或团队，如自媒体创作者、小型广告公司等。",2,"2026-06-11 04:04:32","CREATED_QUERY"]