Is there a way to detect users bandwidth and adjus...
# ask-ai
c
Is there a way to detect users bandwidth and adjust the bitrate of an ai avatar accordingly
t
Thanks for reaching out, Aaron. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'm glad you asked about how LiveKit handles video quality! It automatically detects user bandwidth and adjusts video quality for all video tracks, including AI avatars, by using WebRTC congestion control and simulcast mechanisms. This way, the video quality smoothly adapts to changing network conditions, giving you a better experience. To help you get the best bitrate for your AI avatar, here are a few tips: • Make sure your AI avatar is published as a video track with the right settings, like
maxBitrate
and
resolution
. • Try enabling
adaptiveStream
in the client SDK—this helps optimize bandwidth based on the video element’s visibility and size. • Also, using SVC codecs such as AV1 or VP9 can offer better scalability and smoother quality adjustments. If you have any specific needs, like real-time bandwidth estimation for analytics or want to explore custom configurations, please feel free to reach out. I’m here to help guide you through it! Sources: lib/src/core/transport.dart | livekit-plugins/livekit-plugins-bithuman/README.md | Bringing Zoom's end-to-end optimizations to WebRTC | Bringing Zoom's end-to-end optimizations to WebRTC | src/room/PCTransport.ts
c
Will this work for Simli Avatar
t
LiveKit offers wonderful features like bandwidth detection and bitrate adjustment for video tracks using simulcast and adaptive streaming. That said, it’s not entirely clear yet if the Simli Avatar video stream is taking advantage of these mechanisms. To find out if the Simli Avatar is benefiting from these optimizations, you might want to: • Check whether the Simli Avatar video track is published with multiple encoding layers (simulcast). • Take a look at server logs or track metadata to see if the StreamAllocator is dynamically adjusting layers for the Avatar. If you’d like, I’m here to help guide you through inspecting track settings or testing simulcast for the Simli Avatar. Just let me know, and we can work through it together! Sources: Bringing Zoom's end-to-end optimizations to WebRTC | A Tale of Two Protocols: WebRTC vs. HLS for Live Streaming | Simli virtual avatar integration guide | LiveKit Docs | Simli virtual avatar integration guide | LiveKit Docs | Bringing Zoom's end-to-end optimizations to WebRTC
c
Yes, please write an exhaustive analysis, implementation and testing outline
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!