Take control over your live stream video by running it yourself. Streaming + chat out of the box.
HTML activitypubbroadcastingchatdecentralizedfederationfediversegolanghacktoberfesthlslivelivestreamowncastrtmpself-hostedstreaming-videovideo
Add default video settings if none are provided
Gabe Kangas64a490c88db5
diff --git a/config-example.yaml b/config-example.yamlindex c470439702..f134e51e02 100644--- a/config-example.yaml+++ b/config-example.yaml@@ -37,17 +37,10 @@ videoSettings:offlineContent: static/offline.m4v # Is displayed when a stream endsstreamQualities:- # Pass through the exact video and audio that you're streaming.- - full:- videoPassthrough: true- audioPassthrough: true-# Transcode the video to a lower bitrate and resize- # - low:- # videoBitrate: 700- # scaledWidth: 600- # audioPassthrough: true- # encoderPreset: superfast+ - medium:+ videoBitrate: 800+ encoderPreset: superfastfiles:maxNumberInPlaylist: 30diff --git a/core/ffmpeg/transcoder.go b/core/ffmpeg/transcoder.goindex 502a669599..3b9bc872b4 100644--- a/core/ffmpeg/transcoder.go+++ b/core/ffmpeg/transcoder.go@@ -192,7 +192,14 @@ func NewTranscoder() Transcoder {transcoder.input = utils.GetTemporaryPipePath()transcoder.segmentLengthSeconds = config.Config.VideoSettings.ChunkLengthInSeconds- for index, quality := range config.Config.VideoSettings.StreamQualities {+ qualities := config.Config.VideoSettings.StreamQualities+ if len(qualities) == 0 {+ defaultQuality := config.StreamQuality{}+ defaultQuality.VideoBitrate = 1000+ defaultQuality.EncoderPreset = "superfast"+ qualities = append(qualities, defaultQuality)+ }+ for index, quality := range qualities {variant := getVariantFromConfigQuality(quality, index)transcoder.AddVariant(variant)}