what is the highest bit rate in a livekit web call
# ask-ai
n
what is the highest bit rate in a livekit web call
✅ 1
t
Thanks for reaching out, rohit. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — you're asking about the highest bitrate you can get in a LiveKit web call. I’ll summarize what’s possible and what controls the top bitrate. Short answer • LiveKit does not enforce a single hard maximum bitrate for web calls. Bitrate is adaptive and determined by codec, client configuration, simulcast/SVC setup, browser/hardware limits, and current network conditions. What determines the practical maximum • Video codec (H.264, VP8/VP9, AV1) and whether you use a scalable codec with SVC. • Whether you publish simulcast layers (multiple resolutions/bitrates) or use SVC — simulcast/SVC affect how much bandwidth is used and how quality scales. • Client-side encoding settings (e.g.,
videoEncoding
, capture options) you set in the SDK. • Browser and device encoder capabilities and the end-user network capacity. Reference targets (recommended, not enforced maximums) • These are suggested bitrate targets to reach specific quality levels (not hard limits): ◦ Gaming at 1080p (H.264): ~8.5 Mbps ◦ Sports at 1080p (H.264): ~7.5 Mbps ◦ Webcam at 1080p (H.264): ~2.7 Mbps If you need a higher sustained bitrate • Configure your publisher encoding settings (simulcast layers or SVC modes) to increase target layer bitrates. • Use a codec that supports higher quality at given bitrates (or SVC for efficient scaling). • Ensure client devices and browsers support the desired encoding settings and have sufficient upstream capacity. If you want, I can help with next steps: • Tell me which codec and resolution you plan to use, and whether you’re using simulcast or SVC — I can suggest concrete
videoEncoding
/ capture settings to target a specific bitrate. • Or share the browser/device and the quality target (e.g., 1080p gaming at 8 Mbps) and I’ll provide example configuration guidance. Sources: An introduction to WebRTC Simulcast | LiveKit | Bringing Zoom's end-to-end optimizations to WebRTC | LiveKit | Configuring the LiveKit Client SDK for Optimal Video Quality | LiveKit | WebRTC Video Bitrate Guide | LiveKit, with interactive elements
n
give me a code example of setting a higher bitrate
t
Thanks — I’ll show a concise LiveKit Web SDK example that increases video bitrate by specifying encoding settings and simulcast layers. Below are two approaches: a single high-bitrate track, and simulcast with multiple layers (recommended for adaptive delivery). 1) Single high-bitrate publish (one track) • This sets a higher max bitrate for the published video track.
Copy code
import { createLocalVideoTrack, Room } from "livekit-client";

// create a high-bitrate track by setting video encoding maxBitrate
const videoOptions = {
  name: "camera",
  // resolution/frame rate controlled by constraints
  constraints: { width: 1920, height: 1080, frameRate: 30 },
  // pass encoding parameters - maxBitrate in bits per second
  // note: some browsers may ignore values beyond what they support
  videoEncoding: {
    maxBitrate: 8_500_000 // 8.5 Mbps
  }
};

async function publishHighBitrate(room) {
  // create track with options
  const track = await createLocalVideoTrack(videoOptions);
  // publish to the room (use room.localParticipant.publishTrack if you already have a room)
  await room.localParticipant.publishTrack(track);
}
2) Simulcast (multiple layers) — recommended for adaptive networks • Publish multiple simulcast layers so receivers get the best layer their connection supports.
Copy code
import { createLocalVideoTrack } from "livekit-client";

// simulcast with explicit layers; each layer can have its own maxBitrate
const videoOptionsSimulcast = {
  name: "camera-simulcast",
  constraints: { width: 1920, height: 1080, frameRate: 30 },
  simulcast: true,
  // provide encoding parameters per layer (ordered: high -> low)
  videoEncoding: [
    { scaleResolutionDownBy: 1, maxBitrate: 8_500_000 }, // 1080p high layer ~8.5 Mbps
    { scaleResolutionDownBy: 2, maxBitrate: 2_700_000 }, // 540p mid layer ~2.7 Mbps
    { scaleResolutionDownBy: 4, maxBitrate: 600_000 }    // 270p low layer ~600 kbps
  ]
};

async function publishSimulcast(room) {
  const track = await createLocalVideoTrack(videoOptionsSimulcast);
  await room.localParticipant.publishTrack(track);
}
Notes and tips • Bitrates are specified in bits per second (bps). • Browsers and device encoders may cap or ignore very high values—these settings are targets, not guaranteed hard limits. • Simulcast is recommended for best adaptive behavior: receivers subscribe to the layer that matches their network. • If you use SVC-capable codecs (e.g., VP9/AV1 with SVC), configure codec/scalability mode as appropriate instead of simulcast. Would you like: • An example that shows how to adjust bitrate dynamically at runtime? • A full example including connection and publish flow (room connect, create tracks, publish)?, with interactive elements