返回 VideoClaw
create_post.md
根目录 / video-claw / references / workflow / create_post.md
1 # 后期剪辑
2
3 执行第六阶段:将所有视频片段按剧集分组拼接成完整的各集视频。
4
5 ## 请求
6
7 ```bash
8 curl -X POST "http://localhost:8000/api/project/{session_id}/execute/post_production" \
9 -H "Content-Type: application/json" \
10 -d '{"session_id": "xxx"}'
11 ```
12
13 ## 停点说明
14
15 此阶段**无停点**,直接执行完成。
16
17 ## 产物结构
18
19 ```json
20 {
21 "final_videos": [
22 {
23 "episode": 1,
24 "path": "code/result/video/xxx/output/xxx_ep1.mp4",
25 "name": "第 1 集"
26 },
27 {
28 "episode": 2,
29 "path": "code/result/video/xxx/output/xxx_ep2.mp4",
30 "name": "第 2 集"
31 }
32 ],
33 "final_video": "code/result/video/xxx/output/xxx_ep1.mp4"
34 }
35 ```
36
37 ## 完成提示
38
39 全部阶段完成后,告知用户:
40 - 各剧集的阶段视频已分别生成完毕
41 - **发送前端 URL**(获取本地 IPv4 地址,构造 `http://{local_ip}:3000/?session={session_id}&stage=post_production`)
42 - 提取所有的 `artifact.final_videos`,按集数依次**将生成的视频文件发送给用户**,并带上集数名称说明(如"第 1 集成片已生成")
43 - 提供 Web 界面链接供用户查看和下载
44
45 ```bash
46 curl "http://localhost:8000/api/project/{session_id}/artifact/post_production"
47 ```
48
49 ## 常见问题
50
51 | 错误 | 原因 | 解决方法 |
52 |------|------|----------|
53 | `curl: (7) Failed to connect` | 后端未运行 | 启动后端服务 |
54 | 拼接失败 | 部分视频片段缺失或损坏 | 检查 video_generation 阶段的产物 |
55 | final_video 为空 | 所有视频片段生成失败 | 回退到 video_generation 阶段重新生成 |
56 | 视频时长为 0 | FFmpeg 处理失败 | 检查后端日志 |
56 lines MARKDOWN