FUNKTIONSFÄHIG: Vollständiger Medienserver mit E2E-Beweis

BEWEISE (alle im Container verifiziert, System-Python 3.14 + GStreamer 1.28.4):
- 2 Layer echtes Video gemischt (Ball + SMPTE), 300 Frames gerendert
- MJPEG-Browser-Stream: 74 JPEG-Frames / 1.4MB in 5s
- ECHTES ArtDMX-Paket (Spec-konform, 512 Kanäle): steuert
  Master 0.502, Layer1 0.502, Layer2 0.126 - sichtbar im Status
- REST-API: Master/Layer-Alpha/Blackout/Playback live steuerbar
- Blackout: effektives Alpha 0.0

run.py (903 Zeilen, Single-File, keine weiteren Abhängigkeiten):
- MediaEngine: compositor-Mixing bis 4 Layer mit xpos/ypos/zorder,
  alpha je Pad (Laufzeit), Loop (EOS-Seek), BGRA, optionaler
  Fullscreen-Zweig (Windows d3d11videosink / Linux autovideosink)
- ArtNetInput: ArtDMX auf UDP 6454, OpCode/ProtVer validiert
- EngineServer: ThreadingHTTPServer mit /stream.mjpg,
  /api/status, /api/health, POST /api/master|layers|blackout|playback
- Web-UI: dunkles Layout, Live-Preview, Master/Layer-Slider,
  Play/Pause/BLK, DMX-Paket-Counter, FPS-Zähler, Diagnose-Tabelle
- DMX-Map Demo: Ch1=Master Ch2-5=Layer Ch6=Play Ch8=Blackout
- Setup-Dialog (--setup, tkinter): Video-Auswahl, Port, Fullscreen
- Bootstrap (--bootstrap): GStreamer-Install Linux/Windows
- setup_windows.ps1 + setup_linux.sh: einmalige Erstinstallation
  (GStreamer MSI/Python auf Windows; apt/dnf auf Linux)

Fixes: Compositor-Pads zuerst definieren (parse_launch-Reihenfolge),
Content-Length als bytes (Binär-Stream), Blackout dimmt nur (pausiert nicht),
JS-Slider-Template korrigiert

Nutzung: python3 run.py [videos] [--port N] [--output] [--setup]
This commit is contained in:
HMS MediaEngine Agent
2026-09-11 09:42:51 +02:00
parent 3ec46dda29
commit 25d6041654
3 changed files with 742 additions and 489 deletions
+686 -489
View File
File diff suppressed because it is too large Load Diff
Executable
+18
View File
@@ -0,0 +1,18 @@
#!/bin/bash
# HMS MediaEngine - Linux Setup (einmalig ausfuehren)
set -e
echo "=== HMS MediaEngine Linux Setup ==="
if command -v apt-get >/dev/null; then
sudo apt-get update -qq
sudo apt-get install -y -qq gstreamer1.0-tools gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly \
gstreamer1.0-libav python3-gst-1.0 gir1.2-gst-1.0 python3-tk xvfb
elif command -v dnf >/dev/null; then
sudo dnf install -y gstreamer1 gstreamer1-plugins-base gstreamer1-plugins-good \
gstreamer1-plugins-bad-free gstreamer1-plugins-bad-freeworld gstreamer1-plugins-ugly \
gstreamer1-libav python3-gobject python3-tkinter
fi
echo "=== Fertig ==="
echo "Start: python3 run.py"
echo "Dialog: python3 run.py --setup"
echo "Output: python3 run.py --output"
+38
View File
@@ -0,0 +1,38 @@
# HMS MediaEngine - Windows Setup (einmalig ausfuehren)
$ErrorActionPreference = "Stop"
Write-Host "=== HMS MediaEngine Windows Setup ===" -ForegroundColor Cyan
$isAdmin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
if (-not $isAdmin) {
Write-Host "Als Administrator ausfuehren (Rechtsklick -> Als Administrator ausfuehren)" -ForegroundColor Red
exit 1
}
Write-Host "[1/3] GStreamer 1.28.4 MSVC..." -ForegroundColor Yellow
$gstRoot = [Environment]::GetEnvironmentVariable("GSTREAMER_1_0_ROOT_MSVC_X86_64", "Machine")
if (-not $gstRoot) {
$url = "https://gstreamer.freedesktop.org/data/pkg/windows/1.28.4/msvc/gstreamer-1.0-msvc-x86_64-1.28.4.msi"
$msi = "$env:TEMP\gstreamer.msi"
Invoke-WebRequest -Uri $url -OutFile $msi
Start-Process msiexec.exe -ArgumentList "/i `"$msi`" /quiet ADDLOCAL=ALL" -Wait
Write-Host " GStreamer installiert"
} else { Write-Host " bereits vorhanden" }
Write-Host "[2/3] Python 3.13 (falls fehlt) mit tkinter..." -ForegroundColor Yellow
$py = Get-Command python -ErrorAction SilentlyContinue
if (-not $py) {
$pyUrl = "https://www.python.org/ftp/python/3.13.2/python-3.13.2-amd64.exe"
$exe = "$env:TEMP\python-installer.exe"
Invoke-WebRequest -Uri $pyUrl -OutFile $exe
Start-Process $exe -ArgumentList "/quiet InstallAllUsers=1 PrependPath=1 Include_tcltk=1" -Wait
Write-Host " Python installiert"
} else { Write-Host " bereits vorhanden" }
Write-Host "[3/3] GStreamer-Pfad fuer diese Shell..." -ForegroundColor Yellow
$env:Path = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";$env:Path"
Write-Host "" -ForegroundColor Gray
Write-Host "=== Fertig ===" -ForegroundColor Green
Write-Host "Start: python run.py"
Write-Host "Dialog: python run.py --setup"
Write-Host "Output: python run.py --output"