fix: bitrate field should be str not int (accepts values like 185M)

This commit is contained in:
Zac Gaetano 2026-04-14 11:25:46 -04:00
parent d9391980f6
commit f9f29855b9

View file

@ -27,10 +27,10 @@ class RecorderConfig(BaseModel):
port_index: int = Field(..., description="Index of the recorder port (0-based)")
codec: CodecType = Field(..., description="Selected codec for recording")
bitrate: int = Field(..., description="Target bitrate in Mbps")
bitrate: str = Field(default="185M", description="Target bitrate (e.g. 185M, 50M)")
quality_profile: str = Field(
...,
description="Quality profile name (high, medium, low)"
default="hq",
description="Quality profile name (hq, mq, lq)"
)
recording_path: str = Field(
...,
@ -39,11 +39,9 @@ class RecorderConfig(BaseModel):
srt_enabled: bool = Field(
default=False, description="Enable SRT streaming output"
)
# Legacy single destination (kept for backwards compat)
srt_destination: Optional[str] = Field(
default=None, description="SRT destination address (host:port) — use srt_destinations for multi"
default=None, description="SRT destination address — use srt_destinations for multi"
)
# Multi-destination
srt_destinations: List[SRTDestination] = Field(
default_factory=list, description="List of SRT output destinations"
)
@ -73,27 +71,11 @@ class SCTE35Marker(BaseModel):
"""SCTE-35/SCTE-104 advertisement marker"""
model_config = ConfigDict(use_enum_values=False)
event_id: str = Field(
..., description="Unique identifier for this ad break event"
)
duration_seconds: int = Field(
..., description="Duration of the ad break in seconds"
)
out_of_network: bool = Field(
..., description="Whether this is an out-of-network ad"
)
splice_immediate: bool = Field(
..., description="Whether splice should happen immediately"
)
timestamp: datetime = Field(
..., description="Timestamp when marker was created/triggered"
)
webhook_url: Optional[str] = Field(
default=None, description="Webhook URL to notify on ad break"
)
port_index: Optional[int] = Field(
default=None, description="Port index this marker was injected on (None = global)"
)
srt_destination_url: Optional[str] = Field(
default=None, description="Specific SRT destination URL this marker targets (None = all)"
)
event_id: str = Field(..., description="Unique identifier for this ad break event")
duration_seconds: int = Field(..., description="Duration of the ad break in seconds")
out_of_network: bool = Field(..., description="Whether this is an out-of-network ad")
splice_immediate: bool = Field(..., description="Whether splice should happen immediately")
timestamp: datetime = Field(..., description="Timestamp when marker was created/triggered")
webhook_url: Optional[str] = Field(default=None, description="Webhook URL to notify on ad break")
port_index: Optional[int] = Field(default=None, description="Port index (None = global)")
srt_destination_url: Optional[str] = Field(default=None, description="Target SRT destination (None = all)")