# Larger UDP socket buffers for clean 4K/5K streaming. # # A single high-resolution frame is a burst (a 5120×1440 keyframe is ~130 packets sent at once), # which overflows the Linux default (~208 KB) — dropping packets and, under infinite-GOP, freezing # the client decode on one frame. punktfunk requests 8 MB SO_SNDBUF/SO_RCVBUF, but the kernel # clamps to these caps; raise them on the HOST for send-side headroom (the host logs a warning # when the grant is small). macOS clients need no tuning (their default cap is already multi-MB). # # Install: sudo cp scripts/99-punktfunk-net.conf /etc/sysctl.d/ && sudo sysctl --system net.core.wmem_max = 8388608 net.core.rmem_max = 8388608