diff --git a/internal/conf/conf.go b/internal/conf/conf.go index 9e554f25..31099e9d 100644 --- a/internal/conf/conf.go +++ b/internal/conf/conf.go @@ -417,7 +417,7 @@ func (conf *Conf) setDefaults() { conf.ReadTimeout = 10 * Duration(time.Second) conf.WriteTimeout = 10 * Duration(time.Second) conf.WriteQueueSize = 512 - conf.UDPMaxPayloadSize = 1472 + conf.UDPMaxPayloadSize = 1452 // Authentication conf.AuthMethod = AuthMethodInternal diff --git a/mediamtx.yml b/mediamtx.yml index 986ab479..4135804f 100644 --- a/mediamtx.yml +++ b/mediamtx.yml @@ -24,9 +24,10 @@ writeTimeout: 10s # Size of the queue of outgoing packets. # A higher value allows to increase throughput, a lower value allows to save RAM. writeQueueSize: 512 -# Maximum size of outgoing UDP packets. -# This can be decreased to avoid fragmentation on networks with a low UDP MTU. -udpMaxPayloadSize: 1472 +# Maximum size of outgoing UDP payloads. +# It defaults to the maximum packet size on ethernet (1500) minus IPv6 and UDP headers (48). +# This can be decreased to avoid fragmentation on networks with a low MTU. +udpMaxPayloadSize: 1452 # Size of the read buffer of every UDP socket. # This can be increased to decrease packet losses. # It defaults to the default value of the operating system.