ContentEngineAI:开源电商短视频生成流水线,从抓取到发布全自动
stkzlv/ContentEngineAI
ContentEngineAI 是一个 MIT 许可的 AI 流水线,可自动生成 9:16 竖版电商推广短视频,覆盖从抓取商品数据到 AI 脚本、配音、内容感知字幕及发布的完整流程。
License: MIT | Status: Pre-Production
ContentEngineAI is an AI-powered pipeline for generating short, vertical (9:16) promotional videos for e-commerce products. It automates the complete workflow from scraping product data to delivering final videos with AI-generated scripts, voiceovers, and content-aware subtitles.
Key Features
- End-to-End Automation: Complete video production from scraping to publishing
- Social Media Publishing: Auto-scheduling with slot detection + cleanup after publish
- Link-in-Bio Integration: Auto-add affiliate links to bio page after publishing (Lnk.Bio)
- Affiliate Disclosure: Opt-in rendering of an affiliate program's literal identification phrase in the caption body, configurable for non-Amazon programs (off by default; the
#addisclosure is separate and applied to any render carrying a material connection) - Published Products Registry: Track all published products in JSON/CSV format
- Batch Processing: Process hundreds of products with unified scrape + produce + publish pipeline
- Platform-Specific Metadata: AI-generated titles, captions, hashtags for YouTube, TikTok, Instagram
- Content-Aware Subtitles: Dynamic positioning with CTA-synchronized dual-line support
- Premium Audio: Google Chirp 3 HD and Gemini TTS voices with Whisper STT synchronization, channel-wide voice pinning
Quick Start
ContentEngineAI runs from a checkout, not from a PyPI install: poetry install
provides its dependencies and everything runs as python -m src.<module>. It
is deliberately not published as a package.
# 1. Setup (requires Python 3.12+, FFmpeg, Poetry) git clone https://github.com/stkzlv/ContentEngineAI.git && cd ContentEngineAI poetry install && poetry run playwright install cp .env.example .env # Configure API keys # 1b. Animated captions (optional, and on by default in the bundled config) poetry install --with pycaps && poetry run playwright install chromium # 2. Generate a video poetry run python -m src.scraper.amazon.scraper --product-ids B0BTYCRJSS --debug poetry run python -m src.video.producer outputs/B0BTYCRJSS/data.json slideshow_images1 --debug # Or render a topic, with no scraper run and no product directory. # The same flags work on the global batch, which also publishes it. # This profile has no product photography, so it writes the script first and # then searches stock footage on phrases taken from the narration. poetry run python -m src.video.producer slideshow_stock \ --topic "Why your wifi keeps dropping" \ --topic-description "Router placement, channel congestion, 2.4 vs 5GHz." # 3. Batch pipeline (scrape + produce + publish) poetry run python -m src.pipeline.global_batch \ --keywords "wireless earbuds" \ --profile slideshow_images1 \ --platforms youtube tiktok \ --debug
See Installation for complete setup instructions.
Two things the quickstart assumes:
- Animated captions need the optional
pycapsgroup. The bundled config setssubtitle_engine: pycaps, so step 1b is what makes the shipped default work. Without it a run falls back to FFmpeg captions and warns once; that is a supported configuration, just not the one the config describes. The renderer runs without a display as of 2026-09-02; if its per-word screenshots time out, wrap the producer inxvfb-run -a. See Subtitles and Troubleshooting. - Publishing needs an account before
--platformsdoes anything. SetLATE_API_KEYin.envand connect YouTube, TikTok or Instagram in the scheduler first. Add--skip-publishto run the batch without it. See Publishing.
Documentation
| Guide | Description |
|---|---|
| Documentation map | Where each kind of document lives, and the decision records |
| Installation | Setup guide with prerequisites and API keys |
| Configuration | YAML config reference and CLI overrides |
| Scraping | Scrape products from Amazon: ids, URLs, keywords and input files |
| Scraper Reference | Scraper CLI flags, config/scraper.yaml keys and product-count rules |
| Scraping Explained | Browser mode, anti-bot defences, throttling and media thresholds |
| Producing Videos | Render a product, a topic or a batch, and iterate on one step |
| Video Producer Reference | Producer CLI flags, profile keys, assembly modes and pipeline steps |
| Video Pipeline Explained | How the steps fit, script-first stock renders, profiles and assembly modes |
| TTS Voice Profiles | Voice presets, providers, and style direction |
| Pycaps Subtitles | Optional animated caption engine (TikTok/Reels style) |
| Platform Safe Zones | Subtitle safe zones for TikTok, YouTube Shorts, Reels |
| Batch Processing | Multi-product pipelines and automation |
| Global Batch Reference | Global batch CLI flags |
| Publishing | Publish, schedule, retry and clean up videos through Zernio |
| Publisher Reference | Publisher CLI, config/publisher.yaml keys, metadata files, webhooks and Python API |
| Publishing Explained | Slots, the retry queue, cleanup, link-in-bio, first comments, the delivery sweep and analytics |
| Zernio Client | Direct API client usage, retries, raw REST, and SDK workarounds |
| Compliance | FTC, Amazon Associates, and EU disclosure stack with manual workarounds |
| Architecture | System design and module overview |
| Roadmap | Planned work by horizon (Now / Next / Later) |
| Troubleshooting | Common issues and debugging tips |
Developer Documentation
| Document | Description |
|---|---|
| Development | Dev setup and contribution workflow |
| Testing | Test framework and coverage |
| Linting | Code quality tools (Ruff, MyPy, Bandit) |
| Requirements | What the system must do, by area, with ids and statuses |
| Captions | Why captions look the way they do: font, casing, contrast, highlighting, placement, timing |
| Promotional videos | Why product videos are built this way: hook, cut cadence, closing line, CTA, disclosure, trust signals |
| Tutorials | Why topic videos are built this way: answer-first structure, length, stock visuals, search discovery, durability metrics |
| Video length | How long videos run and why: platform limits, how views are counted, the evidence for product and tutorial lengths, top creators' lengths |
| Audio | Why the mix sounds the way it does: original audio, voiceover and music levels, ducking, loudness |
| Versioning | Semantic versioning and releases |
| Contributing | How to contribute |
| Agent instructions | The rules coding agents follow in this repository |
License
MIT License - see LICENSE for details
来源:GitHub · github.com