mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-09-30 19:21:33 +02:00
- Add TimelapseEditorModal component with visual timeline scrubber - Add timelapse processing endpoints (info, thumbnails, process) - Add TimelapseProcessor service using FFmpeg for video processing - Support trim (start/end), speed (0.25x-4x), and audio overlay - Add Edit button to TimelapseViewer - Fix browser caching with timestamp query parameter - Change default timelapse playback speed from 2x to 1x
31 lines
1.1 KiB
Python
31 lines
1.1 KiB
Python
"""Schemas for timelapse video processing."""
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class TimelapseInfoResponse(BaseModel):
|
|
"""Video metadata response."""
|
|
|
|
duration: float = Field(description="Video duration in seconds")
|
|
width: int = Field(description="Video width in pixels")
|
|
height: int = Field(description="Video height in pixels")
|
|
fps: float = Field(description="Frames per second")
|
|
codec: str = Field(description="Video codec name")
|
|
file_size: int = Field(description="File size in bytes")
|
|
has_audio: bool = Field(description="Whether video has audio track")
|
|
|
|
|
|
class ThumbnailResponse(BaseModel):
|
|
"""Timeline thumbnail response."""
|
|
|
|
thumbnails: list[str] = Field(description="Base64 encoded JPEG thumbnails")
|
|
timestamps: list[float] = Field(description="Timestamp for each thumbnail in seconds")
|
|
|
|
|
|
class ProcessResponse(BaseModel):
|
|
"""Processing result response."""
|
|
|
|
status: str = Field(description="Processing status: completed, error")
|
|
output_path: str | None = Field(default=None, description="Relative path to output file")
|
|
message: str = Field(description="Status message")
|