What should be the best range of packet loss while...
# ask-ai
s
What should be the best range of packet loss while testing the livekit?
t
Thanks for reaching out, Nouman. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
The acceptable range of packet loss while testing LiveKit depends on the type of codec and whether Forward Error Correction (FEC) is enabled. Here are the details: Audio Codecs: • Opus (without FEC): ◦ Excellent quality: 0% to ~2.5% packet loss ◦ Good quality: ~2.5% to ~7.5% packet loss ◦ Poor quality: ≥7.5% packet loss • Opus (with FEC enabled): ◦ Excellent quality: 0% to ~3.75% packet loss ◦ Good quality: ~3.75% to ~11.25% packet loss ◦ Poor quality: ≥11.25% packet loss • RED Audio (without FEC): ◦ Excellent quality: 0% to ~5% packet loss ◦ Good quality: ~5% to ~15% packet loss ◦ Poor quality: ≥15% packet loss • RED Audio (with FEC enabled): ◦ Excellent quality: 0% to ~7.5% packet loss ◦ Good quality: ~7.5% to ~22.5% packet loss ◦ Poor quality: ≥22.5% packet loss Video Codecs (e.g., VP8, VP9, H.264): • Excellent quality: 0% to ~2% packet loss • Good quality: ~2% to ~6% packet loss • Poor quality: ≥6% packet loss These thresholds are used to classify connection quality as Excellent, Good, or Poor. Audio codecs with FEC are more resilient to packet loss compared to those without. Sources: pkg/sfu/buffer/fps_test.go
s
I have self hosted livekit on digital ocean using helm. I do not know about the codecs
t
Hey there! I totally get that setting up a self-hosted LiveKit instance can involve some nuanced testing. I'm wondering if you could tell me a bit more about what you're checking out - are you focusing on audio, video, or both? Knowing that will help me give you the most accurate advice about packet loss thresholds that'll work best for your specific setup. I'm here to help you nail this! 😊
s
both audio and video
t
Hey there! 👋 I totally get you're diving into testing audio and video on your self-hosted LiveKit setup. Let me break down the packet loss thresholds in a way that'll help you understand exactly what's happening with your media quality. Audio: • Opus (without FEC): ◦ Excellent quality: 0% to ~2.5% packet loss ◦ Good quality: ~2.5% to ~7.5% packet loss ◦ Poor quality: ≥7.5% packet loss • Opus (with FEC enabled): ◦ Excellent quality: 0% to ~3.75% packet loss ◦ Good quality: ~3.75% to ~11.25% packet loss ◦ Poor quality: ≥11.25% packet loss • RED Audio (without FEC): ◦ Excellent quality: 0% to ~5% packet loss ◦ Good quality: ~5% to ~15% packet loss ◦ Poor quality: ≥15% packet loss • RED Audio (with FEC enabled): ◦ Excellent quality: 0% to ~7.5% packet loss ◦ Good quality: ~7.5% to ~22.5% packet loss ◦ Poor quality: ≥22.5% packet loss Video (e.g., VP8, VP9, H.264): • Excellent quality: 0% to ~2% packet loss • Good quality: ~2% to ~6% packet loss • Poor quality: ≥6% packet loss Not sure about the codecs you're using? No worries! You can always check your LiveKit configuration or logs to figure out what's running behind the scenes. If you need any help navigating this, I'm right here to help you out. Just give me a shout! 😊
s
what should codecs do?
t
Hey there! Let's talk about codecs in LiveKit - they're like the unsung heroes of real-time communication. Think of them as the behind-the-scenes wizards that make sure your audio and video chats run smoothly and efficiently. Core Functions: • Media Encoding and Decoding: Imagine codecs as digital translators that squeeze your raw audio and video data into a compact package for easy network travel, then magically expand it back to crystal-clear quality when it reaches the other side. • Quality and Bandwidth Management: These clever tools help you find the perfect balance between video quality and network performance - kind of like choosing the right outfit for different occasions! Supported Codecs: • Video Codecs: We've got H.264, VP8, VP9 (including SVC), and the cool new AV1 (including SVC) - a lineup that'll make your video streaming dreams come true. • Audio Codecs: OPUS and AAC are here to make sure your sound is crisp and clear. Advanced Features: • Scalable Video Coding (SVC): For VP9 and AV1, this is like having a super-smart video assistant that optimizes your bitrate, lets you switch layers instantly, and handles multiple video streams like a pro. Configuration: • You can tweak codec settings when joining a room, customize per track, or use the LiveKit Cloud dashboard - totally flexible! • LiveKit's got your back, dynamically managing codecs to keep your communication smooth across different devices and network conditions. Bottom line: Codecs are the secret sauce that keeps your audio and video communication top-notch, no matter what challenges your network throws their way. Pretty cool, right? Sources: Video codecs | LiveKit Docs | livekit/livekit_models.pb.go | Codecs and more | LiveKit Docs | rtp/codecs.go
s
need codecs here
Copy code
livekit:
  port: 7880
  rtc:
    tcp_port: 7881
    port_range_start: 50000
    port_range_end: 60000
    use_external_ip: true
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!
s
i am trying to say that put codecs section which best here in the configuration livekit: port: 7880 rtc: tcp_port: 7881 port_range_start: 50000 port_range_end: 60000 use_external_ip: true
default codecs
if iam using helm and not specify it
fot livekit deployment