aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/DynamicHlsController.cs
diff options
context:
space:
mode:
authorgnattu <gnattu@users.noreply.github.com>2024-07-18 00:35:40 +0800
committerGitHub <noreply@github.com>2024-07-17 12:35:40 -0400
commit8851ace5436c6a22b9489f88d20e1aab582ffddf (patch)
treea5d35385bb6a94e0d42ee81e877e78343df0cdad /Jellyfin.Api/Controllers/DynamicHlsController.cs
parentd6051d9d7edf876fe8b86cb95b4af3599aecdb7b (diff)
Enable Dolby AC-4 decoder (#11486)
Diffstat (limited to 'Jellyfin.Api/Controllers/DynamicHlsController.cs')
-rw-r--r--Jellyfin.Api/Controllers/DynamicHlsController.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Jellyfin.Api/Controllers/DynamicHlsController.cs b/Jellyfin.Api/Controllers/DynamicHlsController.cs
index 68602c80d..2201225a8 100644
--- a/Jellyfin.Api/Controllers/DynamicHlsController.cs
+++ b/Jellyfin.Api/Controllers/DynamicHlsController.cs
@@ -1735,6 +1735,13 @@ public class DynamicHlsController : BaseJellyfinApiController
}
}
+ if (state.AudioStream is not null && state.AudioStream.CodecTag.Equals("ac-4", StringComparison.Ordinal))
+ {
+ // ac-4 audio tends to hava a super weird sample rate that will fail most encoders
+ // force resample it to 48KHz
+ args += " -ar 48000";
+ }
+
if (state.OutputAudioSampleRate.HasValue)
{
args += " -ar " + state.OutputAudioSampleRate.Value.ToString(CultureInfo.InvariantCulture);