Not enough bandwidth

neogeo

Member
We broadcast a stream to a few clients and I have noticed this line on the player:

upload_2017-3-29_17-26-47.png



And we also see thousands of lines like this bellow on the flashphoner_manager.log

How this NOT_ENOUGH_BANDWIDTH is triggered? Obviously it is wrong because the stream is like 300kb-2Mbit and every client is on 20Mbit+ lines.

10:27:36,312 INFO agerRemoteRmiService - RMI TCP Connection(31)- xxxxxxxxxx RECEIVED REST OBJECT <==
URL:https://******/api/stream/StreamStatusEvent
OBJECT:
{
"nodeId" : "S1Lqfn7561cFCmLwcKlGAUn6ECfzBRzC@xxxxxx",
"appKey" : "a5XME7BFjh4Jn20ivJoHBKbngJ4Axh",
"sessionId" : "/xxxxxx:64998/yyyyyy:8443",
"mediaSessionId" : "10661f60-148a-11e7-8d49-fd08969edd7b",
"name" : "875960cc",
"published" : false,
"hasVideo" : true,
"hasAudio" : true,
"status" : "NOT_ENOUGH_BANDWIDTH",
"sdp" : "v=0\r\no=- 6228337020540345231 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE audio video\r\na=msid-semantic: WMS\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 126\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:YW4y\r\na=ice-pwd:wvgk5vUTTQoC2q+ys/QuExCQ\r\na=fingerprint:sha-256 3B:66:FC:44:CF:E9:6B:61:BD:F7:11:7F:A1:4B:6F:AA:EA:7E:A4:53:CE:95:FC:6D:28:C1:37:5E:85:D4:09:0D\r\na=setup:actpass\r\na=mid:audio\r\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=recvonly\r\na=rtcp-mux\r\na=rtpmap:111 opus/48000/2\r\na=rtcp-fb:111 transport-cc\r\na=fmtp:111 minptime=10;useinbandfec=1\r\na=rtpmap:103 isac/16000\r\na=rtpmap:104 isac/32000\r\na=rtpmap:9 G722/8000\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:106 cn/32000\r\na=rtpmap:105 cn/16000\r\na=rtpmap:13 cn/8000\r\na=rtpmap:126 telephone-event/8000\r\nm=video 9 UDP/TLS/RTP/SAVPF 100 101 107 116 117 96 97 99 98\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:YW4y\r\na=ice-pwd:wvgk5vUTTQoC2q+ys/QuExCQ\r\na=fingerprint:sha-256 3B:66:FC:44:CF:E9:6B:61:BD:F7:11:7F:A1:4B:6F:AA:EA:7E:A4:53:CE:95:FC:6D:28:C1:37:5E:85:D4:09:0D\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=extmap:4 urn:3gpp:video-orientation\r\na=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:6 http://www.webrtc.org/experiments/r...r\na=rtcp-mux\r\na=rtcp-rsize\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=rtcp-fb:100 transport-cc\r\na=rtpmap:101 VP9/90000\r\na=rtcp-fb:101 ccm fir\r\na=rtcp-fb:101 nack\r\na=rtcp-fb:101 nack pli\r\na=rtcp-fb:101 goog-remb\r\na=rtcp-fb:101 transport-cc\r\na=rtpmap:107 H264/90000\r\na=rtcp-fb:107 ccm fir\r\na=rtcp-fb:107 nack\r\na=rtcp-fb:107 nack pli\r\na=rtcp-fb:107 goog-remb\r\na=rtcp-fb:107 transport-cc\r\na=fmtp:107 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\na=rtpmap:116 red/90000\r\na=rtpmap:117 ulpfec/90000\r\na=rtpmap:96 rtx/90000\r\na=fmtp:96 apt=100\r\na=rtpmap:97 rtx/90000\r\na=fmtp:97 apt=101\r\na=rtpmap:99 rtx/90000\r\na=fmtp:99 apt=107\r\na=rtpmap:98 rtx/90000\r\na=fmtp:98 apt=116\r\n",
"info" : "277896/150305",
"record" : false,
"width" : 0,
"height" : 0,
"bitrate" : 0,
"quality" : 0,
"mediaProvider" : "WebRTC",
"token" : "UKgRtFcYKCGw1SGmxBGIWDqKXVDvkZ_x3NQv20wFBsg8nu5SwxsWtWL7IzFINnV8Xf4AusSho4ezfpxZ19CsNyPz1p8fYPzCKLf7zYf47dobNvNLlwe6DDSw2LLLbXYSSR6VVwYSq3MXY8vRh4hxoJXR-pFFrDQ7x4zMTtjxuOJX-DmA_rYDG5IxKLqo7izW3yWHwBqUvtKgbSRsuFWwrAMUZ-FmMqGpbaXg-RDLzXISYRnOvsTkEcWFrAN0Nno1O3OhlIWXpMLVWym7biUKmpDJ86nbiBcircK-HtfVgTE552HkpOuUK9kNwGloK6W9hahELYKt5BCVd4j2zLwVzBmZmWzMn7OPhr1iEiToR6XrsUjlmcphY1DLbacheOwCIGkj3ynPBd1m9xPOn3A9UWkLWVfwWdFQ-e6oaCCzYbzm88vSwb0bRjY76OBhBhGO0s6EsErFhvg8NI-3rpt_qxMQFeTaqqo3hPZPivh4rDnwZNIs"
}
 

Max

Administrator
Staff member
It is a known issue and it is fixed in latest builds.
In latest versions, if viewer has a high rate of losts, WCS will fire this warning event to inform subscriber that he has problems on the download channel.
This event will be raised if detected lost rate is greater than 10%.
This setting can be configured to decrease or increase the threshold:
Code:
webrtc_cc2_local_k_threshold=0.1
 

neogeo

Member
I added the above value and bandwidth events gone.
So there is frame loss (I wonder why it occurs) we just limit the threshold the event will fire, correct? The above value makes the threshold 10%, right? What was the threshold before I manually set it?
 

Max

Administrator
Staff member
So there is frame loss (I wonder why it occurs)
Any network (including LAN) has delays and lost packets.
WebRTC has a target to be really low-latency.
So if a video packed is delayed or lost by any reason, WebRTC will count this packet/frame in lost statistics (in latest version of builds).
I wonder why it occurs
It occurs because video packet rate is too high. For example 300 video packets per second for bitrate 2 Mbps.
So when you do just ping with packet rate 1 packet per second, you obviously don't see the packet lost or delays.
The above value makes the threshold 10%, right?
Yes. It is correct.
What was the threshold before I manually set it?
0.1 is default value (10%)
 

Homer

Member
i dont find any webrtc_cc2_local_k_threshold in flashphoner.properties .. do i need to put in the parameter?
 

Homer

Member
Yes, just put this parameter to flashphoner.properties and then restart WCS.
It doesnt work for me tho. i've put it in and restarted the service. Im still getting
player.js:149 Not enough bandwidth, consider using lower video resolution or bitrate. Bandwidth 0 bitrate 535
player.js:149 Not enough bandwidth, consider using lower video resolution or bitrate. Bandwidth 0 bitrate 642
player.js:149 Not enough bandwidth, consider using lower video resolution or bitrate. Bandwidth 0 bitrate 803

on chrome debug console.

Here's the sample code:

<iframe id='fp_embed_player' src='https://my-domain.com/embed_player?...myStreamID&mediaProviders=WebRTC,MSE,WSPlayer' width="600" height="340" align="center" scrolling='no' allowfullscreen='no' marginwidth='0' marginheight='0' frameborder='1'></iframe></p>

but if i use port 9091 for the player and nonsecure socket port 8080 for the socket the warning Not enought bandwith will not appear, and the stream loads slower than https.
 

Attachments

Max

Administrator
Staff member
webrtc_cc2_local_k_threshold setting is obsolete, it has been replaced with webrtc_cc2_bitrate_overuse_event_threshold.

By default (i.e. if the setting is not specified in config flashphoner.properties), NOT_ENOUGH_BANDWIDTH event is raised when loss reaches 5% (webrtc_cc2_bitrate_overuse_event_threshold=0.05). Loss estimation period is one second.

Loss values are logged in client logs (WCS_HOME/logs/client_logs): "Packet loss on session" INFO messages.

On the server, webrtc_cc2_local_k_threshold must be replaced with webrtc_cc2_bitrate_overuse_event_threshold, and the server has to be restarted to apply the change.
 

Homer

Member
webrtc_cc2_local_k_threshold setting is obsolete, it has been replaced with webrtc_cc2_bitrate_overuse_event_threshold.

By default (i.e. if the setting is not specified in config flashphoner.properties), NOT_ENOUGH_BANDWIDTH event is raised when loss reaches 5% (webrtc_cc2_bitrate_overuse_event_threshold=0.05). Loss estimation period is one second.

Loss values are logged in client logs (WCS_HOME/logs/client_logs): "Packet loss on session" INFO messages.

On the server, webrtc_cc2_local_k_threshold must be replaced with webrtc_cc2_bitrate_overuse_event_threshold, and the server has to be restarted to apply the change.
correct me if im wrong , the correct parameter should be webrtc_cc2_bitrate_overuse_event_threshold=0.1 ?
 
Top