consisten one behind
This commit is contained in:
@@ -97,13 +97,13 @@ def receive_record_relay_and_detect(stream_url, output_path, relay_url,
|
||||
)
|
||||
|
||||
# Scene detection: CUDA decode (GPU) → select filter (CPU, lightweight)
|
||||
# → showinfo → MJPEG piped to stdout (avoids image2 muxer one-frame buffer)
|
||||
# → showinfo → MJPEG piped to stdout
|
||||
select_expr = f"gt(scene,{scene_threshold})"
|
||||
scene_stream = stream.filter("select", select_expr).filter("showinfo")
|
||||
scene_out = ffmpeg.output(
|
||||
scene_stream, "pipe:1",
|
||||
f="image2pipe", vcodec="mjpeg",
|
||||
vsync="vfr", flush_packets=1, **{"q:v": "2"},
|
||||
flush_packets=1, **{"q:v": "2", "fps_mode": "passthrough"},
|
||||
)
|
||||
|
||||
return ffmpeg.merge_outputs(file_out, relay_out, scene_out).global_args(*GLOBAL_ARGS)
|
||||
|
||||
Reference in New Issue
Block a user