Fix Process.spawn: redirect log ffmpeg fuori dallo splat
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -21,7 +21,8 @@ module Streams
|
|||||||
|
|
||||||
# YouTube richiede FLV H.264/AAC stabili; -c copy lascia spesso streamStatus=inactive.
|
# YouTube richiede FLV H.264/AAC stabili; -c copy lascia spesso streamStatus=inactive.
|
||||||
pid = Process.spawn(
|
pid = Process.spawn(
|
||||||
*youtube_ffmpeg_args(intake, output, log_path),
|
*youtube_ffmpeg_args(intake, output),
|
||||||
|
%i[out err] => log_path,
|
||||||
pgroup: true
|
pgroup: true
|
||||||
)
|
)
|
||||||
Process.detach(pid)
|
Process.detach(pid)
|
||||||
@@ -70,7 +71,7 @@ module Streams
|
|||||||
|
|
||||||
# Non usare ffprobe su RTMP live: si blocca e impedisce l'avvio del relay (Sidekiq in hang).
|
# Non usare ffprobe su RTMP live: si blocca e impedisce l'avvio del relay (Sidekiq in hang).
|
||||||
# Audio: traccia AAC da anullsrc (YouTube la richiede); il mic del telefono resta su _air/HLS.
|
# Audio: traccia AAC da anullsrc (YouTube la richiede); il mic del telefono resta su _air/HLS.
|
||||||
def youtube_ffmpeg_args(intake, output, log_path)
|
def youtube_ffmpeg_args(intake, output)
|
||||||
[
|
[
|
||||||
"ffmpeg", "-nostdin", "-hide_banner", "-loglevel", "warning",
|
"ffmpeg", "-nostdin", "-hide_banner", "-loglevel", "warning",
|
||||||
"-fflags", "+genpts+discardcorrupt", "-use_wallclock_as_timestamps", "1",
|
"-fflags", "+genpts+discardcorrupt", "-use_wallclock_as_timestamps", "1",
|
||||||
@@ -82,8 +83,7 @@ module Streams
|
|||||||
"-pix_fmt", "yuv420p", "-r", "30", "-g", "30", "-keyint_min", "30", "-sc_threshold", "0",
|
"-pix_fmt", "yuv420p", "-r", "30", "-g", "30", "-keyint_min", "30", "-sc_threshold", "0",
|
||||||
"-b:v", "4000k", "-maxrate", "4000k", "-bufsize", "8000k",
|
"-b:v", "4000k", "-maxrate", "4000k", "-bufsize", "8000k",
|
||||||
"-c:a", "aac", "-b:a", "128k", "-ar", "48000", "-ac", "1",
|
"-c:a", "aac", "-b:a", "128k", "-ar", "48000", "-ac", "1",
|
||||||
"-f", "flv", output,
|
"-f", "flv", output
|
||||||
%i[out err] => log_path
|
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user