Take control over your live stream video by running it yourself. Streaming + chat out of the box.
HTML activitypubbroadcastingchatdecentralizedfederationfediversegolanghacktoberfesthlslivelivestreamowncastrtmpself-hostedstreaming-videovideo
Make setting the offline content optional
Gabe Kangasfde5360883ec
diff --git a/config-example.yaml b/config-example.yamlindex dea953155b..b405017380 100644--- a/config-example.yaml+++ b/config-example.yaml@@ -25,7 +25,6 @@ instanceDetails:videoSettings:# Change this value and keep it secure. Treat it like a password to your live stream.streamingKey: abc123- offlineContent: static/offline.m4v # Is displayed when a stream ends// Determine the bitrate of your stream variants.// See https://github.com/gabek/owncast/blob/master/doc/configuration.md#video-quality for details.diff --git a/config/config.go b/config/config.goindex 938fcd18bd..dda05b0cb2 100644--- a/config/config.go+++ b/config/config.go@@ -197,6 +197,15 @@ func (c *config) GetMaxNumberOfReferencedSegmentsInPlaylist() int {return 20}+func (c *config) GetOfflineContentPath() string {+ if c.VideoSettings.OfflineContent != "" {+ return c.VideoSettings.OfflineContent+ }++ // This is relative to the webroot, not the project root.+ return "static/offline.m4"+}+//Load tries to load the configuration filefunc Load(filePath string, versionInfo string) error {Config = new(config)diff --git a/core/ffmpeg/ffmpeg.go b/core/ffmpeg/ffmpeg.goindex 5f8d6d0a38..21dc8010b7 100644--- a/core/ffmpeg/ffmpeg.go+++ b/core/ffmpeg/ffmpeg.go@@ -9,6 +9,6 @@ func ShowStreamOfflineState() {transcoder := NewTranscoder()transcoder.SetSegmentLength(10)transcoder.SetAppendToStream(true)- transcoder.SetInput(config.Config.VideoSettings.OfflineContent)+ transcoder.SetInput(config.Config.GetOfflineContentPath())transcoder.Start()}