使用两阶段流水线,通过 MCP 处理、裁剪、上传到 GCS 并更新数据库,为 Sing The Hook 歌曲模板生成 9:16 竖屏视频。
Generate videos for Sing The Hook (STH) song templates using a two-stage video generation pipeline.
This skill processes song template IDs from a CSV file, fetches data from PostgreSQL, generates videos via Imagine MCP, and updates the database with results. All videos are generated in 9:16 (vertical) aspect ratio by default.
This skill requires the following environment variables to be set in your OpenClaw environment:
VariableDescriptionDefaultSTH_DB_HOSTPostgreSQL Hostlocalhost``STH_DB_PORTPostgreSQL Port5432``STH_DB_NAMEPostgreSQL Database Namesth_db``STH_DB_USERPostgreSQL Usernamepostgres``STH_DB_PASSWORDPostgreSQL Password(Required)STH_MCP_ENDPOINTImagine MCP API Endpoint(Required)STH_MCP_API_KEYImagine MCP API Key(Required)STH_GCS_KEY_PATHPath to GCS Service Account JSON key(Required for uploads)STH_NOTIFY_TARGETTelegram ID for notifications(Optional)
Read the CSV file provided by the user. Expected columns:
Song Template ID - The template ID to processStatus - Current status (will be updated)ffprobe.create-video (Stage 1).song_templates table.When the user asks to generate video templates for STH:
Ask for the CSV file or content.
Run the generator script: bash
python3 sth_video_generator.py <csv_file>
Install required Python packages:
bash
pip3 install google-cloud-storage
Requires ffmpeg and psql to be installed on the host system.