Add global Downsampling feature (#1575)
* Add global downsampling feature * Default to Opus & consider player transcoder * Add a test case for DefaultDownsamplingFormat Co-authored-by: Deluan <deluan@navidrome.org>
This commit is contained in:
@@ -142,6 +142,10 @@ func selectTranscodingOptions(ctx context.Context, ds model.DataStore, mf *model
|
||||
if p, ok := request.PlayerFrom(ctx); ok {
|
||||
cBitRate = p.MaxBitRate
|
||||
}
|
||||
} else if reqBitRate > 0 && conf.Server.DefaultDownsamplingFormat != "" {
|
||||
// If no format is specified and no transcoding associated to the player, but a bitrate is specfied, and there is no transcoding set for the player, we use the default downsampling format
|
||||
log.Debug("Default Downsampling", "Using default downsampling format", conf.Server.DefaultDownsamplingFormat)
|
||||
cFormat = conf.Server.DefaultDownsamplingFormat
|
||||
}
|
||||
}
|
||||
if reqBitRate > 0 {
|
||||
|
||||
Reference in New Issue
Block a user