Expose the knobs that actually decide video quality

Frame size alone does not make a picture sharp: LiveKit picks a
conservative bitrate for whatever resolution it is given, so 720p could
well look worse than a well-fed 480p. The encoder ceiling and codec are
now configurable, and the frame queue's memory budget with them, since
raising the resolution multiplies both the bytes per frame and the wait.

Startup logs what the track was published with, and the README explains
which knob to move first and what in the "video sync" line says the
machine has run out of headroom.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Leonid Pershin
2026-09-09 05:14:38 +03:00
co-authored by Claude Opus 5
parent 7a369cf9f2
commit a1596cd654
4 changed files with 92 additions and 6 deletions
+14
View File
@@ -90,6 +90,20 @@ VIDEO_WIDTH=640
VIDEO_HEIGHT=360
VIDEO_FPS=24
# Потолок битрейта кодировщика, кбит/с. 0 — оставить выбор LiveKit (он
# осторожен). Ориентиры: 360p ≈ 800, 480p ≈ 1500, 720p ≈ 2500-3500.
VIDEO_BITRATE_KBPS=0
# Кодек исходящей дорожки: auto (обычно VP8), vp8, h264, vp9, av1.
# h264 дешевле для процессора, vp9/av1 дают лучшую картинку на том же
# битрейте, но кодируются заметно дороже.
VIDEO_CODEC=auto
# Память под кадры, ожидающие своей секунды звука, МБ. Кадр 720p весит
# 1.4 МБ, 360p — 0.35 МБ, а ждать приходится несколько секунд, поэтому при
# повышении разрешения это значение нужно поднимать.
VIDEO_QUEUE_MB=64
# camera — картинка внутри плитки бота; screen — отдельной плиткой,
# как демонстрация экрана.
VIDEO_SOURCE=camera