# Larger UDP socket buffers for clean 4K/5K — and 1 Gbps+ — streaming.
#
# A single high-resolution frame is a burst (a 5120×1440 keyframe is ~130 packets sent at once; a
# 1 Gbps IDR is several thousand), which overflows the Linux default (~208 KB) — dropping packets
# and, under infinite-GOP, freezing the client decode on one frame. punktfunk requests 32 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, and counts send-buffer drops as
# `packets_send_dropped`). 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 = 33554432
net.core.rmem_max = 33554432
