Make sense of webrtc dump

2019-07-21 12:29发布

I downloaded the dump from chrome://webrtc-internals

now i want to make sense from this data and plot some graph as to show the packet loss and other stuffs which is included in the dump

I can see the graphs in chrome://webrtc-internals only , but i want to do this stuff by myself and in process also understand the logs better.

What does each field means

Till now i can only understand that it is a json dump.

please help me out?

1条回答
再贱就再见
2楼-- · 2019-07-21 12:55

The value arrays that you see under under each log item are the value that is gathered for that item for that second. So, for values[0] is the log information gathered for that category for the first second. So, match the ssrc with the one provided in the SDPs to get each ssrc's log information for each second.

Explained further:

This shows that there is no packet lost for ssrc 1814250626 and shows that there was zero packet loss for each second for the log period.

"ssrc_1814250626-packetsLost": {
     "startTime": "2014-05-11T21:26:06.360Z",
     "endTime": "2014-05-11T21:26:19.362Z",
     "values": "[0,0,0,0,0,0,0,0,0,0,0,0,0,0]"
    },

We can compare the ssrc value against the SDPs that are exchanged to get who and what media type each source represents.

"time": "5/11/2014 4:26:05 PM",
     "type": "createOfferOnSuccess",
     "value": "type: offer, sdp: v=0\r\no=- 140296487447716144 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE audio video\r\na=msid-semantic: WMS yGvpzuQVRTY2AmSWclrFlBZctrOijzNQkLnN\r\nm=audio 1 RTP/SAVPF 111 103 104 0 8 126\r\nc=IN IP4 0.0.0.0\r\na=rtcp:1 IN IP4 0.0.0.0\r\na=ice-ufrag:Xv9/Bx9tAWEOh1pE\r\na=ice-pwd:e7rRuOyKLk1bKUcZ1S+tDw7r\r\na=ice-options:google-ice\r\na=fingerprint:sha-256 B4:1F:B0:32:31:60:0F:E1:EC:6D:0E:65:1D:F8:F6:F1:0C:FE:D9:46:41:37:8A:7A:21:AC:39:7A:12:0E:12:99\r\na=setup:actpass\r\na=mid:audio\r\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=sendrecv\r\na=rtcp-mux\r\na=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:gl34DLHmuMoKoaUWhYJpDJUFkZagn1cedT1x6nQh\r\na=rtpmap:111 opus/48000/2\r\na=fmtp:111 minptime=10\r\na=rtpmap:103 ISAC/16000\r\na=rtpmap:104 ISAC/32000\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:126 telephone-event/8000\r\na=maxptime:60\r\na=ssrc:1814250626 cname:aIdRfz6vBYDbJiEF\r\na=ssrc:1814250626 msid:yGvpzuQVRTY2AmSWclrFlBZctrOijzNQkLnN fad6fe24-b006-4a57-80d6-c603416f32b5\r\na=ssrc:1814250626 mslabel:yGvpzuQVRTY2AmSWclrFlBZctrOijzNQkLnN\r\na=ssrc:1814250626 label:fad6fe24-b006-4a57-80d6-c603416f32b5\r\nm=video 1 RTP/SAVPF 100 116 117\r\nc=IN IP4 0.0.0.0\r\na=rtcp:1 IN IP4 0.0.0.0\r\na=ice-ufrag:Xv9/Bx9tAWEOh1pE\r\na=ice-pwd:e7rRuOyKLk1bKUcZ1S+tDw7r\r\na=ice-options:google-ice\r\na=fingerprint:sha-256 B4:1F:B0:32:31:60:0F:E1:EC:6D:0E:65:1D:F8:F6:F1:0C:FE:D9:46:41:37:8A:7A:21:AC:39:7A:12:0E:12:99\r\na=setup:actpass\r\na=mid:video\r\na=extmap:2 urn:ietf:params:rtp-hdrext:toffset\r\na=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=sendrecv\r\na=rtcp-mux\r\na=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:gl34DLHmuMoKoaUWhYJpDJUFkZagn1cedT1x6nQh\r\na=rtpmap:100 VP8/90000\r\na=rtcp-fb:100 ccm fir\r\na=rtcp-fb:100 nack\r\na=rtcp-fb:100 nack pli\r\na=rtcp-fb:100 goog-remb\r\na=rtpmap:116 red/90000\r\na=rtpmap:117 ulpfec/90000\r\na=ssrc:477546681 cname:aIdRfz6vBYDbJiEF\r\na=ssrc:477546681 msid:yGvpzuQVRTY2AmSWclrFlBZctrOijzNQkLnN 6d5c1c40-6921-40d2-ba53-f413afb76ad1\r\na=ssrc:477546681 mslabel:yGvpzuQVRTY2AmSWclrFlBZctrOijzNQkLnN\r\na=ssrc:477546681 label:6d5c1c40-6921-40d2-ba53-f413afb76ad1\r\n"
    }

We can see from above that since it is an createOfferOnSuccess event, then we know that it is the local parties SDP. Following this we can see that local Audio is ssrc:1814250626 and local video is ssrc:477546681. So, to get the stats on the local video, just grab each value array that begins with ssrc_477546681. It also gives you the log start time and end time in that same json object.

If they value stays the same in the value array (numerous of the same value):

"ssrc_477546681-googFrameHeightInput": {
     "startTime": "2014-05-11T21:26:06.360Z",
     "endTime": "2014-05-11T21:26:19.362Z",
     "values": "[480,480,480,480,480,480,480,480,480,480,480,480,480,480]"
    },

Then you can bet it did not change for each second during the log period.

查看更多
登录 后发表回答