How to improve video quality on LiveKit. I feel th...
# ask-ai
t
How to improve video quality on LiveKit. I feel that the video quality is cut off through internet when compaing with local video track
t
Thanks for reaching out, Quinn. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'm glad you're looking to enhance your video quality on LiveKit! Here are some friendly tips that might help: • Choose the Right Codec: If you're working with limited network conditions, VP9 can give you better quality, while H264 is great for hardware-accelerated performance. • Set High-Quality Capture Resolution: Using
VideoCaptureOptions
, you can request higher resolutions like 1080p to start with a clearer base quality. • Enable Simulcast: This lets you publish multiple resolutions, so your video adapts smoothly to different network and device situations. • Enable Dynacast and Adaptive Streaming: These smart features help adjust video quality on the fly, depending on who’s watching and your network conditions. • Handle CPU Constraints: If you're on a device with less power, lowering video quality and turning off simulcast can really help reduce CPU load. If you'd like, I’m here to walk you through any of these steps in more detail. Just let me know how I can assist! Sources: Bringing Zoom's end-to-end optimizations to WebRTC | Optimizing Video Calls for Low-Powered Devices in LiveKit (JS SDK ≥ v2.14... | src/room/track/LocalVideoTrack.ts | lib/usePerfomanceOptimiser.ts | Configuring the Client SDK for Optimal Video Quality
t
Copy code
{
  videoCaptureDefaults: {
    deviceId: telehealthPreference.videoDeviceId ?? undefined,
    resolution: VideoPresets.h2160,
  },
  publishDefaults: {
    videoSimulcastLayers: [
      VideoPresets.h1440,
      VideoPresets.h1080,
      VideoPresets.h720,
    ],
    red: !e2eeEnabled,
    videoCodec: 'vp9',
    simulcast: true,
    audioPreset: AudioPresets.musicHighQuality,
  },
  audioCaptureDefaults: {
    deviceId: telehealthPreference.audioDeviceId ?? undefined,
    autoGainControl: true,
    echoCancellation: true,
    noiseSuppression: true,
  },
  adaptiveStream: true,
  dynacast: true,
  e2ee: e2eeEnabled ? { keyProvider, worker } : undefined,
}
i have device on Mac, so CPU is ok, still got lower quality on remote track, the local track is ok. which options i should change
t
I understand that the lower quality of remote video tracks compared to local ones can be a bit frustrating. This usually happens because LiveKit uses smart features like simulcast and adaptive streaming to optimize video quality based on things like network conditions, device performance, and how big the video appears on your screen. To help improve the remote video quality, here are a few friendly suggestions you might find useful: • Ensure Full-Screen Display: Try displaying the remote video in a larger video element. Smaller sizes might cause the system to use lower-quality layers. • Check Network Conditions: Make sure both the sender and receiver have good bandwidth and minimal packet loss for the best experience. • Simulcast Layers: You can adjust simulcast layers to include higher resolutions if needed. For example, adding
VideoPresets.h2160
to the
videoSimulcastLayers
might help. • Adaptive Stream: Adaptive streaming adjusts quality based on visibility automatically. You could try disabling it temporarily to see if that makes a difference. If you'd like, I’m here to help walk you through changing these settings or answer any questions you have. Just let me know! Sources: An introduction to WebRTC Simulcast | Bringing Zoom's end-to-end optimizations to WebRTC | Optimizing Video Calls for Low-Powered Devices in LiveKit (JS SDK ≥ v2.14...