I
am trying to add WebRTC support to my VoIP library. Using a SIP stack
over WebSocket, the SDP negotiation indicates that red and ulpfec are supported and accepted from the offer, and yet, Chrome only ever sends the raw VP8 video on payload
type 100. Never the red packets on payload type 116.
Chrome offer:
m=video 1 RTP/SAVPF 100 116 117
...
a=rtpmap:100 VP8/90000
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 goog-remb
a=rtpmap:116 red/90000
a=rtpmap:117 ulpfec/90000
...
My answer:
m=video 44094 RTP/SAVPF 100 116 117
a=rtcp-fb:* ccm fir
a=rtcp-fb:* nack pli
a=rtcp-fb:* goog-remb
a=rtpmap:100 VP8/90000
a=rtpmap:116 red/90000
a=rtpmap:117 ulpfec/90000
...
Which to the best of my knowledge is correct to all the relevant RFC's, and there are a few!
As an aside, Chome does not advertise support for PLI in it's SDP, and yet as far as I can determine it does, in fact, support it. Not rel4evant ot the problem at hand though.
Doing the web research, a lot of people talked about FEC only happening when there is packet
loss. So, I hacked my code to fake packet loss in the RTCP-SR records sent
back to Chrome for it's transmitted video. Even at 25% packet loss, no
FEC packets were forthcoming. At 50%, Chome seemed to deem the link
unusable and disconnected, though not at all sure that was the reason.
I have tried sending many PLI packets. I have tried sending REMB packets in case that was required. Nothing works.
Now, the final kicker, when I do a call between two computers
running Chome (Mac to PC, if it matters) using
https://apprtc.appspot.com, and observe the RTP traffic using
Wireshark, I can see that Chrome
is sending red packets, and, by implication
ulpfec, via the payload type (116) which you can still see, as the RTP
header not encrypted in SRTP.
As Chrome was sending red packet
while over my LAN,
the statements that it only does so in the presence of packet loss does
not seem correct. It is certainly possible it is not putting in the
redundant ulpfec part or the red packet until a certain level of packet
loss, but it is sending red packets. And I have not managed to get it to
do that much.
The conclusion is there is some criteria that Chrome needs, which has so far eluded me, does anyone have a clue as to what that might be?