4e06f4abe2
- 后端: 空镜素材迁移到 config/materials.json,duration从文件名_{N}s_自动解析
- 后端: 新增 POST /api/v1/materials/match 接口,后端做关键词匹配
- 前端: VideoGeneration 空镜匹配改为调用后端接口
- 前端: 人物出镜素材改为本地文件选择器直接选取,不走素材库
- 前端: 视频生成流程简化,移除Vidu对口型和七牛云上传
- Rust: 视频合成支持从随机起始时间截取人物素材片段
- Rust: 修复ffprobe参数错误(添加-show_entries format=duration)
21 lines
495 B
Python
21 lines
495 B
Python
"""
|
|
空镜素材 Schema
|
|
==============
|
|
"""
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class MaterialInfo(BaseModel):
|
|
"""素材条目"""
|
|
|
|
url: str = Field(description="素材 URL(远程或本地路径)")
|
|
duration: float = Field(description="素材时长(秒),从文件名解析)")
|
|
|
|
|
|
class MatchMaterialRequest(BaseModel):
|
|
"""匹配素材请求"""
|
|
|
|
scene: str = Field(description="分镜场景描述")
|
|
duration: float = Field(description="所需时长(秒)")
|