how to track the video quality fps, on going, whil...
# ask-ai
p
how to track the video quality fps, on going, while using livekit sdk.? can you tell me regarding this query?
t
Thanks for reaching out, kickrai02. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
It sounds like you want to monitor FPS in real time while using the LiveKit SDK. Here are the practical options: • Client-side via WebRTC stats: ◦ Periodically call
RTCPeerConnection.getStats()
and compute FPS from
framesSent
(sender) or
framesDecoded
(receiver) deltas for the video track. This gives ongoing FPS locally. Overview of WebRTC stats signals • SDK signal for quality drops: ◦ Listen for
ParticipantEvent.LocalTrackCpuConstrained
to detect CPU-driven quality reductions and react (e.g., lower resolution/disable effects). Details • Render-side measurement: ◦ Count rendered frames on your
<video>
element (e.g., timestamp frames and compute per-second counts) to gauge displayed FPS. • Centralized analytics (optional): ◦ Use LiveKit Cloud dashboards/Analytics API for per-track frame rate and bitrate in real time. Cloud • Analytics API If you’d like, I can share a minimal JS snippet that reads
getStats()
and computes FPS for a specific track. Sources: Bringing Zoom&#39;s end-to-end optimizations to WebRTC | An introduction to WebRTC Simulcast | Optimizing Video Calls for Low-Powered Devices in LiveKit (JS SDK ≥ v2.14.0... | Announcing LiveKit Cloud | Analytics API | LiveKit docs