Skip to content

Commit

Permalink
explicitly set all options for presets (#651)
Browse files Browse the repository at this point in the history
  • Loading branch information
frostbyte73 authored Apr 11, 2024
1 parent 1ed7616 commit 2495209
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion pkg/config/encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2495209

Please sign in to comment.