Files
livekit/go.mod
T
Raja SubramanianandClaude Fable 5.2 5ee9dd8da1 sfu: tighten RTP stats restart detection and RTCP report handling (#5220)
* sfu: tighten RTP stats restart detection and RTCP report handling

- A stream restart is a forward-moving run of rejected packets that
  lasts 1 s with no accepted packet, not 5 rejected packets.
- Receiver reports with a wrong cycle count are aligned to the highest
  sent sequence number and no longer dropped as runaway.
- No sender report is sent while publisher sender reports advance at
  less than half or more than twice the clock rate.
- Fold repeated drop and logging blocks into helpers and remove
  unreachable branches.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* sfu: use only the low 16 bits of the receiver report sequence number

Cycle correction could move a report before the start, underflow the
saved highest and block every later report. Map the report to the
latest matching sequence number at or before the highest sent, and
drop the misalignment bookkeeping.

A publisher sender report time stamp that does not advance is now
treated as an off clock rate, not as unmeasured.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* sfu: bound the receiver report distance and key the unchanged check on the accepted report

A report ahead of the highest sent mapped into the previous cycle once
the stream was longer than one cycle. A report must now be within half
a cycle behind the highest sent.

A repeated stale report matched the last received report, not the last
accepted one, and replaced newer loss and jitter values.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* Bump mediatransportutil for the OWD estimator fix

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* sfu: log the source stream generation in packetMeta

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* rtpstats: address review comments from Jules

Addresses only the comments from Jules (jtestard) on #5220.

Restart detection
- a reordered or duplicate packet of a run does not reset the run
- padding moves a run forward in sequence number and does not count
- only a packet with payload ends a run, a skipped sequence number does not
- comments on false positives and on the minimum run duration

Publisher clock rate
- measure only across publisher reports at least 1 s apart
- an older publisher report starts a new measurement
- comment on why Seed does not copy the measurement
- drop the reportTime log field, it repeats the report time

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* rtpstats: test publisher clock rate across sources with different timestamp bases

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* rtpstats: address review comments from Anunay

Addresses the comments from Anunay (anunaym14) on #5220.

- skip a sender report only when the publisher rate is low, a pair of
  publisher reports across an unmute reads high and the report is correct
- comment on why a declared restart run is final

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* rtpstats: comment on why a high publisher clock rate is not skipped

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-17 21:52:32 +05:30

176 lines
7.3 KiB
AMPL

module github.com/livekit/livekit-server
go 1.26.0
require (
github.com/bep/debounce v1.2.1
github.com/d5/tengo/v2 v2.17.0
github.com/dennwc/iters v1.2.2
github.com/dustin/go-humanize v1.1.0
github.com/elliotchance/orderedmap/v3 v3.1.1
github.com/florianl/go-tc v0.4.8
github.com/frostbyte73/core v0.1.1
github.com/gammazero/deque v1.2.3
github.com/gammazero/workerpool v1.2.1
github.com/google/uuid v1.6.0
github.com/google/wire v0.7.0
github.com/gorilla/websocket v1.5.3
github.com/hashicorp/go-version v1.9.0
github.com/hashicorp/golang-lru/v2 v2.0.7
github.com/jellydator/ttlcache/v3 v3.4.1
github.com/jxskiss/base62 v1.1.0
github.com/livekit/mageutil v0.0.0-20250511045019-0f1ff63f7731
github.com/livekit/mediatransportutil v0.0.0-20261116220501-6af81419a977
github.com/livekit/protocol v1.54.1-0.20261113191342-ebef16fe6043
github.com/livekit/psrpc v0.8.2
github.com/mackerelio/go-osstat v0.2.8
github.com/magefile/mage v1.17.2
github.com/mitchellh/go-homedir v1.1.0
github.com/moby/moby/client v0.6.1
github.com/olekukonko/tablewriter v1.1.5
github.com/ory/dockertest/v4 v4.0.0
github.com/pion/datachannel v1.6.4
github.com/pion/dtls/v4 v4.0.0-rc.8
github.com/pion/ice/v4 v4.4.8
github.com/pion/interceptor v0.1.51
github.com/pion/rtcp v1.2.20
github.com/pion/rtp v1.10.6
github.com/pion/sctp v1.12.1
github.com/pion/sdp/v3 v3.0.20
github.com/pion/stun/v4 v4.0.1
github.com/pion/transport/v4 v4.1.3
github.com/pion/transport/v5 v5.1.5
github.com/pion/turn/v5 v5.1.3
github.com/pion/webrtc/v4 v4.2.26
github.com/pires/go-proxyproto v0.15.0
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.25.0
github.com/quic-go/quic-go v0.64.1
github.com/quic-go/webtransport-go v0.13.0
github.com/redis/go-redis/v9 v9.23.0
github.com/rs/cors v1.11.1
github.com/stretchr/testify v1.12.1
github.com/thoas/go-funk v0.9.3
github.com/tomnomnom/linkheader v0.0.0-20250811210735-e5fe3b51442e
github.com/twitchtv/twirp v8.1.3+incompatible
github.com/ua-parser/uap-go v0.0.0-20261028195011-4cb30e998c4c
github.com/urfave/negroni/v3 v3.1.1
go.uber.org/atomic v1.12.0
go.uber.org/multierr v1.11.0
go.uber.org/zap v1.28.0
golang.org/x/mod v0.43.0
golang.org/x/sync v0.25.0
google.golang.org/protobuf v1.36.12
gopkg.in/yaml.v3 v3.0.1
)
require (
cel.dev/cel-go v0.33.2 // indirect
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
github.com/cilium/ebpf v0.22.0 // indirect
github.com/clipperhouse/displaywidth v0.11.0 // indirect
github.com/clipperhouse/uax29/v2 v2.7.0 // indirect
github.com/containerd/errdefs v1.0.0 // indirect
github.com/containerd/errdefs/pkg v0.3.0 // indirect
github.com/distribution/reference v0.6.0 // indirect
github.com/dunglas/httpsfv v1.1.1 // indirect
github.com/fatih/color v1.19.0 // indirect
github.com/felixge/httpsnoop v1.1.0 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/goccy/go-json v0.10.6 // indirect
github.com/golang-jwt/jwt/v5 v5.3.1 // indirect
github.com/gotesttools/gotestfmt/v2 v2.5.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0 // indirect
github.com/mattn/go-colorable v0.1.15 // indirect
github.com/mattn/go-isatty v0.0.22 // indirect
github.com/maxbrunsfeld/counterfeiter/v6 v6.14.0 // indirect
github.com/moby/moby/api v1.56.1 // indirect
github.com/nyaruka/phonenumbers v1.8.1 // indirect
github.com/olekukonko/cat v0.0.0-20250911104152-50322a0618f6 // indirect
github.com/olekukonko/errors v1.3.0 // indirect
github.com/olekukonko/ll v0.1.8 // indirect
github.com/pandatix/go-abnf v0.5.5 // indirect
github.com/petermattis/goid v0.0.0-20261109124353-7cfa343ad0ab // indirect
github.com/pion/dtls/v3 v3.1.15 // indirect
github.com/puzpuzpuz/xsync/v4 v4.5.0 // indirect
github.com/quic-go/qpack v0.6.0 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.70.0 // indirect
go.opentelemetry.io/otel v1.47.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.46.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.46.0 // indirect
go.opentelemetry.io/otel/log v1.47.0 // indirect
go.opentelemetry.io/otel/metric v1.47.0 // indirect
go.opentelemetry.io/otel/sdk v1.47.0 // indirect
go.opentelemetry.io/otel/trace v1.47.0 // indirect
go.opentelemetry.io/proto/otlp v1.11.0 // indirect
go.yaml.in/yaml/v3 v3.0.6 // indirect
golang.org/x/exp v0.0.0-20261109185158-a52e3aef5920 // indirect
golang.org/x/telemetry v0.0.0-20261009151841-97e8ea77aa2a // indirect
golang.org/x/time v0.16.0 // indirect
)
require (
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.12-20260825204119-511051f7f437.2 // indirect
buf.build/go/protovalidate v1.4.0 // indirect
buf.build/go/protoyaml v0.8.0 // indirect
cel.dev/expr v0.26.0 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/antlr4-go/antlr/v4 v4.13.1 // indirect
github.com/benbjohnson/clock v1.3.5 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/docker/go-connections v0.8.1 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/fsnotify/fsnotify v1.10.1 // indirect
github.com/go-logr/logr v1.4.4 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/subcommands v1.2.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-retryablehttp v0.7.8 // indirect
github.com/hashicorp/golang-lru v1.0.2 // indirect
github.com/josharian/native v1.1.0 // indirect
github.com/klauspost/compress v1.20.4 // indirect
github.com/klauspost/cpuid/v2 v2.4.2 // indirect
github.com/lithammer/shortuuid/v4 v4.3.0 // indirect
github.com/mattn/go-runewidth v0.0.24 // indirect
github.com/mdlayher/netlink v1.11.2 // indirect
github.com/mdlayher/socket v0.6.1 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.1 // indirect
github.com/pion/logging v0.2.4
github.com/pion/mdns/v2 v2.2.2 // indirect
github.com/pion/randutil v0.1.0 // indirect
github.com/pion/srtp/v3 v3.1.3 // indirect
github.com/pion/stun/v3 v3.1.7 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_model v0.6.3
github.com/prometheus/common v0.73.1 // indirect
github.com/prometheus/procfs v0.23.0 // indirect
github.com/urfave/cli/v3 v3.14.0
github.com/wlynxg/anet v0.0.5 // indirect
github.com/zeebo/xxh3 v1.1.0 // indirect
go.uber.org/zap/exp v0.3.0 // indirect
golang.org/x/crypto v0.58.0 // indirect
golang.org/x/net v0.62.0
golang.org/x/sys v0.50.0 // indirect
golang.org/x/text v0.44.0 // indirect
golang.org/x/tools v0.52.1-0.20261106145633-d407941a339a // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20261110000943-09e21b237f2c // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20261110000943-09e21b237f2c // indirect
google.golang.org/grpc v1.85.0 // indirect
)
tool (
github.com/google/wire/cmd/wire
github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt
github.com/maxbrunsfeld/counterfeiter/v6
golang.org/x/tools/cmd/goimports
)
replace github.com/pion/webrtc/v4 => github.com/livekit/webrtc-pion/v4 v4.2.25-warp.3
replace github.com/pion/ice/v4 => github.com/livekit/ice/v4 v4.4.8-warp.4