send/receive video in one peerconnnection cause extreme low bitrate on upstream

129 views
Skip to first unread message

林祐正

unread,
Jul 30, 2021, 12:36:40 AM7/30/21
to meetecho-janus
Dear all,

I'm doing some experiment about sending and receiving video in one peerconnection.

My experiment based on multistream branch and multistream plugin.

In publisher configure step, after first time offer/answer is done, 
I pushed a multistream offer instantly to publisher, and publisher also answered correctly. After this, in the perspective of client-side,  streams that established between client/server are:
mid-0 = two-way audio stream ( send my voice, and receive nothing for now)
mid-1 = sendonly video stream ( send my video )
mid-2 = recvonly video stream ( for test, receive nothing for now )

In the "chrome://webrtc-internals/", I can see the offer/answer without any error, but the [bytesSent_in_bits/s] down to 30 kbps, and [totalPacketSendDelay/packetsSent_in_ms] rise up to 1.3k.

Screen Shot 2021-07-30 at 12.20.10 PM.png


If I remove multistream offer/answer step, everything works correctly, 100+ kbps bitrate in default setup and [totalPacketSendDelay/packetsSent_in_ms] ~= 30.

Does anyone have clue about the root cause of low bitrate?
Or Janus did not send/recv video in one peerconnection at all ?

attachment is my webrtc internal dump:
webrtc_internals_dump.txt

林祐正

unread,
Jul 30, 2021, 12:47:58 AM7/30/21
to meetecho-janus
Here are some related information.

(1) multistream offer from server

v=0
o=- 409991572047744467 2 IN IP4 192.168.2.101
s=VideoRoom 1234
t=0 0
a=group:BUNDLE 0 1 2
a=ice-options:trickle
a=fingerprint:sha-256 79:4B:B1:68:1E:F8:14:EF:88:E1:BC:18:85:9A:16:D0:E2:A3:D2:4D:D4:EC:C2:E6:13:0C:E3:A6:E2:4D:BE:27
a=msid-semantic: WMS janus
m=audio 9 UDP/TLS/RTP/SAVPF 111
c=IN IP4 192.168.2.101
a=sendrecv
a=mid:0
a=rtcp-mux
a=ice-ufrag:gQVU
a=ice-pwd:UdMYiEcAfbiunA/1tyt8dc
a=ice-options:trickle
a=setup:actpass
a=rtpmap:111 opus/48000/2
a=fmtp:111 useinbandfec=1
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
a=msid:janus janus0
a=ssrc:1963928090 cname:janus
a=candidate:1 1 udp 2015363583 192.168.2.101 60010 typ host
a=candidate:2 1 udp 2015365119 172.31.34.153 60007 typ host
a=end-of-candidates
m=video 9 UDP/TLS/RTP/SAVPF 96 97
c=IN IP4 192.168.2.101
a=recvonly
a=mid:1
a=rtcp-mux
a=ice-ufrag:gQVU
a=ice-pwd:UdMYiEcAfbiunA/1tyt8dc
a=ice-options:trickle
a=setup:actpass
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=rtcp-fb:96 goog-remb
a=rtcp-fb:96 transport-cc
a=extmap:13 urn:3gpp:video-orientation
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:12 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
a=msid:janus janus1
a=ssrc:1013179658 cname:janus
a=ssrc:1179409083 cname:janus
a=candidate:1 1 udp 2015363583 192.168.2.101 60010 typ host
a=candidate:2 1 udp 2015365119 172.31.34.153 60007 typ host
a=end-of-candidates
m=video 9 UDP/TLS/RTP/SAVPF 96
c=IN IP4 192.168.2.101
a=sendonly
a=mid:2
a=rtcp-mux
a=ice-ufrag:gQVU
a=ice-pwd:UdMYiEcAfbiunA/1tyt8dc
a=ice-options:trickle
a=setup:actpass
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=rtcp-fb:96 goog-remb
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing
a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space
a=extmap:11 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type
a=extmap:12 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
a=extmap:13 urn:3gpp:video-orientation
a=extmap:14 urn:ietf:params:rtp-hdrext:toffset
a=ssrc-group:FID 220776536 543260815
a=msid:janus janus2
a=ssrc:220776536 cname:janus
a=ssrc:543260815 cname:janus
a=candidate:1 1 udp 2015363583 192.168.2.101 60010 typ host
a=candidate:2 1 udp 2015365119 172.31.34.153 60007 typ host
a=end-of-candidates

(2) Answer from client

v=0
o=- 409991572047744467 3 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE 0 1 2
a=msid-semantic: WMS Hw8Sxv1xA3fxMzM0haVSrHdzygY7H3X8EB8p
m=audio 50049 UDP/TLS/RTP/SAVPF 111
c=IN IP4 192.168.2.101
a=rtcp:9 IN IP4 0.0.0.0
a=candidate:2241210590 1 udp 2122260223 192.168.2.101 50049 typ host generation 0 network-id 1 network-cost 10
a=candidate:2119999810 1 udp 2122194687 172.31.34.153 56957 typ host generation 0 network-id 2 network-cost 50
a=ice-ufrag:4m03
a=ice-pwd:aZDdyHWGuKauPD7lk5hENN98
a=ice-options:trickle
a=fingerprint:sha-256 8B:1B:88:2C:39:F3:D1:66:0D:E1:B1:93:DA:37:D9:39:C3:FB:CE:B8:2E:BB:1E:8F:BE:0E:A3:19:4B:8D:16:67
a=setup:passive
a=mid:0
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
a=sendrecv
a=msid:Hw8Sxv1xA3fxMzM0haVSrHdzygY7H3X8EB8p c45489f2-48f8-496a-84ec-6d4359da6b44
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=fmtp:111 minptime=10;useinbandfec=1
a=ssrc:943895354 cname:Seh2pLYkTwIlDQP1
m=video 9 UDP/TLS/RTP/SAVPF 96 97
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:4m03
a=ice-pwd:aZDdyHWGuKauPD7lk5hENN98
a=ice-options:trickle
a=fingerprint:sha-256 8B:1B:88:2C:39:F3:D1:66:0D:E1:B1:93:DA:37:D9:39:C3:FB:CE:B8:2E:BB:1E:8F:BE:0E:A3:19:4B:8D:16:67
a=setup:passive
a=mid:1
a=extmap:13 urn:3gpp:video-orientation
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
a=sendonly
a=msid:Hw8Sxv1xA3fxMzM0haVSrHdzygY7H3X8EB8p c5ab4183-fcca-4e81-9926-f2fb0cf2f6fe
a=rtcp-mux
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 goog-remb
a=rtcp-fb:96 transport-cc
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
a=ssrc-group:FID 909196621 2556297257
a=ssrc:909196621 cname:Seh2pLYkTwIlDQP1
a=ssrc:2556297257 cname:Seh2pLYkTwIlDQP1
m=video 9 UDP/TLS/RTP/SAVPF 96
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:4m03
a=ice-pwd:aZDdyHWGuKauPD7lk5hENN98
a=ice-options:trickle
a=fingerprint:sha-256 8B:1B:88:2C:39:F3:D1:66:0D:E1:B1:93:DA:37:D9:39:C3:FB:CE:B8:2E:BB:1E:8F:BE:0E:A3:19:4B:8D:16:67
a=setup:passive
a=mid:2
a=extmap:14 urn:ietf:params:rtp-hdrext:toffset
a=extmap:13 urn:3gpp:video-orientation
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
a=recvonly
a=rtcp-mux
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 goog-remb
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli

林祐正 在 2021年7月30日 星期五下午12:36:40 [UTC+8] 的信中寫道:
Reply all
Reply to author
Forward
0 new messages