瀏覽代碼

Add Dolby Vision testing

Signed-off-by: gnattu <gnattuoc@me.com>
gnattu 8 月之前
父節點
當前提交
118c583bff

+ 18 - 1
tests/Jellyfin.Model.Tests/Dlna/StreamBuilderTests.cs

@@ -35,6 +35,10 @@ namespace Jellyfin.Model.Tests
         [InlineData("Chrome", "mkv-vp9-vorbis-vtt-2600k", PlayMethod.DirectPlay)] // #6450
         [InlineData("Chrome", "mkv-vp9-vorbis-vtt-2600k", PlayMethod.DirectPlay)] // #6450
         [InlineData("Chrome", "mp4-h264-hi10p-aac-5000k", PlayMethod.DirectPlay)]
         [InlineData("Chrome", "mp4-h264-hi10p-aac-5000k", PlayMethod.DirectPlay)]
         [InlineData("Chrome", "mkv-h264-hi10p-aac-5000k-brokenfps", PlayMethod.Transcode, TranscodeReason.ContainerNotSupported, "Remux", "HLS.mp4")]
         [InlineData("Chrome", "mkv-h264-hi10p-aac-5000k-brokenfps", PlayMethod.Transcode, TranscodeReason.ContainerNotSupported, "Remux", "HLS.mp4")]
+        [InlineData("Chrome", "mp4-dvh1.05-eac3-15200k", PlayMethod.Transcode, TranscodeReason.VideoRangeTypeNotSupported | TranscodeReason.AudioCodecNotSupported, "Transcode", "HLS.mp4")]
+        [InlineData("Chrome", "mkv-dvhe.05-eac3-28000k", PlayMethod.Transcode, TranscodeReason.ContainerNotSupported | TranscodeReason.VideoRangeTypeNotSupported | TranscodeReason.AudioCodecNotSupported, "Transcode", "HLS.mp4")]
+        [InlineData("Chrome", "mkv-dvhe.08-eac3-15200k", PlayMethod.Transcode, TranscodeReason.ContainerNotSupported | TranscodeReason.VideoRangeTypeNotSupported | TranscodeReason.AudioCodecNotSupported, "Transcode", "HLS.mp4")]
+        [InlineData("Chrome", "mp4-dvhe.08-eac3-15200k", PlayMethod.Transcode, TranscodeReason.VideoRangeTypeNotSupported | TranscodeReason.AudioCodecNotSupported, "Transcode", "HLS.mp4")]
         // Firefox
         // Firefox
         [InlineData("Firefox", "mp4-h264-aac-vtt-2600k", PlayMethod.DirectPlay)] // #6450
         [InlineData("Firefox", "mp4-h264-aac-vtt-2600k", PlayMethod.DirectPlay)] // #6450
         [InlineData("Firefox", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.Transcode, TranscodeReason.AudioCodecNotSupported, "DirectStream", "HLS.mp4")] // #6450
         [InlineData("Firefox", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.Transcode, TranscodeReason.AudioCodecNotSupported, "DirectStream", "HLS.mp4")] // #6450
@@ -50,6 +54,10 @@ namespace Jellyfin.Model.Tests
         [InlineData("Firefox", "mkv-vp9-vorbis-vtt-2600k", PlayMethod.DirectPlay)] // #6450
         [InlineData("Firefox", "mkv-vp9-vorbis-vtt-2600k", PlayMethod.DirectPlay)] // #6450
         [InlineData("Firefox", "mp4-h264-hi10p-aac-5000k", PlayMethod.Transcode, TranscodeReason.ContainerNotSupported | TranscodeReason.VideoProfileNotSupported, "Transcode", "HLS.mp4")]
         [InlineData("Firefox", "mp4-h264-hi10p-aac-5000k", PlayMethod.Transcode, TranscodeReason.ContainerNotSupported | TranscodeReason.VideoProfileNotSupported, "Transcode", "HLS.mp4")]
         [InlineData("Firefox", "mkv-h264-hi10p-aac-5000k-brokenfps", PlayMethod.Transcode, TranscodeReason.ContainerNotSupported | TranscodeReason.VideoProfileNotSupported, "Transcode", "HLS.mp4")]
         [InlineData("Firefox", "mkv-h264-hi10p-aac-5000k-brokenfps", PlayMethod.Transcode, TranscodeReason.ContainerNotSupported | TranscodeReason.VideoProfileNotSupported, "Transcode", "HLS.mp4")]
+        [InlineData("Firefox", "mp4-dvh1.05-eac3-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported | TranscodeReason.AudioCodecNotSupported, "Transcode", "HLS.mp4")]
+        [InlineData("Firefox", "mkv-dvhe.05-eac3-28000k", PlayMethod.Transcode, TranscodeReason.ContainerNotSupported | TranscodeReason.VideoCodecNotSupported | TranscodeReason.AudioCodecNotSupported, "Transcode", "HLS.mp4")]
+        [InlineData("Firefox", "mkv-dvhe.08-eac3-15200k", PlayMethod.Transcode, TranscodeReason.ContainerNotSupported | TranscodeReason.VideoCodecNotSupported | TranscodeReason.AudioCodecNotSupported, "Transcode", "HLS.mp4")]
+        [InlineData("Firefox", "mp4-dvhe.08-eac3-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported | TranscodeReason.AudioCodecNotSupported, "Transcode", "HLS.mp4")]
         // Safari
         // Safari
         [InlineData("SafariNext", "mp4-h264-aac-vtt-2600k", PlayMethod.DirectPlay)] // #6450
         [InlineData("SafariNext", "mp4-h264-aac-vtt-2600k", PlayMethod.DirectPlay)] // #6450
         [InlineData("SafariNext", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectPlay)] // #6450
         [InlineData("SafariNext", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectPlay)] // #6450
@@ -62,6 +70,10 @@ namespace Jellyfin.Model.Tests
         [InlineData("SafariNext", "mp4-hevc-ac3-aacExt-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecTagNotSupported | TranscodeReason.AudioChannelsNotSupported, "DirectStream", "HLS.mp4")] // #6450
         [InlineData("SafariNext", "mp4-hevc-ac3-aacExt-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecTagNotSupported | TranscodeReason.AudioChannelsNotSupported, "DirectStream", "HLS.mp4")] // #6450
         [InlineData("SafariNext", "mp4-h264-hi10p-aac-5000k", PlayMethod.Transcode, TranscodeReason.VideoProfileNotSupported, "Remux", "HLS.mp4")]
         [InlineData("SafariNext", "mp4-h264-hi10p-aac-5000k", PlayMethod.Transcode, TranscodeReason.VideoProfileNotSupported, "Remux", "HLS.mp4")]
         [InlineData("SafariNext", "mkv-h264-hi10p-aac-5000k-brokenfps", PlayMethod.Transcode, TranscodeReason.ContainerNotSupported | TranscodeReason.VideoProfileNotSupported, "Remux", "HLS.mp4")]
         [InlineData("SafariNext", "mkv-h264-hi10p-aac-5000k-brokenfps", PlayMethod.Transcode, TranscodeReason.ContainerNotSupported | TranscodeReason.VideoProfileNotSupported, "Remux", "HLS.mp4")]
+        [InlineData("SafariNext", "mp4-dvh1.05-eac3-15200k", PlayMethod.DirectPlay)]
+        [InlineData("SafariNext", "mkv-dvhe.05-eac3-28000k", PlayMethod.Transcode, TranscodeReason.ContainerNotSupported | TranscodeReason.VideoCodecTagNotSupported | TranscodeReason.AudioChannelsNotSupported, "DirectStream", "HLS.mp4")]
+        [InlineData("SafariNext", "mkv-dvhe.08-eac3-15200k", PlayMethod.Transcode, TranscodeReason.ContainerNotSupported | TranscodeReason.VideoCodecTagNotSupported | TranscodeReason.AudioChannelsNotSupported, "DirectStream", "HLS.mp4")]
+        [InlineData("SafariNext", "mp4-dvhe.08-eac3-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecTagNotSupported | TranscodeReason.AudioChannelsNotSupported, "DirectStream", "HLS.mp4")]
         // AndroidPixel
         // AndroidPixel
         [InlineData("AndroidPixel", "mp4-h264-aac-srt-2600k", PlayMethod.DirectPlay)] // #6450
         [InlineData("AndroidPixel", "mp4-h264-aac-srt-2600k", PlayMethod.DirectPlay)] // #6450
         [InlineData("AndroidPixel", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectPlay)] // #6450
         [InlineData("AndroidPixel", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectPlay)] // #6450
@@ -167,6 +179,11 @@ namespace Jellyfin.Model.Tests
         [InlineData("Tizen4-4K-5.1", "mkv-vp9-aac-srt-2600k", PlayMethod.DirectPlay)]
         [InlineData("Tizen4-4K-5.1", "mkv-vp9-aac-srt-2600k", PlayMethod.DirectPlay)]
         [InlineData("Tizen4-4K-5.1", "mkv-vp9-ac3-srt-2600k", PlayMethod.DirectPlay)]
         [InlineData("Tizen4-4K-5.1", "mkv-vp9-ac3-srt-2600k", PlayMethod.DirectPlay)]
         [InlineData("Tizen4-4K-5.1", "mkv-vp9-vorbis-vtt-2600k", PlayMethod.DirectPlay)]
         [InlineData("Tizen4-4K-5.1", "mkv-vp9-vorbis-vtt-2600k", PlayMethod.DirectPlay)]
+        // WebOS 23
+        [InlineData("WebOS-23", "mkv-dvhe.08-eac3-15200k", PlayMethod.Transcode, TranscodeReason.VideoRangeTypeNotSupported, "Remux")]
+        [InlineData("WebOS-23", "mp4-dvh1.05-eac3-15200k", PlayMethod.DirectPlay)]
+        [InlineData("WebOS-23", "mp4-dvhe.08-eac3-15200k", PlayMethod.DirectPlay)]
+        [InlineData("WebOS-23", "mkv-dvhe.05-eac3-28000k", PlayMethod.Transcode, TranscodeReason.VideoRangeTypeNotSupported, "Remux")]
         // Non-HLS Progressive transcoding
         // Non-HLS Progressive transcoding
         [InlineData("Chrome-NoHLS", "mp4-h264-aac-vtt-2600k", PlayMethod.DirectPlay)] // #6450
         [InlineData("Chrome-NoHLS", "mp4-h264-aac-vtt-2600k", PlayMethod.DirectPlay)] // #6450
         [InlineData("Chrome-NoHLS", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.Transcode, TranscodeReason.AudioCodecNotSupported, "DirectStream", "http")] // #6450
         [InlineData("Chrome-NoHLS", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.Transcode, TranscodeReason.AudioCodecNotSupported, "DirectStream", "http")] // #6450
@@ -422,7 +439,7 @@ namespace Jellyfin.Model.Tests
                 // Full transcode
                 // Full transcode
                 if (transcodeMode.Equals("Transcode", StringComparison.Ordinal))
                 if (transcodeMode.Equals("Transcode", StringComparison.Ordinal))
                 {
                 {
-                    if ((streamInfo.TranscodeReasons & (StreamBuilder.ContainerReasons | TranscodeReason.DirectPlayError)) == 0)
+                    if ((streamInfo.TranscodeReasons & (StreamBuilder.ContainerReasons | TranscodeReason.DirectPlayError | TranscodeReason.VideoRangeTypeNotSupported)) == 0)
                     {
                     {
                         Assert.All(
                         Assert.All(
                             videoStreams,
                             videoStreams,

+ 355 - 0
tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-WebOS-23.json

@@ -0,0 +1,355 @@
+{
+    "MaxStreamingBitrate": 120000000,
+    "MaxStaticBitrate": 100000000,
+    "MusicStreamingTranscodingBitrate": 384000,
+    "DirectPlayProfiles": [
+        {
+            "Container": "webm",
+            "Type": "Video",
+            "VideoCodec": "vp8,vp9,av1",
+            "AudioCodec": "vorbis,opus"
+        },
+        {
+            "Container": "mp4,m4v",
+            "Type": "Video",
+            "VideoCodec": "h264,hevc,mpeg2video,vc1,vp9,av1",
+            "AudioCodec": "aac,ac3,eac3,mp2,pcm_s16le,pcm_s24le,opus,flac,vorbis"
+        },
+        {
+            "Container": "mkv",
+            "Type": "Video",
+            "VideoCodec": "h264,hevc,mpeg2video,vc1,vp9,av1",
+            "AudioCodec": "aac,ac3,eac3,mp2,pcm_s16le,pcm_s24le,opus,flac,vorbis"
+        },
+        {
+            "Container": "m2ts",
+            "Type": "Video",
+            "VideoCodec": "h264,vc1,mpeg2video",
+            "AudioCodec": "aac,ac3,eac3,mp2,pcm_s16le,pcm_s24le,opus,flac,vorbis"
+        },
+        {
+            "Container": "wmv",
+            "Type": "Video",
+            "VideoCodec": "",
+            "AudioCodec": ""
+        },
+        {
+            "Container": "ts,mpegts",
+            "Type": "Video",
+            "VideoCodec": "h264,hevc,vc1,mpeg2video",
+            "AudioCodec": "aac,ac3,eac3,mp2,pcm_s16le,pcm_s24le,opus,flac,vorbis"
+        },
+        {
+            "Container": "asf",
+            "Type": "Video",
+            "VideoCodec": "",
+            "AudioCodec": ""
+        },
+        {
+            "Container": "avi",
+            "Type": "Video",
+            "VideoCodec": "",
+            "AudioCodec": "aac,ac3,eac3,mp2,pcm_s16le,pcm_s24le,opus,flac,vorbis"
+        },
+        {
+            "Container": "mpg",
+            "Type": "Video",
+            "VideoCodec": "",
+            "AudioCodec": "aac,ac3,eac3,mp2,pcm_s16le,pcm_s24le,opus,flac,vorbis"
+        },
+        {
+            "Container": "mpeg",
+            "Type": "Video",
+            "VideoCodec": "",
+            "AudioCodec": "aac,ac3,eac3,mp2,pcm_s16le,pcm_s24le,opus,flac,vorbis"
+        },
+        {
+            "Container": "mov",
+            "Type": "Video",
+            "VideoCodec": "h264",
+            "AudioCodec": "aac,ac3,eac3,mp2,pcm_s16le,pcm_s24le,opus,flac,vorbis"
+        },
+        {
+            "Container": "opus",
+            "Type": "Audio"
+        },
+        {
+            "Container": "webm",
+            "AudioCodec": "opus",
+            "Type": "Audio"
+        },
+        {
+            "Container": "ts",
+            "AudioCodec": "mp3",
+            "Type": "Audio"
+        },
+        {
+            "Container": "mp3",
+            "Type": "Audio"
+        },
+        {
+            "Container": "aac",
+            "Type": "Audio"
+        },
+        {
+            "Container": "m4a",
+            "AudioCodec": "aac",
+            "Type": "Audio"
+        },
+        {
+            "Container": "m4b",
+            "AudioCodec": "aac",
+            "Type": "Audio"
+        },
+        {
+            "Container": "mp4",
+            "AudioCodec": "flac",
+            "Type": "Audio"
+        },
+        {
+            "Container": "webma",
+            "Type": "Audio"
+        },
+        {
+            "Container": "webm",
+            "AudioCodec": "webma",
+            "Type": "Audio"
+        },
+        {
+            "Container": "wav",
+            "Type": "Audio"
+        },
+        {
+            "Container": "hls",
+            "Type": "Video",
+            "VideoCodec": "h264,hevc",
+            "AudioCodec": "aac,ac3,eac3,mp2"
+        }
+    ],
+    "TranscodingProfiles": [
+        {
+            "Container": "ts",
+            "Type": "Audio",
+            "AudioCodec": "aac",
+            "Context": "Streaming",
+            "Protocol": "hls",
+            "MaxAudioChannels": "6",
+            "MinSegments": "1",
+            "BreakOnNonKeyFrames": false,
+            "EnableAudioVbrEncoding": true
+        },
+        {
+            "Container": "aac",
+            "Type": "Audio",
+            "AudioCodec": "aac",
+            "Context": "Streaming",
+            "Protocol": "http",
+            "MaxAudioChannels": "6"
+        },
+        {
+            "Container": "mp3",
+            "Type": "Audio",
+            "AudioCodec": "mp3",
+            "Context": "Streaming",
+            "Protocol": "http",
+            "MaxAudioChannels": "6"
+        },
+        {
+            "Container": "opus",
+            "Type": "Audio",
+            "AudioCodec": "opus",
+            "Context": "Streaming",
+            "Protocol": "http",
+            "MaxAudioChannels": "6"
+        },
+        {
+            "Container": "wav",
+            "Type": "Audio",
+            "AudioCodec": "wav",
+            "Context": "Streaming",
+            "Protocol": "http",
+            "MaxAudioChannels": "6"
+        },
+        {
+            "Container": "opus",
+            "Type": "Audio",
+            "AudioCodec": "opus",
+            "Context": "Static",
+            "Protocol": "http",
+            "MaxAudioChannels": "6"
+        },
+        {
+            "Container": "mp3",
+            "Type": "Audio",
+            "AudioCodec": "mp3",
+            "Context": "Static",
+            "Protocol": "http",
+            "MaxAudioChannels": "6"
+        },
+        {
+            "Container": "aac",
+            "Type": "Audio",
+            "AudioCodec": "aac",
+            "Context": "Static",
+            "Protocol": "http",
+            "MaxAudioChannels": "6"
+        },
+        {
+            "Container": "wav",
+            "Type": "Audio",
+            "AudioCodec": "wav",
+            "Context": "Static",
+            "Protocol": "http",
+            "MaxAudioChannels": "6"
+        },
+        {
+            "Container": "ts",
+            "Type": "Video",
+            "AudioCodec": "aac,ac3,eac3,mp2",
+            "VideoCodec": "h264,hevc",
+            "Context": "Streaming",
+            "Protocol": "hls",
+            "MaxAudioChannels": "6",
+            "MinSegments": "1",
+            "BreakOnNonKeyFrames": false
+        }
+    ],
+    "ContainerProfiles": [],
+    "CodecProfiles": [
+        {
+            "Type": "VideoAudio",
+            "Codec": "flac",
+            "Conditions": [
+                {
+                    "Condition": "LessThanEqual",
+                    "Property": "AudioChannels",
+                    "Value": "2",
+                    "IsRequired": false
+                }
+            ]
+        },
+        {
+            "Type": "Video",
+            "Codec": "h264",
+            "Conditions": [
+                {
+                    "Condition": "NotEquals",
+                    "Property": "IsAnamorphic",
+                    "Value": "true",
+                    "IsRequired": false
+                },
+                {
+                    "Condition": "EqualsAny",
+                    "Property": "VideoProfile",
+                    "Value": "high|main|baseline|constrained baseline",
+                    "IsRequired": false
+                },
+                {
+                    "Condition": "EqualsAny",
+                    "Property": "VideoRangeType",
+                    "Value": "SDR",
+                    "IsRequired": false
+                },
+                {
+                    "Condition": "LessThanEqual",
+                    "Property": "VideoLevel",
+                    "Value": "52",
+                    "IsRequired": false
+                }
+            ]
+        },
+        {
+            "Type": "Video",
+            "Container": "-mp4,ts",
+            "Codec": "hevc",
+            "Conditions": [
+                {
+                    "Condition": "EqualsAny",
+                    "Property": "VideoRangeType",
+                    "Value": "SDR|HDR10|HLG",
+                    "IsRequired": false
+                }
+            ]
+        },
+        {
+            "Type": "Video",
+            "Codec": "hevc",
+            "Conditions": [
+                {
+                    "Condition": "NotEquals",
+                    "Property": "IsAnamorphic",
+                    "Value": "true",
+                    "IsRequired": false
+                },
+                {
+                    "Condition": "EqualsAny",
+                    "Property": "VideoProfile",
+                    "Value": "main|main 10",
+                    "IsRequired": false
+                },
+                {
+                    "Condition": "EqualsAny",
+                    "Property": "VideoRangeType",
+                    "Value": "SDR|HDR10|HLG|DOVI|DOVIWithHDR10|DOVIWithHLG|DOVIWithSDR",
+                    "IsRequired": false
+                },
+                {
+                    "Condition": "LessThanEqual",
+                    "Property": "VideoLevel",
+                    "Value": "183",
+                    "IsRequired": false
+                }
+            ]
+        },
+        {
+            "Type": "Video",
+            "Codec": "vp9",
+            "Conditions": [
+                {
+                    "Condition": "EqualsAny",
+                    "Property": "VideoRangeType",
+                    "Value": "SDR|HDR10|HLG",
+                    "IsRequired": false
+                }
+            ]
+        },
+        {
+            "Type": "Video",
+            "Codec": "av1",
+            "Conditions": [
+                {
+                    "Condition": "NotEquals",
+                    "Property": "IsAnamorphic",
+                    "Value": "true",
+                    "IsRequired": false
+                },
+                {
+                    "Condition": "EqualsAny",
+                    "Property": "VideoProfile",
+                    "Value": "main",
+                    "IsRequired": false
+                },
+                {
+                    "Condition": "EqualsAny",
+                    "Property": "VideoRangeType",
+                    "Value": "SDR|HDR10|HLG",
+                    "IsRequired": false
+                },
+                {
+                    "Condition": "LessThanEqual",
+                    "Property": "VideoLevel",
+                    "Value": "15",
+                    "IsRequired": false
+                }
+            ]
+        }
+    ],
+    "SubtitleProfiles": [],
+    "ResponseProfiles": [
+        {
+            "Type": "Video",
+            "Container": "m4v",
+            "MimeType": "video/mp4"
+        }
+    ]
+}

+ 95 - 0
tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-dvhe.05-eac3-28000k.json

@@ -0,0 +1,95 @@
+{
+    "Id": "e313fd4bfdfcab326b1fea833cffd779",
+    "Path": "/Media/MyVideo-dovi-p5.mkv",
+    "Type": "Default",
+    "Container": "mkv",
+    "Size": 199246498,
+    "Name": "MyVideo-dovi-p5",
+    "IsRemote": false,
+    "ETag": "3c932ee1cd94e3fecebcc3fac15053e9",
+    "RunTimeTicks": 562000000,
+    "SupportsTranscoding": true,
+    "SupportsDirectStream": false,
+    "SupportsDirectPlay": true,
+    "SupportsProbing": true,
+    "VideoType": "VideoFile",
+    "MediaStreams": [
+        {
+            "Codec": "hevc",
+            "CodecTag": "dvhe",
+            "Language": "und",
+            "DvVersionMajor": 1,
+            "DvVersionMinor": 0,
+            "DvProfile": 5,
+            "DvLevel": 9,
+            "RpuPresentFlag": 1,
+            "ElPresentFlag": 0,
+            "BlPresentFlag": 1,
+            "DvBlSignalCompatibilityId": 0,
+            "TimeBase": "1/60000",
+            "VideoRange": "HDR",
+            "VideoRangeType": "DOVI",
+            "VideoDoViTitle": "Dolby Vision Profile 5",
+            "AudioSpatialFormat": "None",
+            "DisplayTitle": "4K HEVC Dolby Vision Profile 5",
+            "IsInterlaced": false,
+            "IsAVC": false,
+            "BitRate": 27713921,
+            "BitDepth": 10,
+            "RefFrames": 1,
+            "IsDefault": true,
+            "IsForced": false,
+            "IsHearingImpaired": false,
+            "Height": 2160,
+            "Width": 3840,
+            "AverageFrameRate": 60,
+            "RealFrameRate": 60,
+            "ReferenceFrameRate": 60,
+            "Profile": "Main 10",
+            "Type": "Video",
+            "AspectRatio": "16:9",
+            "Index": 0,
+            "IsExternal": false,
+            "IsTextSubtitleStream": false,
+            "SupportsExternalStream": false,
+            "PixelFormat": "yuv420p10le",
+            "Level": 153,
+            "IsAnamorphic": false
+        },
+        {
+            "Codec": "eac3",
+            "CodecTag": "ec-3",
+            "Language": "und",
+            "TimeBase": "1/48000",
+            "Title": "sound handler",
+            "VideoRange": "Unknown",
+            "VideoRangeType": "Unknown",
+            "AudioSpatialFormat": "DolbyAtmos",
+            "LocalizedDefault": "Default",
+            "LocalizedExternal": "External",
+            "DisplayTitle": "sound handler - Dolby Digital Plus + Dolby Atmos - 5.1 - Default",
+            "IsInterlaced": false,
+            "IsAVC": false,
+            "ChannelLayout": "5.1",
+            "BitRate": 640000,
+            "Channels": 6,
+            "SampleRate": 48000,
+            "IsDefault": true,
+            "IsForced": false,
+            "IsHearingImpaired": false,
+            "Profile": "Dolby Digital Plus + Dolby Atmos",
+            "Type": "Audio",
+            "Index": 1,
+            "IsExternal": false,
+            "IsTextSubtitleStream": false,
+            "SupportsExternalStream": false,
+            "Level": 0
+        }
+    ],
+    "MediaAttachments": [],
+    "Bitrate": 28362490,
+    "RequiredHttpHeaders": {},
+    "DefaultAudioStreamIndex": 1,
+    "DefaultSubtitleStreamIndex": -1,
+    "HasSegments": false
+}

+ 101 - 0
tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-dvhe.08-eac3-15200k.json

@@ -0,0 +1,101 @@
+{
+    "Protocol": "File",
+    "Id": "ac2a9824755fbeffd891b8ff2634901a",
+    "Path": "/Media/MyVideo-dovi-p8.mkv",
+    "Type": "Default",
+    "Container": "mkv",
+    "Size": 344509829,
+    "Name": "MyVideo-dovi-p8",
+    "ETag": "8ac40cacc99e4748bc9218045b38d184",
+    "RunTimeTicks": 1781120000,
+    "SupportsTranscoding": true,
+    "SupportsDirectStream": false,
+    "SupportsDirectPlay": true,
+    "SupportsProbing": true,
+    "VideoType": "VideoFile",
+    "MediaStreams": [
+        {
+            "Codec": "hevc",
+            "CodecTag": "hev1",
+            "Language": "und",
+            "ColorSpace": "bt2020nc",
+            "ColorTransfer": "smpte2084",
+            "ColorPrimaries": "bt2020",
+            "DvVersionMajor": 1,
+            "DvVersionMinor": 0,
+            "DvProfile": 8,
+            "DvLevel": 5,
+            "RpuPresentFlag": 1,
+            "ElPresentFlag": 0,
+            "BlPresentFlag": 1,
+            "DvBlSignalCompatibilityId": 1,
+            "TimeBase": "1/60000",
+            "VideoRange": "HDR",
+            "VideoRangeType": "DOVIWithHDR10",
+            "VideoDoViTitle": "Dolby Vision Profile 8.1 (HDR10)",
+            "AudioSpatialFormat": "None",
+            "DisplayTitle": "1080p HEVC Dolby Vision Profile 8.1 (HDR10)",
+            "IsInterlaced": false,
+            "IsAVC": false,
+            "BitRate": 15091058,
+            "BitDepth": 10,
+            "RefFrames": 1,
+            "IsDefault": true,
+            "IsForced": false,
+            "IsHearingImpaired": false,
+            "Height": 1080,
+            "Width": 1920,
+            "AverageFrameRate": 59.94006,
+            "RealFrameRate": 59.94006,
+            "ReferenceFrameRate": 59.94006,
+            "Profile": "Main 10",
+            "Type": "Video",
+            "AspectRatio": "16:9",
+            "Index": 0,
+            "IsExternal": false,
+            "IsTextSubtitleStream": false,
+            "SupportsExternalStream": false,
+            "PixelFormat": "yuv420p10le",
+            "Level": 153,
+            "IsAnamorphic": false
+        },
+        {
+            "Codec": "eac3",
+            "CodecTag": "ec-3",
+            "Language": "und",
+            "TimeBase": "1/48000",
+            "Title": "Bento4 Sound Handler",
+            "VideoRange": "Unknown",
+            "VideoRangeType": "Unknown",
+            "AudioSpatialFormat": "DolbyAtmos",
+            "LocalizedDefault": "Default",
+            "LocalizedExternal": "External",
+            "DisplayTitle": "Bento4 Sound Handler - Dolby Digital Plus + Dolby Atmos - 5.1 - Default",
+            "IsInterlaced": false,
+            "IsAVC": false,
+            "ChannelLayout": "5.1",
+            "BitRate": 640000,
+            "Channels": 6,
+            "SampleRate": 48000,
+            "IsDefault": true,
+            "IsForced": false,
+            "IsHearingImpaired": false,
+            "Profile": "Dolby Digital Plus + Dolby Atmos",
+            "Type": "Audio",
+            "Index": 1,
+            "IsExternal": false,
+            "IsTextSubtitleStream": false,
+            "SupportsExternalStream": false,
+            "Level": 0
+        }
+    ],
+    "MediaAttachments": [],
+    "Formats": [],
+    "Bitrate": 15473851,
+    "RequiredHttpHeaders": {},
+    "TranscodingUrl": "/videos/ac2a9824-755f-beff-d891-b8ff2634901a/master.m3u8?DeviceId=TW96aWxsYS81LjAgKE1hY2ludG9zaDsgSW50ZWwgTWFjIE9TIFggMTBfMTVfNykgQXBwbGVXZWJLaXQvNjA1LjEuMTUgKEtIVE1MLCBsaWtlIEdlY2tvKSBWZXJzaW9uLzE3LjQgU2FmYXJpLzYwNS4xLjE1fDE3MTgxMjcxNTczNzk1&MediaSourceId=ac2a9824755fbeffd891b8ff2634901a&VideoCodec=hevc,h264,vp9,hevc&AudioCodec=eac3&AudioStreamIndex=1&VideoBitrate=148965748&AudioBitrate=640000&AudioSampleRate=48000&MaxFramerate=59.94006&PlaySessionId=2c5377dde2b944b18f80c7f3203e970f&api_key=f17a653e8c0c4b588f26231812ff3794&TranscodingMaxAudioChannels=6&RequireAvc=false&EnableAudioVbrEncoding=true&Tag=8ac40cacc99e4748bc9218045b38d184&SegmentContainer=mp4&MinSegments=2&BreakOnNonKeyFrames=True&hevc-level=153&hevc-videobitdepth=10&hevc-profile=main10&hevc-audiochannels=6&eac3-profile=dolbydigitalplus+dolbyatmos&vp9-rangetype=SDR,HDR10,HLG&hevc-rangetype=SDR,HDR10,HLG,DOVI,DOVIWithHDR10,DOVIWithHLG,DOVIWithSDR&hevc-deinterlace=true&hevc-codectag=hvc1,dvh1&h264-profile=high,main,baseline,constrainedbaseline,high10&h264-rangetype=SDR&h264-level=52&h264-deinterlace=true&TranscodeReasons=VideoCodecTagNotSupported",
+    "TranscodingSubProtocol": "hls",
+    "TranscodingContainer": "mp4",
+    "DefaultAudioStreamIndex": 1,
+    "HasSegments": false
+}

+ 94 - 0
tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-dvh1.05-eac3-15200k.json

@@ -0,0 +1,94 @@
+{
+    "Id": "a5365160a83cb0c518cc1c9ead31dbc7",
+    "Path": "/Media/MyVideo-dovi-p5.mp4",
+    "Type": "Default",
+    "Container": "mp4",
+    "Size": 345485021,
+    "Name": "MyVideo-dovi-p5",
+    "IsRemote": false,
+    "ETag": "a1aa7e722b9af5125b7387d0f58d463e",
+    "RunTimeTicks": 1781120000,
+    "SupportsTranscoding": true,
+    "SupportsDirectStream": true,
+    "SupportsDirectPlay": true,
+    "SupportsProbing": true,
+    "VideoType": "VideoFile",
+    "MediaStreams": [
+        {
+            "Codec": "hevc",
+            "CodecTag": "dvh1",
+            "Language": "und",
+            "DvVersionMajor": 1,
+            "DvVersionMinor": 0,
+            "DvProfile": 5,
+            "DvLevel": 5,
+            "RpuPresentFlag": 1,
+            "ElPresentFlag": 0,
+            "BlPresentFlag": 1,
+            "DvBlSignalCompatibilityId": 0,
+            "TimeBase": "1/60000",
+            "VideoRange": "HDR",
+            "VideoRangeType": "DOVI",
+            "VideoDoViTitle": "Dolby Vision Profile 5",
+            "AudioSpatialFormat": "None",
+            "DisplayTitle": "1080p HEVC Dolby Vision Profile 5",
+            "IsInterlaced": false,
+            "IsAVC": false,
+            "BitRate": 15135631,
+            "BitDepth": 10,
+            "RefFrames": 1,
+            "IsDefault": true,
+            "IsForced": false,
+            "IsHearingImpaired": false,
+            "Height": 1080,
+            "Width": 1920,
+            "AverageFrameRate": 59.94006,
+            "RealFrameRate": 59.94006,
+            "ReferenceFrameRate": 59.94006,
+            "Profile": "Main 10",
+            "Type": "Video",
+            "AspectRatio": "16:9",
+            "Index": 0,
+            "IsExternal": false,
+            "IsTextSubtitleStream": false,
+            "SupportsExternalStream": false,
+            "PixelFormat": "yuv420p10le",
+            "Level": 153,
+            "IsAnamorphic": false
+        },
+        {
+            "Codec": "eac3",
+            "CodecTag": "ec-3",
+            "Language": "und",
+            "TimeBase": "1/48000",
+            "Title": "Bento4 Sound Handler",
+            "VideoRange": "Unknown",
+            "VideoRangeType": "Unknown",
+            "AudioSpatialFormat": "DolbyAtmos",
+            "LocalizedDefault": "Default",
+            "LocalizedExternal": "External",
+            "DisplayTitle": "Bento4 Sound Handler - Dolby Digital Plus + Dolby Atmos - 5.1 - Default",
+            "IsInterlaced": false,
+            "IsAVC": false,
+            "ChannelLayout": "5.1",
+            "BitRate": 640000,
+            "Channels": 6,
+            "SampleRate": 48000,
+            "IsDefault": true,
+            "IsForced": false,
+            "IsHearingImpaired": false,
+            "Profile": "Dolby Digital Plus + Dolby Atmos",
+            "Type": "Audio",
+            "Index": 1,
+            "IsExternal": false,
+            "IsTextSubtitleStream": false,
+            "SupportsExternalStream": false,
+            "Level": 0
+        }
+    ],
+    "MediaAttachments": [],
+    "Bitrate": 15517652,
+    "DefaultAudioStreamIndex": 1,
+    "DefaultSubtitleStreamIndex": -1,
+    "HasSegments": false
+}

+ 97 - 0
tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-dvhe.08-eac3-15200k.json

@@ -0,0 +1,97 @@
+{
+    "Protocol": "File",
+    "Id": "ac2a9824755fbeffd891b8ff2634901a",
+    "Path": "/Media/MyVideo-dovi-p8.mp4",
+    "Type": "Default",
+    "Container": "mp4",
+    "Size": 344509829,
+    "Name": "MyVideo-dovi-p8",
+    "ETag": "8ac40cacc99e4748bc9218045b38d184",
+    "RunTimeTicks": 1781120000,
+    "SupportsTranscoding": true,
+    "SupportsDirectStream": false,
+    "SupportsDirectPlay": true,
+    "SupportsProbing": true,
+    "VideoType": "VideoFile",
+    "MediaStreams": [
+        {
+            "Codec": "hevc",
+            "CodecTag": "hev1",
+            "Language": "und",
+            "ColorSpace": "bt2020nc",
+            "ColorTransfer": "smpte2084",
+            "ColorPrimaries": "bt2020",
+            "DvVersionMajor": 1,
+            "DvVersionMinor": 0,
+            "DvProfile": 8,
+            "DvLevel": 5,
+            "RpuPresentFlag": 1,
+            "ElPresentFlag": 0,
+            "BlPresentFlag": 1,
+            "DvBlSignalCompatibilityId": 1,
+            "TimeBase": "1/60000",
+            "VideoRange": "HDR",
+            "VideoRangeType": "DOVIWithHDR10",
+            "VideoDoViTitle": "Dolby Vision Profile 8.1 (HDR10)",
+            "AudioSpatialFormat": "None",
+            "DisplayTitle": "1080p HEVC Dolby Vision Profile 8.1 (HDR10)",
+            "IsInterlaced": false,
+            "IsAVC": false,
+            "BitRate": 15091058,
+            "BitDepth": 10,
+            "RefFrames": 1,
+            "IsDefault": true,
+            "IsForced": false,
+            "IsHearingImpaired": false,
+            "Height": 1080,
+            "Width": 1920,
+            "AverageFrameRate": 59.94006,
+            "RealFrameRate": 59.94006,
+            "ReferenceFrameRate": 59.94006,
+            "Profile": "Main 10",
+            "Type": "Video",
+            "AspectRatio": "16:9",
+            "Index": 0,
+            "IsExternal": false,
+            "IsTextSubtitleStream": false,
+            "SupportsExternalStream": false,
+            "PixelFormat": "yuv420p10le",
+            "Level": 153,
+            "IsAnamorphic": false
+        },
+        {
+            "Codec": "eac3",
+            "CodecTag": "ec-3",
+            "Language": "und",
+            "TimeBase": "1/48000",
+            "Title": "Bento4 Sound Handler",
+            "VideoRange": "Unknown",
+            "VideoRangeType": "Unknown",
+            "AudioSpatialFormat": "DolbyAtmos",
+            "LocalizedDefault": "Default",
+            "LocalizedExternal": "External",
+            "DisplayTitle": "Bento4 Sound Handler - Dolby Digital Plus + Dolby Atmos - 5.1 - Default",
+            "IsInterlaced": false,
+            "IsAVC": false,
+            "ChannelLayout": "5.1",
+            "BitRate": 640000,
+            "Channels": 6,
+            "SampleRate": 48000,
+            "IsDefault": true,
+            "IsForced": false,
+            "IsHearingImpaired": false,
+            "Profile": "Dolby Digital Plus + Dolby Atmos",
+            "Type": "Audio",
+            "Index": 1,
+            "IsExternal": false,
+            "IsTextSubtitleStream": false,
+            "SupportsExternalStream": false,
+            "Level": 0
+        }
+    ],
+    "MediaAttachments": [],
+    "Formats": [],
+    "Bitrate": 15473851,
+    "DefaultAudioStreamIndex": 1,
+    "HasSegments": false
+}