Metadata-Version: 2.4
Name: open-short-drama-studio
Version: 0.10.0
Summary: Deterministic AI Short-Drama Quality Gates, Six-Segment Storyboard Prompt Standardizer, Multi-Shot 15s Segment Cut Alignment Gate, Character Turn-Around Anchor Gate, Seedance/Flow Credit Optimizer, CapCut Draft Timeline Generator, HTML5 & ZIP WebGame Multi-Portal Release Doctor, Studio BGM Audio Gate, Mobile Caption Safe-Zone, Social Cover Card & -14 LUFS MP4 Master Delivery Gate.
Author: open-short-drama-studio maintainers
License: MIT
Project-URL: Homepage, https://github.com/17671454333/open-short-drama-studio
Project-URL: Repository, https://github.com/17671454333/open-short-drama-studio
Project-URL: Issues, https://github.com/17671454333/open-short-drama-studio/issues
Project-URL: Changelog, https://github.com/17671454333/open-short-drama-studio/releases
Keywords: short-drama,ai-video,storyboard,capcut,jianying,webgame,quality-gates
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Multimedia :: Video
Classifier: Topic :: Software Development :: Quality Assurance
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# 🎬 Open Short-Drama & WebGame Studio (`open-short-drama-studio`)

**English** · [简体中文](README.zh-CN.md)

[![CI](https://github.com/17671454333/open-short-drama-studio/actions/workflows/ci.yml/badge.svg)](https://github.com/17671454333/open-short-drama-studio/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-brightgreen.svg)](LICENSE)
[![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue.svg)](pyproject.toml)
[![Zero Dependencies](https://img.shields.io/badge/dependencies-0-success.svg)](pyproject.toml)

**Deterministic Quality Gates, Six-Segment Storyboard Prompt Standardizer, 85%-Credit-Saving Video Budget Optimizer, CapCut/JianYing Timeline Manifest Generator, HTML5 WebGame Pre-Flight Doctor & Studio BGM Audio Quality Gate for AI Creators.**

---

## ✨ Why `open-short-drama-studio`?

Most AI video & short-drama scripts fail before generation even starts: weak cold-open hooks, bloated 60-character dialogue lines that ruin TTS pacing, burning 100% of credits on 1080p Pro models for static talking heads, annoying synthetic sine-wave buzzer artifacts, unstructured chaotic prompts that morph character faces, and manual timeline dragging in CapCut/JianYing.

`open-short-drama-studio` provides **100% deterministic, zero-dependency Python engines** to validate scripts, structure 6-segment cinematic prompts, slash video generation costs by **80%+**, enforce studio audio standards, and generate microsecond-aligned CapCut track manifests.

### Core Modules (`drama_kit`)

1. **🎯 14-Point Episode Outline & Script Gate (`validate_episode_outline`)**:
   - Enforces **Cold-Open Hook within the first 3 beats** (`index 0..2`).
   - Enforces **$\le 35$ characters per dialogue line** for natural TTS lip-sync.
   - Verifies concrete episode cliffhangers and visual action beat density.
2. **🎨 Six-Segment Storyboard Prompt Standardizer (`standardize_shot_prompt`)**:
   - Standardizes raw scene descriptions into canonical 6-segment cinematic prompts: `[Shot Size & Movement] + [Subject Visual Anchor] + [Action & Micro-expression Beat] + [Environment & Lighting] + [Cinematic Style & Lens] + [Negative Exclusions]`.
   - Supports targeted presets for **MiniMax H3, Wan 2.1, Kling, and Midjourney**.
3. **💰 3-Tier Video Credit Blade Optimizer (`calculate_storyboard_budget`)**:
   - Routes VFX/empty scenery shots to monthly unlimited pools (`0` marginal credits), static gaze/dialogue to `480p Lite`, standard movement to `480p Standard`, and hard-caps expensive `Pro` models to $\le 2$ climax hero shots per episode.
   - Pairs `480p` cloud output with a deterministic **FFmpeg Lanczos + Unsharp + Dynamic Film-Grain (`noise=alls=6:allf=t+u`)** 1080p upscaling filter, cutting credit costs by **80%~86%**.
4. **✂️ CapCut / JianYing Microsecond Track Manifest (`export_capcut_timeline_manifest`)**:
   - Converts storyboard shots and speaker lines into microsecond-aligned (`1,000,000 us = 1s`) 9:16 vertical video & subtitle tracks ready for draft injection.
5. **🎮 HTML5 WebGame Portal Doctor (`inspect_webgame_bundle`)**:
   - Static pre-flight checker for AI-generated HTML5/Three.js games targeting **Bilibili Toy, Itch.io, CrazyGames, and WeChat Mini-Games** (blocks root-absolute `/assets/...` 404 traps, external CDN leaks, and missing mobile viewport tags).
6. **🎵 Studio Stereo Audio & Anti-Buzzer BGM Quality Gate (`inspect_audio_track_quality`)**:
   - Rejects synthetic pure sine/square-wave buzzer noise (73Hz, 110Hz, 146Hz, 220Hz, 432Hz) with monotonic ratios $> 0.42$.
   - Enforces stereo channel layouts and studio background music master tracks (`ancient_suspense`, `epic_climax`, `action_battle`, `modern_urban`, `tech_showcase`).
   - Generates production-grade vocal denoise (`highpass=f=85,afftdn=nf=-25`) and sidechain ducking filter chain to keep dialogues crystal clear over BGM.
7. **📱 Mobile 9:16 Caption & Title Safe-Zone Inspector (`inspect_caption_safe_zone`)**:
   - Enforces platform UI obstacle avoidance for vertical video across **Douyin, Kuaishou, WeChat Channels, Xiaohongshu, and TikTok** (top status bar `0..12%`, bottom title/progress scrubber `78%~80%..100%`, and right action buttons `82%..100%`).
   - Validates WeChat Channels 16-character single-line title constraint and subtitle line density ($\le 18$ characters) with automated title truncation and caption-splitting repair suggestions.
8. **🖼️ Multi-Platform Social Cover Compliance Gate (`inspect_social_cover_card`)**:
   - Validates aspect ratio & minimum resolution across `3:4` (Xiaohongshu), `9:16` (WeChat Channels/Douyin/TikTok), `16:9` (Bilibili/YouTube), and `1:1` (Bilibili Toy), plus headline length ($\le 14$ chars) and mandatory AI-generated content disclosure tags.
9. **🎭 Cross-Shot Character Anchor & Stale-View Gate (`inspect_character_anchor_pack`)**:
   - Enforces single-hop star reference topology (`frontal_full` master anchor $\to$ `closeup`, `side_90`, `back`) to eliminate multi-hop facial drift, detects stale derived views when master anchors are regenerated, and audits script speaker coverage.
10. **🎞️ Multi-Platform `-14 LUFS` MP4 Master Delivery Gate (`inspect_master_video_delivery`)**:
    - Pre-publish stream & loudness audit enforcing `-14.0 ± 2.5 LUFS` integrated loudness, `<= -1.0 dBTP` true-peak ceiling, `yuv420p` mobile decoder compatibility, front-loaded `+faststart` `moov` atom, constant frame rate (CFR) lip-sync integrity, A/V duration alignment (`<= 120ms`), and zero cold-open black frames (`<= 0.15s`), complete with one-click FFmpeg remastering arguments.
11. **🎬 Multi-Shot `<= 15s` Segment & Keyframe Cut-Point Gate (`inspect_multishot_segment_cuts`)**:
    - Deterministic pre-generation validator for MiniMax H3 `[Shot k]`, Seedance 2.0, and Omni Flash multi-cut segments: enforces `0.00s` master keyframe pinning, monotonic cut-point continuity, `[1.5s, 6.0s]` per-cut rhythm bounds, `<= 15.0s` single-pass duration ceiling, `<= 4` reference `Picture` slots, and `<= 4.8 chars/s` `<d>` lip-sync pacing.
12. **📦 Multi-Portal WebGame ZIP Release Archive Gate (`inspect_webgame_archive_manifest`)**:
    - Pre-upload ZIP manifest auditor for **Bilibili Toy, Itch.io, CrazyGames, and WeChat Mini-Games**: blocks nested wrapper directories (`dist/index.html`), Windows backslash ZIP entries, `.env` / `.git` / `.map` artifact leaks, portal MB ceilings (`4MB` WeChat main package, `50MB` Toy), Linux CDN case-mismatch asset 404s, and incompatible `SharedArrayBuffer` threaded WASM builds.

---

## 🚀 Quick Start (Zero Dependencies)

```bash
git clone https://github.com/17671454333/open-short-drama-studio.git
cd open-short-drama-studio
python -m drama_kit demo
python -m unittest discover -s tests -v
```

---

## 💎 Pro Edition & Commercial Workflow (Open-Core Comparison)

`open-short-drama-studio` follows an **Open-Core** model. The deterministic validation, prompt standardization, budget planning, and timeline calculation core is 100% free and MIT-licensed. For studios and full-time creators seeking end-to-end automation:

| Feature / Module | Community Core (This Repo · MIT) | Studio Pro Edition (Commercial / Sponsors) |
| :--- | :---: | :---: |
| **Deterministic Script & Hook Quality Gates** | ✅ Included | ✅ Included + Multi-Episode Arc Matrix |
| **6-Segment Storyboard Prompt Standardizer** | ✅ Included (`standardize_shot_prompt`) | ✅ + Character Visual Anchor Library |
| **3-Tier Credit Optimizer & FFmpeg Grain Formula** | ✅ Included | ✅ + Automated Batch FFmpeg Render Pipeline |
| **CapCut / JianYing Timeline Manifest** | ✅ JSON Manifest | 🚀 **Direct `D:\CapCut Drafts` One-Click Writer (`pyJianYingDraft`)** |
| **Studio Audio Denoise & Anti-Buzzer BGM Gate** | ✅ Included (`inspect_audio_track_quality`) | 🚀 **Automated Sidechain Ducking & Mastering Engine** |
| **Mobile 9:16 Safe-Zone & Title Gate** | ✅ Included (`inspect_caption_safe_zone`) | 🚀 **Automated Dynamic UI Overlay & Crop Preview Engine** |
| **Cross-Shot Facial Consistency Anchoring** | — | 🚀 **Frontal Anchor + 6-View Multi-Angle Generation Pipeline** |
| **HTML5 WebGame Pre-Flight Doctor** | ✅ Included (`inspect_webgame_bundle`) | 🚀 **6-Platform Build Automation (HTML5, EXE, APK, WeChat, Toy)** |
| **8-Platform Zero-Popup Matrix Publisher** | — | 🚀 **One-Click Multi-Platform Publishing (Chrome M144+ Live CDP)** |

> 🔗 **Underlying Infrastructure**: Check our cognitive agent security runtime & Chrome M144+ live CDP MCP server 👉 **[`17671454333/jev-cognitive-mcp`](https://github.com/17671454333/jev-cognitive-mcp)**
