nice-room-70150
03/27/2026, 5:50 AMtall-airline-16756
03/27/2026, 5:50 AMtall-airline-16756
03/27/2026, 5:51 AMvideoEncoding, 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 elementsnice-room-70150
03/27/2026, 5:52 AMtall-airline-16756
03/27/2026, 5:52 AMimport { 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.
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