improved livedelay
This commit is contained in:
@@ -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(),
|
||||
|
||||
@@ -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",
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user