Skip to content

feat(export): JianYing/CapCut draft export - #99

Open
Alphaxiaoteng wants to merge 2 commits into
0xsline:mainfrom
Alphaxiaoteng:feat/jianying-export
Open

feat(export): JianYing/CapCut draft export#99
Alphaxiaoteng wants to merge 2 commits into
0xsline:mainfrom
Alphaxiaoteng:feat/jianying-export

Conversation

@Alphaxiaoteng

Copy link
Copy Markdown

剪映 / CapCut 草稿导出

导出对话框新增「剪映草稿」tab:把 OpenChatCut 时间线(视频、音轨、字幕)通过开源 capcut-cli 写入本地 CapCut / 剪映草稿库,用剪映或 CapCut 打开即可继续剪辑与渲染。

剪映草稿导出

功能

  • 导出对话框「剪映草稿」tab:草稿名称、目标草稿库(CapCut 草稿库默认 / 剪映草稿库)、导出结果(草稿路径、视频/音轨/字幕数)
  • 版本建议注释:剪映 6.0 起草稿文件已加密,本工具生成明文草稿,建议使用剪映 5.9.0 或更早版本打开;CapCut 国际版不受此限制
  • 服务端 POST /api/external-agent/jianying-export(trusted editor 门禁):capcut-cli quickstart → add-video → add-audio → import-srt,媒体路径解析(profile mediaDir + worktree uploads)、~ 展开
  • 浏览器 agent 工具 export_jianying_draft(MCP 可调):收集时间线 items + 字幕 cue → 调用服务端

验证

  • tsc / oxlint / check-i18n 通过
  • 服务端全链路实测:2 视频 + 1 音频 + 2 字幕 → CapCut 库草稿,track 时间轴逐项核对精确
  • 剪映库导出(~ 展开)实测成功
  • 错误路径:无视频 / 缺失媒体 / 非法草稿名 / 空 items 均正确返回
  • UI 浏览器实测:导出 → 草稿生成于 CapCut 库
  • server/external-agent/jianying-export.verify.ts:媒体路径解析校验

Add a 剪映草稿 (JianYing Draft) tab to the export dialog backed by
capcut-cli: pick a draft name and target store (CapCut default /
JianYing), with a note recommending JianYing 5.9.0 or earlier (6.0+
drafts are encrypted). Reuses the server-side export module and the
export_jianying_draft agent tool for collecting timeline media,
audio and caption cues.
JianYing draft tab: target store segmented control gains a custom-path
mode (draftsDir input with ~ expansion), and the store choice, custom
path and last draft name are persisted in localStorage so re-opening
the export dialog keeps the user's setup. Verify script now asserts
expandHomeDir edge cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant