Poor quality can be characterized in the following ways:
- Image resolution is grainy or pixelated: Often related to how the video is configured.
- Latency makes the video lag behind real-life circumstance: Often network or CPU related.
- Artifacting, or pixels blending between frames (frames out of order or lost): Often network related.
Are you using tailscale or some other VPN? If so, set the WEBRTC_INTERFACE environment variable in /var/lib/.bashrc to use the network interface used to connect to the public internet.
What is the intended quality of the video? The intended bitrates for each resolution are shown below. Poor network quality may cause the agent to reduce bitrate to reduce latency. You can also set the intended bitrate higher than 2048 by using the FORMANT_ENCODING_BITRATE environment variable.
Check the agent log; this may provide context pointing to one of the other issues on this page.
- Is there something suspicious about the video encoding logs?
- Gstreamer pipeline string is not what you expect (correct interface, quality, etc)
- If it is not using accelerated encoding, but you’re on a jetson, check
FORMANT_ACCELERATED_VIDEO_ENCODINGflag and remove it
- If you’re on a jetson you may need to force accelerated encoding off (envvar mentioned above).
- Encoder crashing or restarting
When you have adaptive bitrate on, packet loss will cause the Formant Agent to crush the bitrate until there is no packet loss. Adaptive bitrate is enabled by default. To disable adaptive bitrate:
Is the source video good quality? If the source only has low quality video, Formant will pass on the low quality video.
Is the teleop session occurring via TURN (would be displayed in bottom left corner)? This does not guarantee that performance will be poor, but can be a cause. All data is being relayed rather than transiting P2P. This is more common with some firewalls / routers; specifically: double or more NAT, ISP implemented CGNAT, or lack of UDP connectivity (either the robot side, client side, or both).
What is the ping/packet loss? High ping/packet loss network would make for a poor video experience. Try a tool like Packet Loss Test – Test Your Connection Quality . Note that even a few percent of packet loss can cause significant issues.
chrome://webrtc-internals to check if there are other issues with the network. Make sure the proper session is selected in teal at the top. Every WebRTC connection has a separate “tab” you can click on.
Check round trip latency for the selected (bold) candidate pair; there are numerous graphs that can be utilized to deduce network issues.
Try configuring the same stream for telemetry; when you see poor performance over teleop do you also see poor performance in the telemetry stream?
Is the device’s CPU super high? This can affect the performance of the video, especially latency.
If possible, turn down the video quality. It may be that the network can’t handle the data; if nothing else it is a good datapoint to test this.
A speed test should be executed on the robot side to confirm the WAN speed. It is common to see performance issues when a robot enters a cellular dead spot.
Is the video camera an IP camera that does not have h264b (h264 with baseline or constrained-baseline profile)?
You may need to use constant quality instead of constant bitrate.
Updated about 2 months ago