feat: simplify console logs

This commit is contained in:
Gabe Kangas 2023-06-05 08:44:14 -07:00
parent a38acbc523
commit 3ed5a0b7f3
No known key found for this signature in database
GPG key ID: 4345B2060657F330
4 changed files with 15 additions and 8 deletions

View file

@ -76,7 +76,9 @@ func Start() error {
go rtmp.Start(setStreamAsConnected, setBroadcaster)
rtmpPort := data.GetRTMPPortNumber()
log.Infof("RTMP is accepting inbound streams on port %d.", rtmpPort)
if rtmpPort != 1935 {
log.Infof("RTMP is accepting inbound streams on port %d.", rtmpPort)
}
webhooks.SetupWebhooks(GetStatus)
@ -108,7 +110,7 @@ func transitionToOfflineVideoStreamContent() {
}
_transcoder.SetInput(offlineFilePath)
go _transcoder.Start()
go _transcoder.Start(false)
// Copy the logo to be the thumbnail
logo := data.GetLogoPath()

View file

@ -65,7 +65,7 @@ func setStreamAsConnected(rtmpOut *io.PipeReader) {
_currentBroadcast = nil
}
_transcoder.SetStdin(rtmpOut)
_transcoder.Start()
_transcoder.Start(true)
}()
go webhooks.SendStreamStatusEvent(models.StreamStarted)

View file

@ -55,7 +55,6 @@ type HLSVariant struct {
isVideoPassthrough bool // Override all settings and just copy the video stream
isAudioPassthrough bool // Override all settings and just copy the audio stream
}
// VideoSize is the scaled size of the video output.
@ -112,11 +111,13 @@ func (t *Transcoder) Stop() {
}
// Start will execute the transcoding process with the settings previously set.
func (t *Transcoder) Start() {
func (t *Transcoder) Start(shouldLog bool) {
_lastTranscoderLogMessage = ""
command := t.getString()
log.Infof("Video transcoder started using %s with %d stream variants.", t.codec.DisplayName(), len(t.variants))
if shouldLog {
log.Infof("Processing video using codec %s with %d output qualities configured.", t.codec.DisplayName(), len(t.variants))
}
createVariantDirectories()
if config.EnableDebugFeatures {

View file

@ -433,8 +433,12 @@ func Start() error {
Handler: compress(m),
}
log.Infof("Web server is listening on IP %s port %d.", ip, port)
log.Infoln("The web admin interface is available at /admin.")
if ip != "0.0.0.0" {
log.Infof("Web server is listening at %s:%d.", ip, port)
} else {
log.Infof("Web server is listening on port %d.", port)
}
log.Infoln("Configure this server by visiting /admin.")
return server.ListenAndServe()
}