Fix freeze YouTube al cambio punteggio: PNG atomica e relay stabile

rsvg scrive su .tmp poi rename; il feeder ignora PNG parziali.
YouTube relay: no doppio avvio, reconnect RTMP; overlay restart solo dopo 3 miss.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-04 09:07:06 +02:00
parent fde1213ca5
commit 4c7be615f1
4 changed files with 31 additions and 4 deletions

View File

@@ -37,10 +37,12 @@ module Streams
end
def render_png!(svg_path, png_path)
unless system("rsvg-convert", "-w", "1280", "-h", "720", "-o", png_path.to_s, svg_path.to_s, out: File::NULL, err: File::NULL)
tmp = "#{png_path}.tmp"
unless system("rsvg-convert", "-w", "1280", "-h", "720", "-o", tmp, svg_path.to_s, out: File::NULL, err: File::NULL)
raise Error, "rsvg-convert fallito per session #{@session.id}"
end
File.rename(tmp, png_path)
FileUtils.touch(png_path)
end
end