mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-10 08:27:04 +00:00
Merge pull request #2085 from vitorpamplona/claude/improve-video-quality-6JY0R
Improve video call quality with 720p resolution and bitrate limiting
This commit is contained in:
+10
-2
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user