Huobao Drama: Open‑Source AI Short‑Drama Generator

Huobao Drama: An Open‑Source AI Short‑Drama Generator

Short‑form video is everywhere—from TikTok clips to YouTube Shorts—but the creative loop remains heavily manual. Writers outline, artists draw, editors assemble. Huobao Drama breaks that cycle by turning a single line of text into a finished micro‑film, powered entirely by open‑source software and large language models (LLMs).

Why an Open‑Source Short‑Drama Toolkit?

  • Democratization of AI content creation – A small team can produce professional‑looking clips without expensive proprietary tools.
  • Customizability – Plug‑in your own LLMs, image or video models, and tweak the workflow to fit your studio’s pipeline.
  • Community‑driven growth – From GitHub contributors to Discord discussions, the project thrives on community feedback and feature requests.

Core Architecture

The stack is neatly split into four layers, following Domain‑Driven Design principles that keep the business logic clean and the infrastructure modular.

├─ API Layer (Gin HTTP)          // Exposes REST endpoints
├─ Application Services Layer    // Orchestrates domain logic
├─ Domain Layer                  // Models for scripts, scenes, characters
└─ Infrastructure Layer          // Database, AI clients, file storage

Go powers the backend (version 1.23+), while Vue 3 + TypeScript + Vite builds a user‑friendly frontend. The project uses GitHub‑Hosted modernc.org/sqlite for a pure Go SQLite driver, ensuring zero C‑go dependencies and cross‑platform builds.

What the Platform Can Do

  • Intelligent script parsing – An LLM processes a one‑sentence input and extracts character list, settings and storyboard scenes.
  • Character & scene generation – OpenAI or Gemini models generate detailed portraits and background images.
  • Storyboard creation – Generate text‑to‑image prompts for each shot, create a sequence of frames.
  • Video synthesis – Two approaches: text‑to‑video (Sora) and image‑to‑video (FFMPEG + model). Combine both for high‑quality outputs.
  • Editing & transitions – Automatic cutting, fade‑ins/outs and audio syncing.
  • Resource management – Central asset library, export/import support, and real‑time progress tracking.

Quick Start – Docker Compose

Docker offers the easiest path to try Huobao Drama. The docker-compose.yml file pulls the latest image, mounts a local data directory and exposes ports 5678 (API) and 3012 (frontend).

# Pull the image and start the stack
$ docker compose up -d

# Check logs
$ docker compose logs -f

# Stop the stack
$ docker compose down

All configuration is in configs/config.yaml. Edit values like ai.default_text_provider or server.port before first launch.

Development Mode – Hot‑Reload

Want to tweak the frontend or backend? Clone the repo, install dependencies and run each side separately:

# Backend
$ go run main.go
# Frontend
$ cd web && npm run dev

The frontend is configured to proxy API requests to localhost:5678, so you can experiment in real time.

Contributing Guide

  • Fork the repo, create a feature branch, push changes.
  • Write clear commit messages and keep PR titles concise.
  • Run go vet and npm run lint before submitting.
  • Check docs/CONTRIBUTING.md for coding standards and test instructions.

Potential Use Cases

  1. Film schools experiment with rapid prototype storytelling.
  2. Marketing teams produce branded micro‑videos for social media.
  3. Content creators generate endless ideas for Vlogs or YouTube.
  4. AI researchers test text‑to‑video pipelines with a ready‑made pipeline.

Future Roadmap

  • Support for more LLM providers (Claude, Llama‑2).
  • GPU‑accelerated video generation with optional ONNX runtime.
  • Multi‑language UI and script parsing.
  • Analytics dashboard for production metrics.

Get Involved

Whether you’re a developer, designer, or storyteller, there’s a place for you. Join the GitHub repo, fork, and start coding. For quick questions, drop a note in the discussions or ping the maintainers on Discord.

Let Huobao Drama turn the next big idea into a polished short film in a few clicks, all powered by open‑source AI.

Original Article: View Original

Share this article