feat: Add comprehensive timeline editor with frame editing and regeneration capabilities

This commit is contained in:
empty
2026-01-05 14:48:43 +08:00
parent 7d78dcd078
commit ca018a9b1f
68 changed files with 14904 additions and 57 deletions

View File

@@ -239,8 +239,13 @@ async def generate_video_async(
"prompt_prefix": request_body.prompt_prefix,
"bgm_path": request_body.bgm_path,
"bgm_volume": request_body.bgm_volume,
# Progress callback can be added here if needed
# "progress_callback": lambda event: task_manager.update_progress(...)
# Progress callback support
"progress_callback": lambda event: task_manager.update_progress(
task_id=task.task_id,
current=int(event.progress * 100),
total=100,
message=f"{event.event_type}" + (f" - {event.action}" if event.action else "")
)
}
# Add TTS workflow if specified
@@ -268,10 +273,31 @@ async def generate_video_async(
# Convert path to URL
video_url = path_to_url(request, result.video_path)
# Convert storyboard to dict for serialization
storyboard_data = {
"title": result.storyboard.title,
"total_duration": result.storyboard.total_duration,
"final_video_path": result.storyboard.final_video_path,
"created_at": result.storyboard.created_at.isoformat() if result.storyboard.created_at else None,
"frames": [
{
"index": f.index,
"narration": f.narration,
"image_prompt": f.image_prompt,
"audio_path": f.audio_path,
"image_path": f.image_path,
"video_segment_path": f.video_segment_path,
"duration": f.duration,
}
for f in result.storyboard.frames
]
}
return {
"video_url": video_url,
"duration": result.duration,
"file_size": file_size
"file_size": file_size,
"storyboard": storyboard_data
}
# Start execution