From 561122b07cdca55325cf0a2ff83795fbe44b480a Mon Sep 17 00:00:00 2001 From: Miles Alan Date: Sun, 30 Aug 2020 14:31:06 -0500 Subject: [PATCH] sxmo_camera.sh: Set cache-secs and demuxer-readahead-secs to 0 to prevent lag Stops camera stream in mpv from falling behind --- scripts/core/sxmo_camera.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/core/sxmo_camera.sh b/scripts/core/sxmo_camera.sh index ad0bb63..3ff777a 100755 --- a/scripts/core/sxmo_camera.sh +++ b/scripts/core/sxmo_camera.sh @@ -41,6 +41,7 @@ startmpv() { # in mpv; but this is simpler and more reliable for now. ffmpeg -re -fflags nobuffer -f v4l2 -video_size $RES -i /dev/video1 -f rawvideo - | mpv \ + --cache-secs=0 --demuxer-readahead-secs=0 \ --demuxer-rawvideo-w=$WIDTH --demuxer-rawvideo-h=$HEIGHT \ --untimed --vo=xv --cache-pause=no --no-demuxer-thread \ --profile=low-latency --demuxer=rawvideo -vf transpose=$TRANSPOSE \