Generate host candidates with component 1 only when a=rtcp-mux is present
Author: enobufsCreated Apr 4, 2024Updated Jul 19, 2026
Labelsdifficulty:easyfeature request
Your environment.
- Version: 3.2.32
- Browser: n/a
What did you do?
Try to connect from Chrome browser to a Pion application.
What did you expect?
I see two a=candidate lines for the same transport address even though it uses a=rtcp-mux (RTP/RTCP multiplexing)
According to RFC 8445 Section 5.1.1.1:
Each component has an ID assigned to it, called the "component ID".
For RTP/RTCP data streams, unless both RTP and RTCP are multiplexed
in the same UDP port (RTP/RTCP multiplexing), the RTP itself has a
component ID of 1, and RTCP has a component ID of 2. In case of RTP/
RTCP multiplexing, a component ID of 1 is used for both RTP and RTCP.I believe we could drop the component 2. In fact, Chrome generates one candidate for a transport with component set to 1.
What happened?
Pion generates SDP with the following candidates:
a=candidate:196456620 1 udp 2130706431 2601:646:c201:f4d0:412e:749c:6e30:47cc 50897 typ host
a=candidate:196456620 2 udp 2130706431 2601:646:c201:f4d0:412e:749c:6e30:47cc 50897 typ host
a=candidate:302805250 1 udp 2130706431 10.0.0.238 50897 typ host
a=candidate:302805250 2 udp 2130706431 10.0.0.238 50897 typ host
:Source: pion/webrtc