Fix overlay service to check for correct stream paths (court instead of court_main)
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 22s
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 22s
This commit is contained in:
@@ -89,7 +89,8 @@ class ScoreOverlayService:
|
|||||||
if resp.status == 200:
|
if resp.status == 200:
|
||||||
data = await resp.json()
|
data = await resp.json()
|
||||||
paths = data.get('items', [])
|
paths = data.get('items', [])
|
||||||
return any(p.get('name') == 'court_main' for p in paths)
|
# Check if either court or court_h264 path exists (we're transcoding)
|
||||||
|
return any(p.get('name') in ['court', 'court_h264'] for p in paths)
|
||||||
return False
|
return False
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"Failed to check stream health: {e}")
|
logger.error(f"Failed to check stream health: {e}")
|
||||||
@@ -129,7 +130,7 @@ class ScoreOverlayService:
|
|||||||
cmd = [
|
cmd = [
|
||||||
'ffmpeg',
|
'ffmpeg',
|
||||||
'-y',
|
'-y',
|
||||||
'-i', 'rtsp://localhost:8554/court_main',
|
'-i', 'rtsp://localhost:8554/court',
|
||||||
'-vf', f"drawtext=fontfile=/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf:"
|
'-vf', f"drawtext=fontfile=/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf:"
|
||||||
f"text='{score_text}':fontcolor=white:fontsize=30:"
|
f"text='{score_text}':fontcolor=white:fontsize=30:"
|
||||||
f"box=1:boxcolor=black@0.5:boxborderw=5:x=10:y=10:"
|
f"box=1:boxcolor=black@0.5:boxborderw=5:x=10:y=10:"
|
||||||
|
Reference in New Issue
Block a user