diff --git a/src/host/wayland.rs b/src/host/wayland.rs index 7d17677..92a9986 100644 --- a/src/host/wayland.rs +++ b/src/host/wayland.rs @@ -132,12 +132,18 @@ pub async fn start(opts: &HostOpts) -> Result { "!", "fdsink", "fd=1", - // video branch + // video branch — videorate caps to 30fps so we don't ship at the + // monitor's refresh rate (e.g. 180Hz) and pile up frames in mpv's + // demuxer queue faster than realtime. "pipewiresrc", &format!("fd={raw_fd}"), &format!("path={node_id}"), "do-timestamp=true", "!", + "videorate", + "!", + &format!("video/x-raw,framerate={}/1", opts.framerate), + "!", "queue", "!", "videoconvert", diff --git a/src/viewer/mod.rs b/src/viewer/mod.rs index bfb931f..2452c88 100644 --- a/src/viewer/mod.rs +++ b/src/viewer/mod.rs @@ -46,7 +46,9 @@ fn print_viewer_banner(port: u16) { eprintln!("┌─ PixelPass · viewer ───────────────────────────────────────"); eprintln!("│ Connected to host. Open the stream in your player:"); eprintln!("│"); - eprintln!("│ mpv --profile=low-latency --untimed {url}"); + eprintln!( + "│ mpv --profile=low-latency --untimed --audio-buffer=0.2 --demuxer-max-bytes=2M --demuxer-readahead-secs=0.5 {url}" + ); eprintln!("│ vlc --network-caching=200 --live-caching=200 {url}"); eprintln!("│"); eprintln!("│ Press Ctrl+C to disconnect.");