improved livedelay

This commit is contained in:
2026-04-10 02:56:04 -03:00
parent d83576a3ba
commit e2ca18d120
3 changed files with 10 additions and 3 deletions

View File

@@ -158,7 +158,7 @@ fn spawn_ffmpeg(cfg: &SubprocessConfig) -> Result<Child> {
"-init_hw_device".into(), format!("drm=drm:{}", cfg.device),
"-init_hw_device".into(), "vaapi=va@drm".into(),
// Video input (kmsgrab)
"-thread_queue_size".into(), "64".into(),
"-thread_queue_size".into(), "512".into(),
"-device".into(), cfg.device.clone(),
"-f".into(), "kmsgrab".into(),
"-framerate".into(), cfg.fps.to_string(),

View File

@@ -63,6 +63,8 @@ impl Session {
let mut child = Command::new("ffmpeg")
.args([
"-fflags", "nobuffer",
"-flags", "low_delay",
"-f", "h264",
"-framerate", &fps.to_string(),
"-i", "pipe:0",
@@ -75,6 +77,7 @@ impl Session {
// UDP relay for live display
"-c:v", "copy",
"-f", "mpegts",
"-flush_packets", "1",
RELAY_URL,
"-hide_banner", "-loglevel", "warning",
])