Short Drama Publisher (短剧自动化发布)
Automated short drama promotion video workflow, inspired by Strawberry TV model:
- 1. 📥 Download drama content from MoboBoost
- 🎯 AI-powered highlight detection (scene changes, audio peaks, subtitle emotion)
- ✂️ Clip 15-second vertical videos with white English title overlay
- 📤 Auto-publish to Facebook
Prerequisites
System Dependencies
CODEBLOCK0
Credentials Setup
- 1. MoboBoost Cookies
- Login to https://ckoc.cdreader.com
- Export cookies using browser extension (e.g., "EditThisCookie")
- Save as INLINECODE0
- 2. Facebook Cookies
- Login to Facebook
- Export cookies using browser extension
- Save as
config/facebook_cookies.json
Usage
Full Automated Workflow
CODEBLOCK1
Individual Modules
Download content:
CODEBLOCK2
Detect highlights:
CODEBLOCK3
Clip video:
CODEBLOCK4
Publish to Facebook:
CODEBLOCK5
Daily Cron Job
# Run daily at 9am
0 9 * * * cd /path/to/short-drama-publisher && python scripts/daily_workflow.py >> logs/cron.log 2>&1
Configuration
settings.yaml
# Video settings
video:
duration: 15 # Clip duration (seconds)
width: 1080 # Width
height: 1920 # Height (9:16 vertical)
# Text overlay settings
text_overlay:
font: "Arial-Bold"
size_ratio: 0.05 # Font size as ratio of video width
color: "#FFFFFF"
border_color: "#000000"
border_width: 2
position_y: 0.75 # Vertical position (ratio from top)
# AI highlight detection weights
highlight_weights:
scene_change: 0.30
audio_peak: 0.25
subtitle_emotion: 0.25
motion_intensity: 0.20
# Publishing settings
publishing:
videos_per_day: 3 # Number of videos per day
interval_minutes: 120 # Interval between posts (minutes)
Directory Structure
CODEBLOCK8
AI Highlight Detection
The highlight detector uses multiple signals to find the most engaging moments:
| Signal | Weight | Method |
|---|
| Scene Change | 30% | OpenCV frame-by-frame difference analysis |
| Audio Peak |
25% | Librosa audio amplitude analysis |
| Subtitle Emotion | 25% | Text sentiment analysis on subtitles |
| Motion Intensity | 20% | Optical flow magnitude calculation |
Each frame gets a composite score, and the highest-scoring 15-second segment is selected.
Important Notes
[!WARNING]
- - MoboBoost and Facebook websites may update, requiring script adjustments
- Recommend 1-3 videos per day to simulate organic posting rhythm
- Ensure you have rights to use MoboBoost content for promotion
- Cookie-based auth may expire; re-export periodically
Short Drama Publisher (短剧自动化发布)
自动化短剧推广视频工作流程,灵感来源于草莓TV模式:
- 1. 📥 从MoboBoost下载剧集内容
- 🎯 AI驱动的精彩片段检测(场景变化、音频峰值、字幕情感)
- ✂️ 剪辑15秒竖屏视频,叠加白色英文标题
- 📤 自动发布到Facebook
前置条件
系统依赖
bash
macOS
brew install ffmpeg
Python依赖
pip install playwright opencv-python librosa numpy pyyaml
playwright install chromium
凭证设置
- 1. MoboBoost Cookies
- 登录 https://ckoc.cdreader.com
- 使用浏览器扩展(如EditThisCookie)导出cookies
- 保存为 config/moboboost_cookies.json
- 2. Facebook Cookies
- 登录Facebook
- 使用浏览器扩展导出cookies
- 保存为 config/facebook_cookies.json
使用方法
全自动工作流程
bash
python scripts/daily_workflow.py
独立模块
下载内容:
bash
python scripts/moboboost_downloader.py --drama-code 613815
检测精彩片段:
bash
python scripts/highlight_detector.py --input data/downloads/video.mp4
剪辑视频:
bash
python scripts/video_editor.py --input video.mp4 --start 01:23 --title 剧集名称
发布到Facebook:
bash
python scripts/facebook_publisher.py --video data/outputs/clip.mp4 --drama-code 613815 --drama-name 剧集名称
每日定时任务
bash
每天早上9点运行
0 9
* cd /path/to/short-drama-publisher && python scripts/daily_workflow.py >> logs/cron.log 2>&1
配置
settings.yaml
yaml
视频设置
video:
duration: 15 # 剪辑时长(秒)
width: 1080 # 宽度
height: 1920 # 高度(9:16竖屏)
文字叠加设置
text_overlay:
font: Arial-Bold
size_ratio: 0.05 # 字体大小占视频宽度的比例
color: #FFFFFF
border_color: #000000
border_width: 2
position_y: 0.75 # 垂直位置(距顶部比例)
AI精彩片段检测权重
highlight_weights:
scene_change: 0.30
audio_peak: 0.25
subtitle_emotion: 0.25
motion_intensity: 0.20
发布设置
publishing:
videos
perday: 3 # 每日发布视频数量
interval_minutes: 120 # 发布间隔(分钟)
目录结构
short-drama-publisher/
├── SKILL.md # 本文件
├── config/
│ ├── settings.yaml # 配置文件
│ ├── moboboost_cookies.json # MoboBoost凭证
│ └── facebook_cookies.json # Facebook凭证
├── scripts/
│ ├── moboboost_downloader.py # 内容下载器
│ ├── highlight_detector.py # AI精彩片段检测
│ ├── video_editor.py # 视频剪辑
│ ├── facebook_publisher.py # Facebook发布器
│ └── daily_workflow.py # 主工作流程
├── data/
│ ├── downloads/ # 原始下载内容
│ ├── outputs/ # 剪辑后的视频
│ └── history.json # 发布历史记录
├── fonts/ # 字体文件
└── logs/ # 日志文件
AI精彩片段检测
精彩片段检测器使用多种信号来寻找最吸引人的时刻:
| 信号 | 权重 | 方法 |
|---|
| 场景变化 | 30% | OpenCV逐帧差异分析 |
| 音频峰值 |
25% | Librosa音频振幅分析 |
| 字幕情感 | 25% | 字幕文本情感分析 |
| 运动强度 | 20% | 光流幅度计算 |
每帧获得综合评分,选择得分最高的15秒片段。
重要提示
[!WARNING]
- - MoboBoost和Facebook网站可能更新,需要调整脚本
- 建议每天发布1-3个视频,模拟自然的发布节奏
- 确保拥有使用MoboBoost内容进行推广的权限
- 基于Cookie的认证可能过期,需定期重新导出