diff --git a/config-example.yaml b/config-example.yaml index c47043970..f134e51e0 100644 --- a/config-example.yaml +++ b/config-example.yaml @@ -37,17 +37,10 @@ videoSettings: offlineContent: static/offline.m4v # Is displayed when a stream ends streamQualities: - # 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: superfast files: maxNumberInPlaylist: 30 diff --git a/core/ffmpeg/transcoder.go b/core/ffmpeg/transcoder.go index 502a66959..3b9bc872b 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) }