aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Helpers/DynamicHlsHelper.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Jellyfin.Api/Helpers/DynamicHlsHelper.cs')
-rw-r--r--Jellyfin.Api/Helpers/DynamicHlsHelper.cs17
1 files changed, 16 insertions, 1 deletions
diff --git a/Jellyfin.Api/Helpers/DynamicHlsHelper.cs b/Jellyfin.Api/Helpers/DynamicHlsHelper.cs
index 16e51151d..44e1c6d5a 100644
--- a/Jellyfin.Api/Helpers/DynamicHlsHelper.cs
+++ b/Jellyfin.Api/Helpers/DynamicHlsHelper.cs
@@ -754,7 +754,9 @@ public class DynamicHlsHelper
{
if (string.Equals(state.ActualOutputAudioCodec, "aac", StringComparison.OrdinalIgnoreCase))
{
- string? profile = state.GetRequestedProfiles("aac").FirstOrDefault();
+ string? profile = EncodingHelper.IsCopyCodec(state.OutputAudioCodec)
+ ? state.AudioStream?.Profile : state.GetRequestedProfiles("aac").FirstOrDefault();
+
return HlsCodecStringHelpers.GetAACString(profile);
}
@@ -788,6 +790,19 @@ public class DynamicHlsHelper
return HlsCodecStringHelpers.GetOPUSString();
}
+ if (string.Equals(state.ActualOutputAudioCodec, "truehd", StringComparison.OrdinalIgnoreCase))
+ {
+ return HlsCodecStringHelpers.GetTRUEHDString();
+ }
+
+ if (string.Equals(state.ActualOutputAudioCodec, "dts", StringComparison.OrdinalIgnoreCase))
+ {
+ // lavc only support encoding DTS core profile
+ string? profile = EncodingHelper.IsCopyCodec(state.OutputAudioCodec) ? state.AudioStream?.Profile : "DTS";
+
+ return HlsCodecStringHelpers.GetDTSString(profile);
+ }
+
return string.Empty;
}