Give transcoder a larger codec buffer size.

To give the codec a bit more breathing room with compression to maybe
improve possible blockiness in high movement scenes.
This commit is contained in:
Gabe Kangas
2021-11-30 13:26:51 -08:00
parent 83eb9229ad
commit ba906e2609
5 changed files with 6 additions and 6 deletions

View File

@ -75,12 +75,12 @@ func (v *HLSVariant) getAllocatedVideoBitrate() int {
// getMaxVideoBitrate returns the maximum video bitrate we allow the encoder to support.
func (v *HLSVariant) getMaxVideoBitrate() int {
return int(float64(v.getAllocatedVideoBitrate()) + float64(v.getAllocatedVideoBitrate())*0.07)
return int(float64(v.getAllocatedVideoBitrate()) * 1.08)
}
// getBufferSize returns how often it checks the bitrate of encoded segments to see if it's too high/low.
func (v *HLSVariant) getBufferSize() int {
return int(float64(v.getAllocatedVideoBitrate()) * 0.5)
return int(float64(v.getMaxVideoBitrate()))
}
// getString returns a WxH formatted getString for scaling video output.