aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/DynamicHlsController.cs
diff options
context:
space:
mode:
authortheopeuchlestrade <83510973+theopeuchlestrade@users.noreply.github.com>2026-10-05 19:19:10 -0400
committerCody Robibero <cody@robibe.ro>2026-10-05 19:19:10 -0400
commit32efb47601d3ce4174f61a66181d9e4665288c92 (patch)
treee0818ea584c7ab7ea67fb358ec8ceca5392f7938 /Jellyfin.Api/Controllers/DynamicHlsController.cs
parentf89279fc4bd33d47623284ad337d3bc5aa6dd282 (diff)
Backport pull request #18300 from jellyfin/release-12.z
Use hvc1 for Dolby Vision profile 8 Original-merge: 173ee6947286d36cdb0ba86bbe9676770c57e27b Merged-by: crobibero <cody@robibe.ro> Backported-by: Cody Robibero <cody@robibe.ro>
Diffstat (limited to 'Jellyfin.Api/Controllers/DynamicHlsController.cs')
-rw-r--r--Jellyfin.Api/Controllers/DynamicHlsController.cs13
1 files changed, 11 insertions, 2 deletions
diff --git a/Jellyfin.Api/Controllers/DynamicHlsController.cs b/Jellyfin.Api/Controllers/DynamicHlsController.cs
index dc0a6b2da9..6df76de0b4 100644
--- a/Jellyfin.Api/Controllers/DynamicHlsController.cs
+++ b/Jellyfin.Api/Controllers/DynamicHlsController.cs
@@ -1778,6 +1778,16 @@ public class DynamicHlsController : BaseJellyfinApiController
}
/// <summary>
+ /// Selects the HEVC Dolby Vision sample entry tag.
+ /// </summary>
+ /// <param name="stream">The video stream.</param>
+ /// <returns>The MP4 sample entry tag.</returns>
+ internal static string GetDolbyVisionHevcCodecTag(MediaStream stream)
+ {
+ return stream.DvProfile == 8 ? "hvc1" : "dvh1";
+ }
+
+ /// <summary>
/// Gets the video arguments for transcoding.
/// </summary>
/// <param name="state">The <see cref="StreamState"/>.</param>
@@ -1819,8 +1829,7 @@ public class DynamicHlsController : BaseJellyfinApiController
{
if (isActualOutputVideoCodecHevc)
{
- // Use hvc1 for 8.4. This is what Dolby uses for its official sample streams. Tagging with dvh1 would break some players with strict tag checking like Apple Safari.
- var codecTag = state.VideoStream.VideoRangeType == VideoRangeType.DOVIWithHLG ? "hvc1" : "dvh1";
+ var codecTag = GetDolbyVisionHevcCodecTag(state.VideoStream);
args += $" -tag:v:0 {codecTag} -strict -2";
}
else if (isActualOutputVideoCodecAv1)