Webrtc stream has artifacts due to packet loss

I’m using the webrtc example mentioned here in my tauri app with with the only change being that I’m only receiving video and audio, and using vaapivp9enc (will replace it with vavp9enc once 1.26 gets released) to force vp9 to achieve better quality. It starts off fine. After some time, lot of artifacts appear and the stream gets messed up.

I used the get-stats action available in webrtcbin and observed that this occurs when there is packet loss.

Offer received from browser:

v=0\r
o=- 5140659740994756705 3 IN IP4 127.0.0.1\r
s=-\r
t=0 0\r
a=group:BUNDLE 0 1 2\r
a=extmap-allow-mixed\r
a=msid-semantic: WMS cf7a48c6-8dcb-4098-898a-d12cbf16ea3f\r
m=application 55942 UDP/DTLS/SCTP webrtc-datachannel\r
c=IN IP4 64.227.163.77\r
a=candidate:1111817231 1 udp 2113937151 12565196-de95-4a98-9aee-e96155d4dc25.local 58155 typ host generation 0 network-cost 999\r
a=candidate:377599558 1 udp 1677729535 49.207.246.178 36643 typ srflx raddr 0.0.0.0 rport 0 generation 0 network-cost 999\r
a=candidate:980862191 1 udp 33562623 64.227.163.77 55942 typ relay raddr 49.207.246.178 rport 36643 generation 0 network-cost 999\r
a=ice-ufrag:2Emt\r
a=ice-pwd:r67F4WAcyfi2xNsTT+nUvgwK\r
a=ice-options:trickle\r
a=fingerprint:sha-256 86:C6:45:62:2F:14:C5:AB:8C:C3:21:75:0E:B6:6E:C6:49:B1:18:8A:40:F1:5A:F9:DB:D7:FF:29:BA:0E:CA:00\r
a=setup:actpass\r
a=mid:0\r
a=sctp-port:5000\r
a=max-message-size:262144\r
m=audio 9 UDP/TLS/RTP/SAVPF 111 63 9 0 8 13 110 126\r
c=IN IP4 0.0.0.0\r
a=rtcp:9 IN IP4 0.0.0.0\r
a=ice-ufrag:2Emt\r
a=ice-pwd:r67F4WAcyfi2xNsTT+nUvgwK\r
a=ice-options:trickle\r
a=fingerprint:sha-256 86:C6:45:62:2F:14:C5:AB:8C:C3:21:75:0E:B6:6E:C6:49:B1:18:8A:40:F1:5A:F9:DB:D7:FF:29:BA:0E:CA:00\r
a=setup:actpass\r
a=mid:1\r
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r
a=sendonly\r
a=msid:cf7a48c6-8dcb-4098-898a-d12cbf16ea3f 56b5db76-3ac5-4d07-b012-5e6d6360b44e\r
a=rtcp-mux\r
a=rtcp-rsize\r
a=rtpmap:111 opus/48000/2\r
a=rtcp-fb:111 transport-cc\r
a=fmtp:111 minptime=10;useinbandfec=1\r
a=rtpmap:63 red/48000/2\r
a=fmtp:63 111/111\r
a=rtpmap:9 G722/8000\r
a=rtpmap:0 PCMU/8000\r
a=rtpmap:8 PCMA/8000\r
a=rtpmap:13 CN/8000\r
a=rtpmap:110 telephone-event/48000\r
a=rtpmap:126 telephone-event/8000\r
a=ssrc:3166295929 cname:Byz35HuS9/Hsk9+i\r
a=ssrc:3166295929 msid:cf7a48c6-8dcb-4098-898a-d12cbf16ea3f 56b5db76-3ac5-4d07-b012-5e6d6360b44e\r
m=video 9 UDP/TLS/RTP/SAVPF 96 97 102 103 104 105 106 107 108 109 127 125 39 40 45 46 98 99 100 101 112 113 116 117 118\r
c=IN IP4 0.0.0.0\r
a=rtcp:9 IN IP4 0.0.0.0\r
a=ice-ufrag:2Emt\r
a=ice-pwd:r67F4WAcyfi2xNsTT+nUvgwK\r
a=ice-options:trickle\r
a=fingerprint:sha-256 86:C6:45:62:2F:14:C5:AB:8C:C3:21:75:0E:B6:6E:C6:49:B1:18:8A:40:F1:5A:F9:DB:D7:FF:29:BA:0E:CA:00\r
a=setup:actpass\r
a=mid:2\r
a=extmap:14 urn:ietf:params:rtp-hdrext:toffset\r
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r
a=extmap:13 urn:3gpp:video-orientation\r
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r
a=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay\r
a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type\r
a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing\r
a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space\r
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r
a=extmap:10 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\r
a=extmap:11 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\r
a=sendonly\r
a=msid:cf7a48c6-8dcb-4098-898a-d12cbf16ea3f ff35a797-ecfc-4757-a037-158666bf909c\r
a=rtcp-mux\r
a=rtcp-rsize\r
a=rtpmap:96 VP8/90000\r
a=rtcp-fb:96 goog-remb\r
a=rtcp-fb:96 transport-cc\r
a=rtcp-fb:96 ccm fir\r
a=rtcp-fb:96 nack\r
a=rtcp-fb:96 nack pli\r
a=rtpmap:97 rtx/90000\r
a=fmtp:97 apt=96\r
a=rtpmap:102 H264/90000\r
a=rtcp-fb:102 goog-remb\r
a=rtcp-fb:102 transport-cc\r
a=rtcp-fb:102 ccm fir\r
a=rtcp-fb:102 nack\r
a=rtcp-fb:102 nack pli\r
a=fmtp:102 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f\r
a=rtpmap:103 rtx/90000\r
a=fmtp:103 apt=102\r
a=rtpmap:104 H264/90000\r
a=rtcp-fb:104 goog-remb\r
a=rtcp-fb:104 transport-cc\r
a=rtcp-fb:104 ccm fir\r
a=rtcp-fb:104 nack\r
a=rtcp-fb:104 nack pli\r
a=fmtp:104 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42001f\r
a=rtpmap:105 rtx/90000\r
a=fmtp:105 apt=104\r
a=rtpmap:106 H264/90000\r
a=rtcp-fb:106 goog-remb\r
a=rtcp-fb:106 transport-cc\r
a=rtcp-fb:106 ccm fir\r
a=rtcp-fb:106 nack\r
a=rtcp-fb:106 nack pli\r
a=fmtp:106 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r
a=rtpmap:107 rtx/90000\r
a=fmtp:107 apt=106\r
a=rtpmap:108 H264/90000\r
a=rtcp-fb:108 goog-remb\r
a=rtcp-fb:108 transport-cc\r
a=rtcp-fb:108 ccm fir\r
a=rtcp-fb:108 nack\r
a=rtcp-fb:108 nack pli\r
a=fmtp:108 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42e01f\r
a=rtpmap:109 rtx/90000\r
a=fmtp:109 apt=108\r
a=rtpmap:127 H264/90000\r
a=rtcp-fb:127 goog-remb\r
a=rtcp-fb:127 transport-cc\r
a=rtcp-fb:127 ccm fir\r
a=rtcp-fb:127 nack\r
a=rtcp-fb:127 nack pli\r
a=fmtp:127 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=4d001f\r
a=rtpmap:125 rtx/90000\r
a=fmtp:125 apt=127\r
a=rtpmap:39 H264/90000\r
a=rtcp-fb:39 goog-remb\r
a=rtcp-fb:39 transport-cc\r
a=rtcp-fb:39 ccm fir\r
a=rtcp-fb:39 nack\r
a=rtcp-fb:39 nack pli\r
a=fmtp:39 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=4d001f\r
a=rtpmap:40 rtx/90000\r
a=fmtp:40 apt=39\r
a=rtpmap:45 AV1/90000\r
a=rtcp-fb:45 goog-remb\r
a=rtcp-fb:45 transport-cc\r
a=rtcp-fb:45 ccm fir\r
a=rtcp-fb:45 nack\r
a=rtcp-fb:45 nack pli\r
a=fmtp:45 level-idx=5;profile=0;tier=0\r
a=rtpmap:46 rtx/90000\r
a=fmtp:46 apt=45\r
a=rtpmap:98 VP9/90000\r
a=rtcp-fb:98 goog-remb\r
a=rtcp-fb:98 transport-cc\r
a=rtcp-fb:98 ccm fir\r
a=rtcp-fb:98 nack\r
a=rtcp-fb:98 nack pli\r
a=fmtp:98 profile-id=0\r
a=rtpmap:99 rtx/90000\r
a=fmtp:99 apt=98\r
a=rtpmap:100 VP9/90000\r
a=rtcp-fb:100 goog-remb\r
a=rtcp-fb:100 transport-cc\r
a=rtcp-fb:100 ccm fir\r
a=rtcp-fb:100 nack\r
a=rtcp-fb:100 nack pli\r
a=fmtp:100 profile-id=2\r
a=rtpmap:101 rtx/90000\r
a=fmtp:101 apt=100\r
a=rtpmap:112 H264/90000\r
a=rtcp-fb:112 goog-remb\r
a=rtcp-fb:112 transport-cc\r
a=rtcp-fb:112 ccm fir\r
a=rtcp-fb:112 nack\r
a=rtcp-fb:112 nack pli\r
a=fmtp:112 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=64001f\r
a=rtpmap:113 rtx/90000\r
a=fmtp:113 apt=112\r
a=rtpmap:116 red/90000\r
a=rtpmap:117 rtx/90000\r
a=fmtp:117 apt=116\r
a=rtpmap:118 ulpfec/90000\r
a=ssrc-group:FID 1419894080 2293106330\r
a=ssrc:1419894080 cname:Byz35HuS9/Hsk9+i\r
a=ssrc:1419894080 msid:cf7a48c6-8dcb-4098-898a-d12cbf16ea3f ff35a797-ecfc-4757-a037-158666bf909c\r
a=ssrc:2293106330 cname:Byz35HuS9/Hsk9+i\r
a=ssrc:2293106330 msid:cf7a48c6-8dcb-4098-898a-d12cbf16ea3f ff35a797-ecfc-4757-a037-158666bf909c\r

Answer sent by GStreamer app

v=0
o=- 5140659740994756705 3 IN IP4 0.0.0.0
s=-
t=0 0
a=group:BUNDLE 0 1 2
m=application 9 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 0.0.0.0
a=ice-ufrag:v/TrvwTS4YtsEKp0S9au10O0I0p2ZOYp
a=ice-pwd:oOoODNE3unO8PYfEr2Ulfgy+9nEgwaTD
a=mid:0
a=setup:active
a=sctp-port:5000
a=fingerprint:sha-256 4B:71:02:D7:69:F9:68:06:6F:2F:A0:59:C6:45:10:01:13:95:AF:BA:78:38:3B:A9:46:3C:34:EB:E4:3F:9B:D6
m=audio 9 UDP/TLS/RTP/SAVPF 111
c=IN IP4 0.0.0.0
a=ice-ufrag:v/TrvwTS4YtsEKp0S9au10O0I0p2ZOYp
a=ice-pwd:oOoODNE3unO8PYfEr2Ulfgy+9nEgwaTD
a=mid:1
a=rtcp-mux
a=setup:active
a=rtpmap:111 OPUS/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
a=recvonly
a=fingerprint:sha-256 4B:71:02:D7:69:F9:68:06:6F:2F:A0:59:C6:45:10:01:13:95:AF:BA:78:38:3B:A9:46:3C:34:EB:E4:3F:9B:D6
m=video 9 UDP/TLS/RTP/SAVPF 96
c=IN IP4 0.0.0.0
a=ice-ufrag:v/TrvwTS4YtsEKp0S9au10O0I0p2ZOYp
a=ice-pwd:oOoODNE3unO8PYfEr2Ulfgy+9nEgwaTD
a=mid:2
a=rtcp-mux
a=setup:active
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 nack pli
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 transport-cc
a=recvonly
a=fingerprint:sha-256 4B:71:02:D7:69:F9:68:06:6F:2F:A0:59:C6:45:10:01:13:95:AF:BA:78:38:3B:A9:46:3C:34:EB:E4:3F:9B:D6

Any idea why this happening and how do I fix it?

Packet loss can happen for any number of reasons and is a consequence of using a network. The only way to avoid this is by using mitigation techniques like RTX (retransmissions) or FEC. RTX is enabled by setting the ‘do-nack’ property to TRUE before SDP negotiation occurs. FEC is enabled by setting the ‘fec-type’ property on the transceiver to ‘ulp-red’ and configuring an appropriate ‘fec-percentage’

Another aspect I’ve just discovered is that we don’t support VP9 error_resiliant_mode, even in the new encoder wrapper.

/* We do not support error resilient mode now. */
.error_resilient_mode = 0,

Without this, the lost of one packet will lead to complete visual corruption of the following delta frame until the next keyframe is received. It would be nice to check with Intel if this is a limitation on their end, or if its just the GStreamer implementation. I do believe that without error_resilient_mode, VP9 is not going to work very well under webrtc, unless you have a lot of FEC/RTX and that you ensure to drop any corrupted frame.

To set the do-nack property, do I need to get the transceiver or add a new transceiver from the webrtcbin?
Edit: Nvm, I figured it out. Although for some reason it’s been removed from the current webrtc example. It used to be there before.

let pipeline = gstreamer::parse::launch(
    "videotestsrc pattern=ball is-live=true ! vah264lpenc target-usage=1 ! rtph264pay name=vpay pt=96 ! webrtcbin. \
    audiotestsrc is-live=true ! opusenc perfect-timestamp=true ! rtpopuspay name=apay pt=97 ! application/x-rtp,encoding-name=OPUS ! webrtcbin. \
    webrtcbin name=webrtcbin latency=100"
).expect("Failed to launch");
let pipeline = pipeline.downcast::<gstreamer::Pipeline>().expect("Not a pipeline");
let webrtcbin = pipeline.by_name("webrtcbin").expect("Did not find webrtcbin");
let transceiver = webrtcbin.emit_by_name::<gstreamer_webrtc::WebRTCRTPTransceiver>("get-transceiver", &[&0i32]);
transceiver.set_property("do-nack", true);

I did this and it doesn’t seem to have any effect?
nack-count is 0 and packets-lost is 10

Hmmm that’s interesting.
I tried with vah264lpenc and I’m still seeing artifacts after packet loss. Could it be an intel issue?
I’ll try with software encoding (x264enc) and check if it still occurs. If it’s still happening, can we conclude that this is an Intel issue?
Update: Using x264enc did not change anything. As soon as there is packet loss, there is artifacting

Well, packet lost == artifacts, unless you have a way to recover from it (FEC or RTX). What I was saying is that without error resiliance in VP9, the artifacts looks like random noizy images.

1 Like

I noticed that in the answer sent by gstreamer, even though I’m using vah264lpenc, the answer contains vp8.
I also observed that the way in which do-nack is set is behaving differently.

// Sample pipeline
let pipeline = gstreamer::parse_launch(
    "videotestsrc pattern=ball is-live=true ! vah264lpenc target-usage=1 ! rtph264pay name=vpay pt=96 ! webrtcbin. \
    audiotestsrc is-live=true ! opusenc perfect-timestamp=true ! rtpopuspay name=apay pt=97 ! application/x-rtp,encoding-name=OPUS ! webrtcbin. \
    webrtcbin name=webrtcbin latency=100"
let pipeline = pipeline.downcast::<gstreamer::Pipeline>().expect("Not a pipeline");
let webrtcbin = pipeline.by_name("webrtcbin").expect("Did not find webrtcbin");

// Method 1
// let transceivers = webrtcbin.emit_by_name::<gstreamer_webrtc::WebRTCRTPTransceiver>("get-transceivers", &[]);
// let transceiver = webrtcbin.emit_by_name::<gstreamer_webrtc::WebRTCRTPTransceiver>("get-transceiver", &[&0i32]);
// transceiver.set_property("do-nack", true);

// Method 2
webrtcbin.connect("on-new-transceiver", false, move |values| {
    let transceiver = values[1].get::<gstreamer_webrtc::WebRTCRTPTransceiver>().expect("Could not get it");
    println!("New transceiver {:?}", transceiver);
    transceiver.set_property("do-nack", true);
    None
});

Here are the answers along with behaviour I’m observing:

  1. VP8 using Method 2: No packet loss / artifacting. But ideally want to avoid to use a better encoder and a HW accelerated one.
v=0
o=- 3043513915265268850 3 IN IP4 0.0.0.0
s=-
t=0 0
a=group:BUNDLE 0 1
m=application 9 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 0.0.0.0
a=ice-ufrag:QoObJbgykG0D+1e8e3Z2jKD2UTzZh4PR
a=ice-pwd:oiYjfV/vzmcuctj3mkhOaDSL9CulDEl2
a=mid:0
a=setup:active
a=sctp-port:5000
a=fingerprint:sha-256 48:EB:F3:F2:18:E6:79:DA:2A:03:C9:E6:A8:D9:5A:88:CE:24:BC:B3:EB:8D:C3:E7:79:A9:4F:49:87:C0:23:5F
m=video 9 UDP/TLS/RTP/SAVPF 96
c=IN IP4 0.0.0.0
a=ice-ufrag:QoObJbgykG0D+1e8e3Z2jKD2UTzZh4PR
a=ice-pwd:oiYjfV/vzmcuctj3mkhOaDSL9CulDEl2
a=mid:1
a=rtcp-mux
a=setup:active
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 nack pli
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 transport-cc
a=framerate:30
a=extmap:1 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=ssrc:3734459369 msid:user1238914294@host-ad164438 webrtctransceiver5
a=ssrc:3734459369 cname:user1238914294@host-ad164438
a=recvonly
a=fingerprint:sha-256 48:EB:F3:F2:18:E6:79:DA:2A:03:C9:E6:A8:D9:5A:88:CE:24:BC:B3:EB:8D:C3:E7:79:A9:4F:49:87:C0:23:5F
  1. VP8 with Method 1: Lot of packet loss from the beginning of the stream. NACK count is also really high.
v=0
o=- 6953803417043972394 4 IN IP4 0.0.0.0
s=-
t=0 0
a=group:BUNDLE 0 1
m=application 9 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 0.0.0.0
a=ice-ufrag:1z/3VHGId5Zw4OY6/SDVSb4w3cT1ZzK3
a=ice-pwd:yF/ZhDtCay/x4MuwumQT22CSVFSy4AA2
a=mid:0
a=setup:active
a=sctp-port:5000
a=fingerprint:sha-256 0E:80:22:CF:56:19:8D:9B:A3:4A:BD:39:D1:53:90:6C:98:91:FB:97:05:A5:54:AE:A8:0C:D6:CC:4B:16:67:CC
m=video 9 UDP/TLS/RTP/SAVPF 96 97
c=IN IP4 0.0.0.0
a=ice-ufrag:1z/3VHGId5Zw4OY6/SDVSb4w3cT1ZzK3
a=ice-pwd:yF/ZhDtCay/x4MuwumQT22CSVFSy4AA2
a=mid:1
a=rtcp-mux
a=setup:active
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 transport-cc
a=framerate:30
a=extmap:1 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:4 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
a=ssrc-group:FID 443004151 3935660816
a=ssrc:443004151 msid:user1618091537@host-37a24748 webrtctransceiver0
a=ssrc:443004151 cname:user1618091537@host-37a24748
a=ssrc:3935660816 msid:user1618091537@host-37a24748 webrtctransceiver0
a=ssrc:3935660816 cname:user1618091537@host-37a24748
a=recvonly
a=fingerprint:sha-256 0E:80:22:CF:56:19:8D:9B:A3:4A:BD:39:D1:53:90:6C:98:91:FB:97:05:A5:54:AE:A8:0C:D6:CC:4B:16:67:CC
  1. H264 with Method 1: Packet loss after some time and no NACKs being sent
v=0
o=- 5060665458800504251 3 IN IP4 0.0.0.0
s=-
t=0 0
a=group:BUNDLE 0 1
m=application 9 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 0.0.0.0
a=ice-ufrag:Htk2KCjfpovT/Y0dIahq7wgw0nWyd8Pc
a=ice-pwd:w2h1+Vk+MeMha9yWX9NJr6k3WFqZQMYv
a=mid:0
a=setup:active
a=sctp-port:5000
a=fingerprint:sha-256 6A:5A:8F:78:7D:63:86:27:BD:EB:96:47:38:83:7E:AD:19:2E:88:5F:AF:D5:42:84:1F:D1:72:6B:BF:43:EB:22
m=video 9 UDP/TLS/RTP/SAVPF 96
c=IN IP4 0.0.0.0
a=ice-ufrag:Htk2KCjfpovT/Y0dIahq7wgw0nWyd8Pc
a=ice-pwd:w2h1+Vk+MeMha9yWX9NJr6k3WFqZQMYv
a=mid:1
a=rtcp-mux
a=setup:active
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 nack pli
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 transport-cc
a=recvonly
a=fingerprint:sha-256 6A:5A:8F:78:7D:63:86:27:BD:EB:96:47:38:83:7E:AD:19:2E:88:5F:AF:D5:42:84:1F:D1:72:6B:BF:43:EB:22

  1. H264 with Method 2: Lot of packet loss from the beginning of the stream. NACK count is also really high
v=0
o=- 2631045432851636653 3 IN IP4 0.0.0.0
s=-
t=0 0
a=group:BUNDLE 0 1
m=application 9 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 0.0.0.0
a=ice-ufrag:16TbXakCD0h7LU1eawv8y0UTGsi3gHXQ
a=ice-pwd:e5XAAm9VbTLm6KbFGp7jiFsrW/ilPfBe
a=mid:0
a=setup:active
a=sctp-port:5000
a=fingerprint:sha-256 2A:D4:1E:20:0C:A9:08:94:6A:7C:F7:8B:F5:30:08:E7:78:09:DF:B0:0B:68:72:8A:40:03:D2:69:0F:10:E5:EA
m=video 9 UDP/TLS/RTP/SAVPF 96 97
c=IN IP4 0.0.0.0
a=ice-ufrag:16TbXakCD0h7LU1eawv8y0UTGsi3gHXQ
a=ice-pwd:e5XAAm9VbTLm6KbFGp7jiFsrW/ilPfBe
a=mid:1
a=rtcp-mux
a=setup:active
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 transport-cc
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
a=recvonly
a=fingerprint:sha-256 2A:D4:1E:20:0C:A9:08:94:6A:7C:F7:8B:F5:30:08:E7:78:09:DF:B0:0B:68:72:8A:40:03:D2:69:0F:10:E5:EA

My questions with these behaviours are:

  • Is the method in which I’m setting do-nack correct?
  • Why is there VP8 in the answer for H264?
  • Is it viable to use a HW-accelerated codec which is preferably not VP8 like H264 and prevent artifacting?

If anybody is struggling with this, I figured out how to set do-nack and fec-type by referring to the webrtcsrc implementation.
But I’m still facing packet loss.
Despite setting do-nack to true, I can see in the stats that there are no nacks sent or received