100 Commits
Author SHA1 Message Date
cnderrauber 0eb472c8b2 update deps to fix warp issue (#4916)
* update deps to fix warp issue

* sovle comment
2026-09-28 16:39:55 +08:00
cnderrauber 6b2e3ece69 Increase receiver loadbalance threshold when batch io enabled (#4899)
* Increase receiver loadbalance threshold when batch io enabled

With batch IO the send syscall moves to the BatchConn flush goroutine, so WriteRTP only
translates the packet and enqueues it. Increash the threshold to reduce

* lint
2026-09-23 13:54:40 +08:00
cnderrauber 885c869ffa Add sdk lable to session start time and participant join (#4885) 2026-09-21 13:14:36 +08:00
cnderrauber 61ec725c52 Support VP9/AV1 simulcast (#4830)
Comes from #4718. Remove #2 of original PR as the simulcast SR
looks good to me.
2026-09-02 15:07:43 +08:00
cnderrauber 60e08cb19f update ice fork for warp (#4824) 2026-08-31 15:29:34 +08:00
cnderrauberandClaude Opus 5 a1f46b310a Do not escape the ICE server URI in the WHIP Link header (#4795)
The link target was passed through url.PathEscape, which turns the '?' of
turn:host:3478?transport=udp into %3F. The target of a Link header field
is a URI reference and "?transport=" is part of TURN URI syntax
, not a query string, so a publisher that percent-decodes the
target ends up with an unparsable host.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-31 11:14:15 +08:00
cnderrauber d185224719 warp log (#4811) 2026-08-28 16:59:21 +08:00
cnderrauber 763ea15293 Strip packet trailers from every VP9 layer frame (#4773)
VP9 SVC sends each spatial layer as its own encoded frame,
so a picture carries one trailer per layer, but only the
top layer's last packet has the RTP marker bit set.

Fix https://github.com/livekit/egress/issues/1347
2026-08-26 14:05:34 +08:00
cnderrauber f7954d5747 Return created ingress info from io service (#4787)
The stream key is randomly generated for each request. Return
exsiting record if the `ingressID` already exists on retry.
2026-08-25 09:03:09 +08:00
cnderrauber 803864dc7b Add bytes cap on migration data cache size (#4782) 2026-08-21 16:49:09 +08:00
cnderrauber dbe06aa8d1 Experimental WARP (#4649)
* Experimental WARP

* fix panic

* go dep

* stats
2026-08-14 16:26:08 +08:00
cnderrauber 7d556cfefe sample codec payload mismatch error log (#4751) 2026-08-13 19:32:21 +08:00
cnderrauber fad2cc4afe Use request id to make api idempotence on sdk retry (#4694)
* Use request id to make api idempotence on sdk retry

Derive resource id from request id
2026-08-12 09:28:39 +08:00
cnderrauber 8e6077221c Return incompatible in SetCodecWithState if the codec PT changed (#4729) 2026-08-06 15:42:06 +08:00
cnderrauber 4d177cb01b Remove H.264 baseline (42001f) from default enabled codecs (#4723)
Users can explicitly enable this profile if they are certain that all device support it.
2026-08-04 11:12:42 +08:00
cnderrauber 436a0cc3d3 Support more h264 profiles (#4708)
* Register h264 main profile if enabled explicitly

We don't support the h264 main profile for compatibility,
user can enabled it by set fmtp explicitly in codec config
to enable it if want to use it in special scenario.

* go mod
2026-07-28 16:18:19 +08:00
cnderrauber 46e5caedbe Report average bitrates for whip ingress (#4634) 2026-07-01 17:06:49 +08:00
cnderrauber 2aec61c11b update webrtc to fix interop issue with bundled datachannel (#4631) 2026-06-29 10:33:51 +08:00
cnderrauber eb3de092f0 update pion/sctp (#4623)
* update pion/sctp

* webrtc & datachannel
2026-06-25 21:43:07 +08:00
cnderrauber 9746c9a9d6 Enforce subscriptio permission to data track (#4588)
* Enforce subscriptio permission to data track

* use revoke path as same as media track

* nil check
2026-06-12 16:02:12 +08:00
cnderrauber 816d37281d Add grants expiry to Auth context (#4581) 2026-06-10 17:44:58 +08:00
cnderrauber 7dc6877738 Preserve original expiry when refreshing token (#4580)
To avoid shortening the token expiration time during
refreshing cause client reconnect failed after network
down for a long time (>5min).
2026-06-10 14:51:10 +08:00
cnderrauber d290de8165 Correct config comment (#4563) 2026-06-04 16:43:59 +08:00
cnderrauber 63be96f631 Prevent panic from nil(illegal) syncState.Subscriptions message (#4560) 2026-06-04 10:32:24 +08:00
cnderrauber 5bd425346c Document of advertise_internal_ip and external_ip_only (#4554) 2026-06-02 09:50:45 +08:00
cnderrauber 356ae211a3 Config documentation for advertise_internal_ip and skip_external_ip_validation (#4552)
See https://github.com/livekit/mediatransportutil/pull/88
2026-06-01 14:37:08 +08:00
cnderrauber 8ab92a80f6 Don't require media sections when joining (#4535)
* Don't require media sections when joining

Client except browser (rust/libwebrtc is known) could have problem
to fire ontrack event when reuses extra media section to subscribe
track, so disable this feature in server side and let client determine
if extra media sections are needed.

* lint
2026-05-20 13:28:51 +08:00
cnderrauber f303f499ef Always enable rtx codec (#4533)
Sfu will fallback to retransmit packet by media stream ssrc if rtx
is not negotiated (client doesn't have), so we should not disable
rtx explicitly (by codec config).

Fix #4519
2026-05-18 15:51:10 +08:00
cnderrauber 89faaeba82 Apply ttl check only when authenticate allocation creating (#4526)
* Apply ttl check only when authenticate allocation creating

TTL check could reject allocation/persmission refresh in
security enhancement #4505, cause long-live session disconnect
when turn credential is expired.
Only check ttl on allocation creating to prevent abusing leaked
credential but keep long-live session work.
2026-05-15 14:55:05 +08:00
cnderrauber ce1bf47b5c Revert "fix: ensure num_participants is accurate in webhook events (#4265) (#…" (#4448)
This reverts commit cdb0769c38.
2026-04-13 22:21:22 +08:00
cnderrauber 5dc4e90d82 Apply IPFilter when get local ip (#4440)
Fix #4437
See https://github.com/livekit/mediatransportutil/pull/80
2026-04-10 08:59:53 +08:00
cnderrauber 397cd09a90 Embedded turn test (#4412)
* Embedded turn test

* unused code

* fix test
2026-03-30 22:24:00 +08:00
cnderrauber 1f1eeb6832 Fallback to servicestore if rpc is unavailable (#4391)
* Fallback to servicestore if rpc is unavailable

compatibility mode for #4387

* conf
2026-03-25 11:09:52 +08:00
cnderrauber 9474c807c0 route participant reads through PSRPC instead of Redis (#4387)
rel: #4373
2026-03-24 16:25:11 +08:00
cnderrauber 95225ff2e1 don't require media section for dual peerconnection mode (#4354) 2026-03-09 20:56:55 +08:00
cnderrauber e963953817 Refine ipv6 support (#4352)
* Refine ipv6 support

* go mod

* check ipv4 is set in turn
2026-03-09 20:43:00 +08:00
cnderrauber caa47522fb Add option to require media sections when participant joining (#4347)
Negotiate media tracks at first sdp round
2026-03-06 03:59:00 +08:00
cnderrauber b35105656c Exclude ice restart case from offer answer id mismatch warning (#4341) 2026-03-05 13:05:37 +08:00
cnderrauber 9d418689c6 Send participant left event after track unpublished for moved (#4334)
participant
2026-02-25 13:22:33 +08:00
cnderrauber 8ae564065e generate & log egressID for start egress request (#4303)
* generate & log egressID for start egress request

* seprate method

* use ctx value instead of metadata

* comment
2026-02-10 09:34:56 +08:00
cnderrauber 76a41a7a8c Generate config flags (#4268)
Fix #4262
2026-01-29 15:04:01 +08:00
cnderrauber b61799ecd8 Ignore parse addr error when add remote candidate (#4264) 2026-01-26 14:37:02 +08:00
cnderrauber 01bd966ff8 Add silent frame for pcmu/a (#4258)
* Add silent frame for pcmu/a

* use red

* solve comment
2026-01-21 16:11:08 +08:00
cnderrauber f6efccce25 report video size from media data for whip (#4211) 2025-12-31 15:52:10 +08:00
cnderrauber d92f6a790f return iceservers for whip (#4210) 2025-12-31 15:10:15 +08:00
cnderrauber 4104b8270b update protocol (#4183)
* update protocol

* fix test
2025-12-22 12:54:11 +08:00
cnderrauber fa0633aa3e move utils.WrapAround to mediatransportutil (#4124) 2025-12-04 17:45:11 +08:00
cnderrauber 54cf7d46c8 Control latency of lossy data channel (#4088)
* Control latency of lossy data channel

* remove log

* test
2025-11-18 16:30:16 +08:00
cnderrauber 2d5054ad01 kind details for connector (#4072) 2025-11-11 21:50:48 +08:00
cnderrauber 075a7576ed Use simulcast codec as default policy for audio track (#4040) 2025-10-29 21:39:20 +08:00
cnderrauber c264b504c4 Don't warn 0 payload type for PCMU (#4039) 2025-10-28 23:11:51 +08:00
cnderrauber 0e2c59c8e4 Sort codec layers when adding track (#3998) 2025-10-14 10:34:52 +08:00
cnderrauber 89a2f46cbf Update deps to fix redis issue when 1 cluster address is provided (#3969)
Fix #3957
2025-09-30 11:48:08 +08:00
cnderrauber f4a06cf025 Clean code as there is no oss sweeper for ingress (#3918) 2025-09-11 16:44:52 +08:00
cnderrauber 76645fad5e Rpcs for ingress proxy WHIP (#3911)
See https://github.com/livekit/protocol/pull/1194
2025-09-09 22:49:42 +08:00
cnderrauber 5026de2bea handle frame number wrap back in svc (#3885)
* handle frame number wrap back in svc

* Add Slack Notifier

* check nil dd ext

* log format
2025-08-29 17:11:49 +08:00
cnderrauber b4e146c5cb update mediatransport util for ice port 3478 (#3877) 2025-08-26 10:35:10 +08:00
cnderrauber b660c3b582 Extract video size from media stream (#3856)
* Extract video size from media stream

* fix test
2025-08-18 09:06:57 +08:00
cnderrauber 51bbe8c52b Set participant active when peerconnection connected (#3790)
Don't wait datachannel ready (sctp handshake)
2025-07-14 10:59:59 +08:00
cnderrauber 8c033ce9fe Enable H265 by default (#3773) 2025-07-01 14:58:09 +08:00
cnderrauber 8c2fc0bcd9 Fix svc encoding for chrome mobile on iOS (#3751)
The browser could send rtp packets of svc encoding without
DD extension while the sdp negotiates it, sfu detects extension
in rtp packet for this case.
2025-06-23 22:39:12 +08:00
cnderrauber e754a86068 return error when moving egree/agent participant (#3741) 2025-06-18 15:10:08 +08:00
cnderrauber 7542cf0723 remove unused code (#3740) 2025-06-18 10:09:30 +08:00
cnderrauber 9ce737db31 Add log for dropping out of order reliable message (#3728) 2025-06-13 22:08:56 +08:00
cnderrauber 1b95e818c9 Don't check bindState on downtrack.Bind (#3726)
receiver can be ready before bind
2025-06-13 16:13:15 +08:00
cnderrauber fdf9b85290 e2e reliability for data channel (#3716)
* e2e reliability for data channel

* solve comments
2025-06-11 11:14:30 +08:00
cnderrauber 6b849a87e8 update mediatransportutil for sctp congestion control (#3673) 2025-05-19 21:19:46 +08:00
cnderrauber 83b189b0c5 Add ServerInfo to ReconnectResponse (#3671) 2025-05-19 10:32:39 +08:00
cnderrauber dbb70e0f06 Fix dynacast quality for moving out tracks (#3664)
* Make sure moving out track has been unsubscribed

Remove start time checking in subscription manager
as We always use new track ID for republished track at #3020
so there is no race condition now.

Also RemoveSubscriber for moving out tracks for safety,
the subscription manager will handle the removed event but
RemoveSubscriber again will not be bad.

* Clear subscriber node max quality for moving out tracks
2025-05-14 12:54:33 +08:00
cnderrauber 0a5f3c2ae6 resolve new room name logger earlier when moving participant (#3662) 2025-05-13 20:29:07 +08:00
cnderrauberandCopilot 793b383a52 Add Moving participant to another room (#3648)
* Add Moving participant to another room

it is implemented in cloud only since the destination
room can exist in different node with the source room

* Update pkg/service/errors.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* rename

* test panic

* fake LocalParticipantHelper

* revert delete line

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-08 12:58:24 +08:00
cnderrauber 847239c3f2 Disable vp9 for safari 18.4 (#3631)
* Disable vp9 for safari 18.4

safari 18.4's svc encoding is broken

* more flex on test timeout
2025-04-29 13:17:39 +08:00
cnderrauber 5e7f8a1278 Update mediatransportutil for max sctp message (65K) (#3611) 2025-04-16 14:34:33 +08:00
cnderrauber 5c2d96b9d3 Check DestinationRoom of VideoGrant for participant forwarding (#3599) 2025-04-09 15:13:29 +08:00
cnderrauber 2b6a46f402 Handle prefer_regression for backup codec (#3554) 2025-03-26 16:27:50 +08:00
cnderrauber e118aff125 Fire track subscribed when the subscriber connected (#3540) 2025-03-20 17:47:21 +08:00
cnderrauber 6121b9af5e Check ForwardParticipant room name (#3514) 2025-03-11 10:07:05 +08:00
cnderrauber 139d1b139c Add ForwardParticipant method to room service (#3507)
It returns unimplemented error now.
2025-03-10 14:08:38 +08:00
cnderrauber ff9115b228 Disable dd parser for vp8 if extension is not found (#3492)
Browser would not send dd extension for vp8 in some case even if
it is negotiated.
2025-03-06 17:20:00 +08:00
cnderrauber 04ed56835e Don't issue TrackPublished/Unpublished event on migrated track (#3482) 2025-03-03 15:32:17 +08:00
cnderrauber 900da73e6d Add ice candidates logs for failed peerconnection (#3473) 2025-02-27 14:47:28 +08:00
cnderrauber 363353d6e5 Fix codec regression failed after migration (#3455)
The backup codec could arrive before primary
in migration.
2025-02-20 15:54:11 +08:00
cnderrauber 4b04b26a73 fix data channel slow reader test (#3453) 2025-02-20 10:40:25 +08:00
cnderrauber b2a54729f5 Don't drop message if calculate duration is too small (#3442)
* Don't drop message if calculate duration is too small

* fix test
2025-02-18 14:41:41 +08:00
cnderrauber 148a2af151 Log when dropping data packet by slow reader (#3429) 2025-02-13 15:26:22 +08:00
cnderrauber 7e4df818ee Fix timing issue between track republish (#3428) 2025-02-13 13:59:03 +08:00
cnderrauber 4b709d3d88 Fix codec match in downtrack (#3420) 2025-02-11 11:45:22 +08:00
cnderrauberandboks1971 aeec75edeb H265 supoort and codec regression (#3358)
* H265 supoort and codec regression

Support H265 codec.
Add optional codec regression for subscribers don't
support advanced codecs like H265, AV1, VP9.

* restart forwarder on upstream codec change

* tests

* Reneogitate new codec if client doesn't support change

* Add option to disable codec regression

---------

Co-authored-by: boks1971 <raja.gobi@tutanota.com>
2025-02-06 11:56:49 +08:00
cnderrauber e2735f3bd1 remove dd debug logs (#3334) 2025-01-15 13:27:21 +08:00
cnderrauber 6a5d6a282b Log sdps when negotiate failed (#3325) 2025-01-13 13:38:32 +08:00
cnderrauber f08fc581e0 disable sctp zero checksum for unknown sdk (#3321) 2025-01-10 11:55:28 +08:00
cnderrauber f846c7719b Disable SCTP zero checksum for old go client (#3319)
Old go-sdks with old pion/sctp version can't
process unknown parameters.
2025-01-09 13:22:23 +08:00
cnderrauberandboks1971 384e21abc0 vp8 temporal layer selection with dependency descriptor (#3302)
* vp8 with dd

* make temporal layer selection work with DD

* fix test

---------

Co-authored-by: boks1971 <raja.gobi@tutanota.com>
2025-01-03 21:26:03 +08:00
cnderrauber 3ba379ab4c Disable av1 for safari (#3284)
M3 chip/iphone15 pro has av1 enabled for safari but
its hardware decoder can't decode av1 svc encoding.
2024-12-23 10:49:17 +08:00
cnderrauber 8fa1127724 Disable data channel throttle by default (#3281)
* Disable data channel throttle by default

* data race

* err type
2024-12-21 12:08:54 +08:00
cnderrauber 08b58a23af Refine data slow test (#3278) 2024-12-20 10:58:00 +08:00
cnderrauber 99364f39d0 Keep negotiated codec parameters in Downtrack.Bind (#3271)
the context's codec parameters will be set to the binded codec after Bind
2024-12-19 16:16:09 +08:00
cnderrauber 90804c553e more relax on subscriber bitrates (#3265) 2024-12-18 17:02:06 +08:00
cnderrauber 713e67cd52 Thottle the publisher data channel sending when subscriber is slow (#3255)
* Thottle the publisher data channel sending when subscriber is slow

Avoid the publisher overwhelm the sfu data channel buffer when
the subscriber has lower receive bitrates. It will drop message
if the subscriber is considered too slow to block the entire room.

* Enable nack in mediaengine and disable it in transceiver as need

pion doesn't support per transciver codec configuration, so the nack of this session will be disabled
forever once it is first disabled by a transceiver.
https://github.com/pion/webrtc/pull/2972
2024-12-18 10:51:34 +08:00
cnderrauber b684da380e log frame number jump on dd structure updating (#3261) 2024-12-17 17:31:05 +08:00