Try different resolution, bitrate and fps values both with UDP and TCP transport to see which would give better result. E.g., if bandwidth allows - increase bitrate and fps, and if bandwidth is low - decrease bitrate, fps and resolution.
The Media Devices example can be used for the tests...