From 249520937455cf2a8867e114a5beefc6b25f9d31 Mon Sep 17 00:00:00 2001 From: David Colburn Date: Thu, 11 Apr 2024 10:39:10 -0700 Subject: [PATCH] explicitly set all options for presets (#651) --- pkg/config/encoding.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkg/config/encoding.go b/pkg/config/encoding.go index b4148f21..53309118 100644 --- a/pkg/config/encoding.go +++ b/pkg/config/encoding.go @@ -25,33 +25,44 @@ func (p *PipelineConfig) applyPreset(preset livekit.EncodingOptionsPreset) { case livekit.EncodingOptionsPreset_H264_720P_30: p.Width = 1280 p.Height = 720 + p.Framerate = 30 p.VideoBitrate = 3000 case livekit.EncodingOptionsPreset_H264_720P_60: p.Width = 1280 p.Height = 720 p.Framerate = 60 + p.VideoBitrate = 4500 case livekit.EncodingOptionsPreset_H264_1080P_30: - // default + p.Width = 1920 + p.Height = 1080 + p.Framerate = 30 + p.VideoBitrate = 4500 case livekit.EncodingOptionsPreset_H264_1080P_60: + p.Width = 1920 + p.Height = 1080 p.Framerate = 60 p.VideoBitrate = 6000 case livekit.EncodingOptionsPreset_PORTRAIT_H264_720P_30: p.Width = 720 p.Height = 1280 + p.Framerate = 30 p.VideoBitrate = 3000 case livekit.EncodingOptionsPreset_PORTRAIT_H264_720P_60: p.Width = 720 p.Height = 1280 p.Framerate = 60 + p.VideoBitrate = 4500 case livekit.EncodingOptionsPreset_PORTRAIT_H264_1080P_30: p.Width = 1080 p.Height = 1920 + p.Framerate = 30 + p.VideoBitrate = 4500 case livekit.EncodingOptionsPreset_PORTRAIT_H264_1080P_60: p.Width = 1080