Initial commit: LiveStream Platform
Backend: FastAPI + SQLAlchemy + SQLite Frontend: React + Vite + Ant Design (serif Anthropic theme) Media server: MediaMTX with edge node support Load balancing: round-robin / weighted / least-conn Multicast detection with automatic fallback Transcoding support via FFmpeg (configurable quality) hls.js player with line & quality switching Admin panel with password auth Windows compatible scripts
This commit is contained in:
commit
2e4594fa77
43 files changed
+2196
No files matched your search
@@ -0,0 +1,37 @@
|
||||
from pydantic_settings import BaseSettings
|
||||
from typing import Literal
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
database_url: str = "sqlite+aiosqlite:///./data.db"
|
||||
admin_password: str = "admin123"
|
||||
|
||||
media_origin_host: str = "127.0.0.1"
|
||||
media_origin_rtmp_port: int = 1935
|
||||
media_origin_api_port: int = 9997
|
||||
media_origin_hls_port: int = 8888
|
||||
|
||||
edge_nodes: list[dict] = [
|
||||
{"id": "edge-1", "name": "Edge Node 1", "host": "127.0.0.1",
|
||||
"hls_port": 8889, "api_port": 9998, "weight": 100, "enabled": True},
|
||||
{"id": "edge-2", "name": "Edge Node 2", "host": "127.0.0.1",
|
||||
"hls_port": 8890, "api_port": 9999, "weight": 50, "enabled": True},
|
||||
]
|
||||
|
||||
load_balance_strategy: Literal["round-robin", "weighted", "least-conn"] = "weighted"
|
||||
|
||||
qualities: list[dict] = [
|
||||
{"label": "1080p", "width": 1920, "height": 1080, "bitrate": "5000k"},
|
||||
{"label": "720p", "width": 1280, "height": 720, "bitrate": "2500k"},
|
||||
{"label": "480p", "width": 854, "height": 480, "bitrate": "1000k"},
|
||||
{"label": "360p", "width": 640, "height": 360, "bitrate": "600k"},
|
||||
]
|
||||
|
||||
multicast_enabled: bool = True
|
||||
multicast_address_base: str = "239.0.0.1"
|
||||
multicast_port_base: int = 5000
|
||||
|
||||
model_config = {"env_prefix": "LS_"}
|
||||
|
||||
|
||||
settings = Settings()
|
||||
Reference in new issue
Block a user