视频编辑智能助手

一个通过学习用户视频编辑行为并提供智能辅助的影视后期制作工作流工具。

  • by JossBen
  • Python
  • 本地部署
  • 1 星标
  • 更新于
在 GitHub 查看 JossBen/mcp-video-editing-assistant

使用说明

MCP视频编辑助手

一个模型上下文协议(MCP)服务器,可以从您的视频编辑行为中学习,并为电影和电视后期制作工作流程提供智能帮助。

特性

🎬 DaVinci Resolve集成

  • 实时时间线分析:跟踪剪切、过渡和编辑模式
  • 工作流学习:监控编辑、颜色、荧光和传递页面中的工具使用情况
  • AI驱动的洞察:根据您的编辑风格获取个性化建议

📊 编辑行为跟踪

  • 切割模式分析:了解你喜欢的切割长度和节奏
  • 会话监控:使用详细的操作日志跟踪编辑会话
  • 工作流程优化:识别瓶颈并提出改进建议

🔧 智能工具

  • 文件操作:自动化媒体组织和项目结构
  • 项目监测:关注文件更改和项目更新
  • 模式识别:检测编辑习惯和偏好

快速开始

1.安装

# Clone the repository
git clone https://github.com/yourusername/mcp-video-editing-assistant.git
cd mcp-video-editing-assistant

# Create virtual environment
python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements_editing.txt

2.DaVinci Resolve设置

# Run the setup script to configure Resolve API
python setup_resolve_integration.py

在DaVinci Resolve中启用API访问:

  1. 打开DaVinci Resolve
  2. 前往“首选项”>“系统”>“常规”
  3. 启用“使用外部脚本”
  4. 重新启动DaVinci Resolve

3.克劳德桌面配置

添加到您的Claude Desktop配置文件中:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json 视窗: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "video-editing-assistant": {
      "command": "/path/to/your/venv/bin/python",
      "args": ["/path/to/your/project/davinci_resolve_mcp.py"]
    },
    "editing-watcher": {
      "command": "/path/to/your/venv/bin/python",
      "args": ["/path/to/your/project/editing_watcher.py"]
    }
  }
}

4.使用方法

  1. 启动DaVinci Resolve 已加载项目
  2. 重新启动克劳德桌面 加载MCP服务器
  3. 开始学习课程:
    Ask Claude: "Connect to resolve and start learning my editing patterns"
    

可用工具

DaVinci Resolve集成

  • connect_to_resolve -连接到DaVinci Resolve API
  • analyze_current_timeline -分析活动时间线
  • analyze_cut_patterns -了解您的剪裁风格
  • track_tool_usage -监控您最常用的工具
  • get_editing_insights -编辑模式的AI分析
  • suggest_workflow_optimization -获取个性化的工作流程建议

通用编辑工具

  • start_learning_session -开始跟踪编辑行为
  • track_cut -手动记录切割决策和推理
  • track_workflow_step -监控后期制作阶段
  • get_editing_insights -查看学习到的模式和统计数据
  • suggest_next_action -基于人工智能的下一步建议

文件操作

  • file_write -创建和修改文件
  • list_files -浏览项目目录
  • run_command -执行系统命令
  • get_timestamp -跟踪计时信息

例子

开始学习你的编辑风格

Ask Claude: "Start a learning session for my documentary project"
Claude will: Begin tracking your timeline changes, tool usage, and cutting patterns

获取编辑见解

Ask Claude: "What patterns do you see in my editing?"
Claude will: Analyze your cut lengths, tool preferences, and workflow habits

时间线分析

Ask Claude: "Analyze my current timeline in Resolve"
Claude will: Provide detailed statistics about cuts, pacing, and structure

工作流程优化

Ask Claude: "How can I optimize my editing workflow?"
Claude will: Suggest keyboard shortcuts, tool recommendations, and efficiency improvements

项目结构

mcp-video-editing-assistant/
├── README.md
├── requirements.txt
├── requirements_editing.txt
├── server.py                    # Basic MCP server
├── enhanced_server.py           # Enhanced file operations server
├── editing_watcher.py           # General editing behavior tracker
├── davinci_resolve_mcp.py       # DaVinci Resolve integration
├── setup_resolve_integration.py # Setup and configuration script
└── claude_desktop_config*.json  # Configuration examples

需求

软件

  • Python 3.8+
  • 达芬奇决心17+ (用于Resolve集成)
  • 克劳德桌面 支持MCP

Python依赖关系

  • mcp -模型上下文协议框架
  • watchdog -文件系统监控
  • xmltodict -项目文件的XML解析
  • opencv-python -视频分析(可选)
  • ffmpeg-python -媒体文件处理(可选)

配置

环境变量

export RESOLVE_API_PATH="/Applications/DaVinci Resolve/DaVinci Resolve.app/Contents/Libraries/Fusion/"
export EDITING_DATA_PATH="./editing_patterns.json"

DaVinci解析API路径

  • macOS: /Applications/DaVinci Resolve/DaVinci Resolve.app/Contents/Libraries/Fusion/
  • 视窗: C:\Program Files\Blackmagic Design\DaVinci Resolve\
  • Linux: /opt/resolve/libs/Fusion/

故障排除

DaVinci解决连接问题

  1. 确保DaVinci Resolve正在运行
  2. 检查首选项中是否启用了API访问
  3. 验证平台的正确API路径
  4. 跑 python setup_resolve_integration.py 测试连接

MCP服务器未加载

  1. 检查Claude Desktop配置是否正确
  2. 验证虚拟环境Python路径
  3. 确保安装了所有依赖项
  4. 检查Claude Desktop日志中的错误消息

权限问题

  1. 确保Python有访问项目目录的权限
  2. 检查媒体文件夹的文件系统权限
  3. 以适当的用户权限运行

贡献

  1. 分叉存储库
  2. 创建要素分支(git checkout -b feature/amazing-feature)
  3. 提交您的更改(git commit -m 'Add amazing feature')
  4. 推到分支(git push origin feature/amazing-feature)
  5. 打开拉取请求

许可证

此项目根据MIT许可证获得许可-请参阅 许可证 文件以获取详细信息。

致谢

  • Anthropic 对于模型上下文协议
  • Blackmagic Design 用于DaVinci Resolve API
  • 这 克劳德桌面 MCP集成团队

路线图

  • []Adobe Premiere Pro集成
  • []Final Cut Pro X支持
  • []Avid Media Composer兼容性
  • []人工智能色彩分级建议
  • []自动生成粗切割
  • []导出预设建议
  • []协作工作流工具

备注:本项目仅用于防御安全和生产力目的。始终遵循媒体安全和备份程序的行业最佳实践。