Aggiunge overlay server-side burn-in e stabilizza diretta live.

Tabellone, badge e brand sono ricodificati nel flusso _air via OverlayRelay;
sync punteggio HTTP, volume condiviso rails/sidekiq, qualità 720p migliorata
e badge CONNECTING in ripresa da pausa.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-03 23:55:17 +02:00
parent fd225fbadd
commit ab9cb02083
58 changed files with 2423 additions and 242 deletions

View File

@@ -64,8 +64,11 @@ module Recordings
@merged_temp_path = File.join(Dir.tmpdir, "replay-#{@session.id}-#{SecureRandom.hex(4)}.mp4")
list_path = "#{@merged_temp_path}.txt"
File.write(list_path, source_files.map { |f| "file '#{f.gsub("'", "'\\''")}'" }.join("\n"))
success = system("ffmpeg", "-y", "-f", "concat", "-safe", "0", "-i", list_path, "-c", "copy", @merged_temp_path,
out: File::NULL, err: File::NULL)
success = system(
"ffmpeg", "-y", "-f", "concat", "-safe", "0", "-i", list_path,
"-c", "copy", "-movflags", "+faststart", @merged_temp_path,
out: File::NULL, err: File::NULL
)
FileUtils.rm_f(list_path)
raise Error, "Impossibile unire i segmenti video" unless success && File.exist?(@merged_temp_path)