new features
This commit is contained in:
@@ -45,6 +45,36 @@ class SilenceRemoveRequest(Schema):
|
||||
)
|
||||
|
||||
|
||||
class SilenceDetectRequest(Schema):
|
||||
"""Request to detect silent segments in media file."""
|
||||
|
||||
file_key: str = Field(..., description="Storage key of the input file")
|
||||
project_id: UUID | None = Field(default=None, description="Associated project ID")
|
||||
min_silence_duration_ms: int = Field(
|
||||
default=200, description="Minimum silence duration in milliseconds"
|
||||
)
|
||||
silence_threshold_db: int = Field(
|
||||
default=16, description="Silence threshold in decibels"
|
||||
)
|
||||
padding_ms: int = Field(
|
||||
default=100, description="Padding around non-silent segments in milliseconds"
|
||||
)
|
||||
|
||||
|
||||
class SilenceApplyRequest(Schema):
|
||||
"""Request to apply silence cuts to media file."""
|
||||
|
||||
file_key: str = Field(..., description="Storage key of the input file")
|
||||
out_folder: str = Field(..., description="Output folder for processed file")
|
||||
project_id: UUID | None = Field(default=None, description="Associated project ID")
|
||||
output_name: str | None = Field(
|
||||
default=None, description="Display name for the output file"
|
||||
)
|
||||
cuts: list[dict] = Field(
|
||||
..., description="Cut regions: [{'start_ms': int, 'end_ms': int}, ...]"
|
||||
)
|
||||
|
||||
|
||||
class MediaConvertRequest(Schema):
|
||||
"""Request to convert media file to different format."""
|
||||
|
||||
@@ -75,6 +105,16 @@ class CaptionsGenerateRequest(Schema):
|
||||
project_id: UUID | None = Field(default=None, description="Associated project ID")
|
||||
|
||||
|
||||
class FrameExtractRequest(Schema):
|
||||
"""Request to extract video frames for timeline thumbnails."""
|
||||
|
||||
file_key: str = Field(..., description="S3 key of the video file")
|
||||
project_id: UUID | None = Field(default=None, description="Associated project ID")
|
||||
regenerate: bool = Field(
|
||||
default=False, description="Delete existing frames and re-extract"
|
||||
)
|
||||
|
||||
|
||||
# --- Response schemas ---
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user