diff options
| author | gnattu <gnattu@users.noreply.github.com> | 2024-04-08 21:42:47 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-08 07:42:47 -0600 |
| commit | 6b6aab04ceadfd43a6bd0abb416b08006ff1ca6c (patch) | |
| tree | 1abb254dd03e71321207f80922529e3a21cb3853 /MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | |
| parent | 3a8e65893283d3f8759170ce72b050e0e632b280 (diff) | |
Fix apple audio codecs (#11315)
Diffstat (limited to 'MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs')
| -rw-r--r-- | MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index 250e0143f..717b53a0b 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -107,7 +107,6 @@ namespace MediaBrowser.Controller.MediaEncoding { "wmav2", 2 }, { "libmp3lame", 2 }, { "libfdk_aac", 6 }, - { "aac_at", 6 }, { "ac3", 6 }, { "eac3", 6 }, { "dca", 6 }, @@ -752,6 +751,15 @@ namespace MediaBrowser.Controller.MediaEncoding return "dca"; } + if (string.Equals(codec, "alac", StringComparison.OrdinalIgnoreCase)) + { + // The ffmpeg upstream breaks the AudioToolbox ALAC encoder in version 6.1 but fixes it in version 7.0. + // Since ALAC is lossless in quality and the AudioToolbox encoder is not faster, + // its only benefit is a smaller file size. + // To prevent problems, use the ffmpeg native encoder instead. + return "alac"; + } + return codec.ToLowerInvariant(); } |
