Tame down encoding performance alerts. Closes #338
This commit is contained in:
@@ -89,7 +89,7 @@ func (s *FileWriterReceiverService) fileWritten(path string) {
|
||||
utils.StartPerformanceMonitor(performanceMonitorKey)
|
||||
s.callbacks.SegmentWritten(path)
|
||||
|
||||
if averagePerformance != 0 && averagePerformance > float64(config.Config.GetVideoSegmentSecondsLength()) {
|
||||
if averagePerformance != 0 && averagePerformance > float64(config.Config.GetVideoSegmentSecondsLength())*1.1 {
|
||||
if !_inWarningState {
|
||||
log.Warnln("slow encoding for variant", index, "if this continues you may see buffering or errors. troubleshoot this issue by visiting https://owncast.online/docs/troubleshooting/")
|
||||
_inWarningState = true
|
||||
|
||||
@@ -48,7 +48,7 @@ func IsStreamConnected() bool {
|
||||
// Kind of a hack. It takes a handful of seconds between a RTMP connection and when HLS data is available.
|
||||
// So account for that with an artificial buffer of four segments.
|
||||
timeSinceLastConnected := time.Since(_stats.LastConnectTime.Time).Seconds()
|
||||
if timeSinceLastConnected < float64(config.Config.GetVideoSegmentSecondsLength())*2.0 {
|
||||
if timeSinceLastConnected < float64(config.Config.GetVideoSegmentSecondsLength())*2.3 {
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user