From 07c78905e25f0df77f6cc840fe5ebd64c245f4ca Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 21:40:32 +0000 Subject: [PATCH] feat: improve video call quality from 480p to 720p Increase camera capture resolution from 640x480 to 1280x720 at 30fps and set a 1.5 Mbps max bitrate on the video sender for good 720p quality. https://claude.ai/code/session_01Co48ZKvPT5GX3mAjGHkNza --- .../amethyst/service/call/WebRtcCallSession.kt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/call/WebRtcCallSession.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/call/WebRtcCallSession.kt index 0713821760..0d8b50e3ca 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/call/WebRtcCallSession.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/call/WebRtcCallSession.kt @@ -164,7 +164,15 @@ class WebRtcCallSession( videoSource = peerConnectionFactory?.createVideoSource(false) localVideoTrack = peerConnectionFactory?.createVideoTrack("video0", videoSource).also { - peerConnection?.addTrack(it) + val sender = peerConnection?.addTrack(it) + // Set max bitrate to 1.5 Mbps for good 720p quality + sender?.let { s -> + val params = s.parameters + params.encodings.forEach { encoding -> + encoding.maxBitrateBps = 1_500_000 + } + s.parameters = params + } } startCamera() } @@ -183,7 +191,7 @@ class WebRtcCallSession( context, source.capturerObserver, ) - it.startCapture(640, 480, 30) + it.startCapture(1280, 720, 30) } }