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:
admin committed 2026-08-07 15:02:07 +08:00
commit 2e4594fa77
43 files changed
+2196

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
@echo off
echo Checking multicast reachability...
echo Sending multicast ping to 239.0.0.1:9999
powershell -Command "
try {
$udp = New-Object System.Net.Sockets.UdpClient
$udp.Client.SetSocketOption('IP', 'MulticastTimeToLive', 1)
$udp.Client.Bind((New-Object System.Net.IPEndPoint([System.Net.IPAddress]::Any, 0)))
$udp.JoinMulticastGroup([System.Net.IPAddress]'239.0.0.1')
$bytes = [System.Text.Encoding]::ASCII.GetBytes('ping')
$udp.Send($bytes, $bytes.Length, '239.0.0.1', 9999)
Start-Sleep -Milliseconds 200
if ($udp.Available -gt 0) {
Write-Host 'MULTICAST OK: Response received'
} else {
Write-Host 'MULTICAST OK: Sent successfully (no listener, but network supports it)'
}
$udp.Close()
} catch {
Write-Host 'MULTICAST FAILED: Network may not support multicast'
}
"
+23
View File
@@ -0,0 +1,23 @@
@echo off
if "%1"=="" (
echo Usage: start_edge.bat ^<port_suffix^> ^<origin_host^>
echo Example: start_edge.bat 1 127.0.0.1
exit /b 1
)
set SUFFIX=%1
set ORIGIN=%2
if "%ORIGIN%"=="" set ORIGIN=127.0.0.1
set /a HLS_PORT=8888 + %SUFFIX%
set /a API_PORT=9997 + %SUFFIX%
echo Starting Edge Node %SUFFIX%...
echo HLS: %HLS_PORT%
echo API: %API_PORT%
echo Pull from origin: %ORIGIN%
type edge_template.yml > edge%SUFFIX%.yml
echo. >> edge%SUFFIX%.yml
mediamtx edge%SUFFIX%.yml
+3
View File
@@ -0,0 +1,3 @@
@echo off
echo Starting MediaMTX Origin Node...
mediamtx mediamtx.yml