Fix overlay _air: probesize su intake RTMP e rilevamento zombie

Senza analyzeduration/probesize l'overlay non pubblicava su _air;
YouTube restava in attesa. Esclusi processi ffmpeg zombie da running?.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-04 09:39:11 +02:00
parent 10fff7ffcb
commit 61bb22ce44
3 changed files with 10 additions and 3 deletions

View File

@@ -30,6 +30,7 @@ module Streams
ffmpeg_pid = Process.spawn(
"ffmpeg", "-nostdin", "-hide_banner", "-loglevel", "warning",
"-fflags", "+genpts+discardcorrupt",
"-analyzeduration", "10000000", "-probesize", "10000000",
"-rw_timeout", "15000000",
"-i", intake,
"-f", "image2pipe", "-framerate", overlay_fps.to_s, "-i", pipe.to_s,
@@ -193,9 +194,12 @@ module Streams
end
def process_alive?(pid)
stat = File.read("/proc/#{pid.to_i}/stat")
return false if stat.split[2] == "Z"
Process.kill(0, pid.to_i)
true
rescue Errno::ESRCH, Errno::EPERM
rescue Errno::ESRCH, Errno::EPERM, Errno::ENOENT
false
end

View File

@@ -129,9 +129,12 @@ module Streams
end
def process_alive?(pid)
stat = File.read("/proc/#{pid.to_i}/stat")
return false if stat.split[2] == "Z"
Process.kill(0, pid.to_i)
true
rescue Errno::ESRCH, Errno::EPERM
rescue Errno::ESRCH, Errno::EPERM, Errno::ENOENT
false
end