建筑视频剪辑

arch-video-cut

by baushua

Automatic Architecture Video Editing Workflow with Self-Learning Preferences

3.9k内容与创意未扫描2026年3月23日

安装

claude skill add --url github.com/openclaw/skills/tree/main/skills/baushua/arch-video-cut

文档

Automatic Architecture Video Editing Workflow with Self-Learning Preferences


Description

Automatically complete the full architecture video editing workflow: multi-video merging, speech-to-text subtitles, background music mixing, and dual output (landscape + portrait). Built-in self-learning system remembers your editing preferences.

Core Features:

  • 🎬 Auto merge multiple videos + duration compression
  • 🎙️ Speech transcription or custom subtitles
  • 🎵 Smart background music generation + mixing
  • 📱 Dual output: landscape (16:9) + portrait (3:4)
  • 🧠 Self-evolving preference system

Usage

Quick Start

bash
cd ~/.openclaw/workspace/skills/arch-video-cut
python3 scripts/full_workflow.py

Prerequisites

  1. Install dependencies:
bash
brew install ffmpeg-full  # Required for libass subtitle support
pip3 install faster-whisper  # Optional: for speech transcription
  1. Prepare materials:
  • Audio file: ~/Desktop/新录音 XX.m4a (narration voiceover)
  • Video folder: data/m1/ (architecture video clips to merge)
  1. Configure preferences (optional):
bash
python3 scripts/manage_preferences.py set

Commands

CommandDescription
python3 scripts/full_workflow.pyExecute full editing workflow
python3 scripts/manage_preferences.py showView current preferences
python3 scripts/manage_preferences.py setInteractive preference editor
python3 scripts/manage_preferences.py resetReset to defaults

Configuration

Preferences

Edit config/user_preferences.json or run manage_preferences.py set:

json
{
  "video": {
    "target_duration": 20.0,      // Target duration in seconds
    "vertical_format": "3:4",     // Portrait aspect ratio
    "vertical_resolution": "1080x1440"
  },
  "subtitles": {
    "horizontal_font_size": 14,   // Landscape font size (px)
    "vertical_font_size": 10,     // Portrait font size (px)
    "font_name": "STHeiti",       // Font family
    "auto_wrap": true,            // Auto word wrap
    "margin_v": 30                // Bottom margin (px)
  },
  "audio": {
    "background_music_volume": 0.15,  // BGM volume (0-1)
    "fade_in_duration": 2,            // Fade-in duration (sec)
    "fade_out_duration": 2            // Fade-out duration (sec)
  }
}

Custom Subtitles

Edit the subtitles_text array in transcribe_audio() function:

python
subtitles_text = [
    "These six renovation projects were transformed from abandoned schools",
    "Historic buildings, red brick houses, tile-roof homes, single-story factories, and rural self-built houses",
    "Through minimalist design approaches and low-cost renovation strategies",
    "Giving old buildings new life",
    "While balancing contemporary aesthetics and market demands",
]

Output

Output location: data/ folder

FileDescription
edited_video_final_with_subtitles.mp4Landscape version (16:9)
edited_video_final_with_subtitles_3x4.mp4Portrait version (3:4)

Example output:

code
✅ All done!
📁 Output: data/edited_video_final_with_subtitles.mp4
📊 Size: 16.0MB
🎬 Duration: 20.04 seconds

Workflow

code
1. Merge videos → Compress to target duration
2. Generate subtitles → Allocate timeline based on audio duration
3. Generate BGM → Piano chords + fade in/out
4. Mix audio → Voiceover + background music
5. Burn subtitles → Landscape + Portrait versions

Total processing time: ~2-3 minutes (depends on video count and duration)


Self-Learning

Built-in preference learning system automatically records your editing habits:

  • 📝 Saves configuration after each edit
  • 📊 Keeps last 20 adjustment records
  • 🔄 Auto-applies preferences on next run
  • 🎛️ Modify anytime via manage_preferences.py

View learning history:

bash
python3 scripts/manage_preferences.py show

Examples

Example 1: Quick Edit

bash
# Place 5 video clips in data/m1/
# Place voiceover audio at ~/Desktop/新录音 74.m4a
cd ~/.openclaw/workspace/skills/arch-video-cut
python3 scripts/full_workflow.py

Example 2: Adjust Font Size

bash
# Interactive modification
python3 scripts/manage_preferences.py set
# Input: horizontal font size 18px

# Re-edit with new font automatically applied
python3 scripts/full_workflow.py

Example 3: Create 30-Second Version

bash
# Modify preference
python3 scripts/manage_preferences.py set
# Input: target duration 30 seconds

# Edit
python3 scripts/full_workflow.py

Troubleshooting

❌ ffmpeg-full not found

bash
brew install ffmpeg-full  # Required for libass subtitle support

❌ Subtitles not showing

Check if ffmpeg-full is installed (system ffmpeg doesn't support libass)

❌ Transcription failed

bash
pip3 install faster-whisper
# Or skip transcription and edit subtitle text directly in script

❌ Wrong video aspect ratio

Modify vertical_format in config/user_preferences.json


Files

code
arch-video-cut/
├── SKILL.md                    # This file
├── SELF_LEARNING_GUIDE.md      # Self-learning detailed guide
├── README.md                   # Quick start guide
├── config/
│   └── user_preferences.json   # User preferences
├── scripts/
│   ├── full_workflow.py        # Main editing script
│   ├── preference_learner.py   # Preference learner
│   └── manage_preferences.py   # Preference manager
└── data/
    ├── m1/                     # Input video folder
    ├── temp_edit/              # Temporary files
    └── *.mp4                   # Output videos

Version

v1.0.0 - 2026-03-18

  • ✅ Multi-video merge + duration compression
  • ✅ Custom subtitle text
  • ✅ Background music generation + mixing
  • ✅ Landscape + Portrait dual output
  • ✅ Self-evolving preference system

Author

WildUrban Architect - Linwangming

Website: http://www.ual-studio.com/


Make tools adapt to you, not you to tools. 🧠

相关 Skills

内部沟通

by anthropics

Universal
热门

按公司常用模板和语气快速起草内部沟通内容,覆盖 3P 更新、状态报告、领导汇报、项目进展、事故复盘、FAQ 与 newsletter,适合需要统一格式的团队沟通场景。

按公司偏好的模板快速产出状态汇报、领导更新和 FAQ,既省去反复改稿,也让内部沟通更统一、更专业。

内容与创意
未扫描111.8k

主题工厂

by anthropics

Universal
热门

给幻灯片、文档、报告和 HTML 落地页快速套用专业配色与字体主题,内置 10 套预设风格并支持现场生成新主题,适合统一品牌或内容视觉。

主题工厂能帮你把幻灯片、文档到落地页快速统一视觉风格,内置 10 套主题,还能按需即时生成新主题。

内容与创意
未扫描111.8k

文档共著

by anthropics

Universal
热门

围绕文档、提案、技术规格、决策记录等写作任务,按上下文收集、结构迭代、读者测试三步协作共创,减少信息遗漏,写出更清晰、经得起他人阅读的内容。

写文档、方案或技术规格时容易思路散、信息漏,它用结构化共著流程帮你高效传递上下文、反复打磨内容,还能从读者视角做验证。

内容与创意
未扫描111.8k

相关 MCP 服务

热门

免费的加密新闻聚合 MCP,汇集 Bitcoin、Ethereum、DeFi、Solana 与 altcoins 资讯源。

内容与创意
130

by ProfessionalWiki

让 Large Language Model 客户端无缝连接任意 MediaWiki 站点,可创建、更新、搜索页面,并通过 OAuth 2.0 安全管理内容。

内容与创意16 个工具
72

借助 86+ 个云端 media processing robots,处理视频、音频、图像和文档。

内容与创意
71

评论