When is a turn server necessary?
Well, there is actually a lot of scenarios when TURN server is necessary.
- the following port range 1024-65536 blocked on Publisher/Receiver side
- one of the peers located under symmetric NAT
Review the definitions, according to RFC 3489
Full Cone NAT is one where all requests from the same internal IP address and port are mapped to the same external IP address and port. Furthermore, any external host can send a packet to the internal host, by sending a packet to the mapped external address.
Symmetric NAT is one where all requests from the same internal IP address and port, to a specific destination IP address and port, are mapped to the same external IP address and port. If the same host sends a packet with the same source address and port, but to a different destination, a different mapping is used. Furthermore, only the external host that receives a packet can send a UDP packet back to the internal host.
*An address should be taken to mean an IP Address with Port number.
Your internet provider blocks p2p connections - sometimes it's happened with ADSL providers.
As result, if you are going to use WebRTC in the worldwide production environment I advise you to set up your own TURN server or some of your users will not be able to use your WebRTC solutions.
Adaptive bitrate (ABR) in WebRTC
Adaptive bitrate for WebRTC enabled by default and it's not possible to disable it.
It's able to change FPS/resolution/bandwidth.
You can force the WebRTC to stay the current resolution with the following property:
HKEY_CURRENT_USER\Software\Medialooks\WebRTC\force_native_format = true (by default true).
Please note current property do not disable adaptive bitrate feature, only frame resolution changes.
The logic is the same for all encoders, but there might be differences on the receiver side. In most cases, we advise to use gpu_h264 (cpu_h264) encoders, but adaptive bitrate works with any WebRTC encoder - GPU or CPU based.