mirror of
https://github.com/owncast/owncast.git
synced 2025-11-02 20:23:29 +08:00
Tweak video bandwidth values to be < 10% over max
This commit is contained in:
@ -67,11 +67,9 @@ func (c *Libx264Codec) ExtraFilters() string {
|
||||
|
||||
// VariantFlags returns a string representing a single variant processed by this codec.
|
||||
func (c *Libx264Codec) VariantFlags(v *HLSVariant) string {
|
||||
bufferSize := int(float64(v.videoBitrate) * 1.2) // How often it checks the bitrate of encoded segments to see if it's too high/low.
|
||||
|
||||
return strings.Join([]string{
|
||||
fmt.Sprintf("-x264-params:v:%d \"scenecut=0:open_gop=0\"", v.index), // How often the encoder checks the bitrate in order to meet average/max values
|
||||
fmt.Sprintf("-bufsize:v:%d %dk", v.index, bufferSize),
|
||||
fmt.Sprintf("-bufsize:v:%d %dk", v.index, v.getBufferSize()),
|
||||
fmt.Sprintf("-profile:v:%d %s", v.index, "high"), // Encoding profile
|
||||
}, " ")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user