* Check MaxAudioChannels for directAudioStream candidates
The current stream builder logic does not check the channel limit when determining if the audio stream can be directly used, and this can cause some undesired effects:
- A high channel count surround sound stream might be picked even if a stereo one exists when the user requires stereo audio.
- The user's preferred audio codec might not be respected during the downmix because the requested codec is now forced to be the same as the original source.
Signed-off-by: gnattu <gnattuoc@me.com>
* Fix unit test
Signed-off-by: gnattu <gnattuoc@me.com>
* Set correct transcode reason and target channels for unit test
Signed-off-by: gnattu <gnattuoc@me.com>
* Match old stream selection behavior
Signed-off-by: gnattu <gnattuoc@me.com>
* Fix reason matching
Signed-off-by: gnattu <gnattuoc@me.com>
---------
Signed-off-by: gnattu <gnattuoc@me.com>
* Changed `GetThemeMedia` to support SortBy/Order options
The `GetThemeMedia, `GetThemeVideos` and `GetThemeSongs` functions can optionally sort the results based based on passing an ItemSortBy type and a SortOrder.
This is intended to be used by jellyfin-web in order to allow users to control the order of theme playback.
See PR: https://github.com/jellyfin/jellyfin-web/pull/5714
* Update MediaBrowser.Controller/Entities/BaseItem.cs
Fix the `GetThemeVideos` two argument overload having both parameters defaulted.
For the two argument overload, both parameters are required.
Fix localization of audio title
Original-merge: f7a90b6383
Merged-by: Bond-009 <bond.009@outlook.com>
Backported-by: Joshua M. Boniface <joshua@boniface.me>
Some Audio codec will have a null CodecTag, check for that to avoid null reference
If the client already requests a specific sample rate, use that instead of our default sample rate for AC-4
Signed-off-by: gnattu <gnattuoc@me.com>
LAME's VBR mode only has advantage over a certain bitrate range. For very low and very high bitrate, use the ABR mode instead.
aac_at's CVBR mode produces very good quality and is not worse than its TVBR mode in blind testing. Use this mode for convenience.
The ffmpeg native aac encoder will have quality regression with its VBR mode. Always use CBR mode for ffmpeg's native aac encoder.
Signed-off-by: gnattu <gnattuoc@me.com>