Take control over your live stream video by running it yourself. Streaming + chat out of the box.
HTML activitypubbroadcastingchatdecentralizedfederationfediversegolanghacktoberfesthlslivelivestreamowncastrtmpself-hostedstreaming-videovideo
Make setting the segment length optional
Gabe Kangas07b7ac26a6f0
diff --git a/config-example.yaml b/config-example.yamlindex 9000393387..026befb473 100644--- a/config-example.yaml+++ b/config-example.yaml@@ -31,7 +31,6 @@ instanceDetails:url: http://soundcloud.com/owncastvideoSettings:- chunkLengthInSeconds: 4streamingKey: abc123offlineContent: static/offline.m4v # Is displayed when a stream endsdiff --git a/config/config.go b/config/config.goindex 35e0f3c69c..71910b3ea4 100644--- a/config/config.go+++ b/config/config.go@@ -155,6 +155,15 @@ func (c *config) GetFFMpegPath() string {return path}+func (c *config) GetVideoSegmentSecondsLength() int {+ if c.VideoSettings.ChunkLengthInSeconds != 0 {+ return c.VideoSettings.ChunkLengthInSeconds+ }++ // Default+ return 4+}+//Load tries to load the configuration filefunc Load(filePath string, versionInfo string) error {Config = new(config)diff --git a/core/ffmpeg/transcoder.go b/core/ffmpeg/transcoder.goindex ff26e4a740..c7bb649f09 100644--- a/core/ffmpeg/transcoder.go+++ b/core/ffmpeg/transcoder.go@@ -190,7 +190,7 @@ func NewTranscoder() Transcoder {transcoder.playlistOutputPath = config.Config.PublicHLSPathtranscoder.input = utils.GetTemporaryPipePath()- transcoder.segmentLengthSeconds = config.Config.VideoSettings.ChunkLengthInSeconds+ transcoder.segmentLengthSeconds = config.Config.GetVideoSegmentSecondsLength()qualities := config.Config.VideoSettings.StreamQualitiesif len(qualities) == 0 {