From bb7068cb635451f9a077af495063559c241a18c7 Mon Sep 17 00:00:00 2001 From: Bond-009 Date: Fri, 18 Mar 2022 22:19:02 +0100 Subject: Move StreamBuilderTests to correct project (#7461) --- MediaBrowser.Model/Properties/AssemblyInfo.cs | 1 - .../Jellyfin.Dlna.Tests/Jellyfin.Dlna.Tests.csproj | 6 - tests/Jellyfin.Dlna.Tests/StreamBuilderTests.cs | 466 --------------------- .../Test Data/DeviceProfile-AndroidPixel.json | 332 --------------- .../Test Data/DeviceProfile-Chrome-NoHLS.json | 430 ------------------- .../Test Data/DeviceProfile-Chrome.json | 448 -------------------- .../Test Data/DeviceProfile-DirectMedia.json | 90 ---- .../Test Data/DeviceProfile-Firefox.json | 441 ------------------- .../DeviceProfile-JellyfinMediaPlayer.json | 137 ------ .../Test Data/DeviceProfile-LowBandwidth.json | 137 ------ .../Test Data/DeviceProfile-Null.json | 9 - .../Test Data/DeviceProfile-RokuSSPlus.json | 211 ---------- .../Test Data/DeviceProfile-RokuSSPlusNext.json | 211 ---------- .../Test Data/DeviceProfile-SafariNext.json | 357 ---------------- .../Test Data/DeviceProfile-TranscodeMedia.json | 139 ------ .../Test Data/DeviceProfile-Yatse.json | 189 --------- .../Test Data/DeviceProfile-Yatse2.json | 189 --------- .../MediaSourceInfo-mkv-av1-aac-srt-2600k.json | 73 ---- .../MediaSourceInfo-mkv-av1-vorbis-srt-2600k.json | 72 ---- .../MediaSourceInfo-mkv-vp9-aac-srt-2600k.json | 73 ---- .../MediaSourceInfo-mkv-vp9-ac3-srt-2600k.json | 72 ---- .../MediaSourceInfo-mkv-vp9-vorbis-srt-2600k.json | 73 ---- .../MediaSourceInfo-mkv-vp9-vorbis-vtt-2600k.json | 72 ---- .../MediaSourceInfo-mp4-h264-aac-srt-2600k.json | 72 ---- .../MediaSourceInfo-mp4-h264-aac-vtt-2600k.json | 72 ---- ...MediaSourceInfo-mp4-h264-ac3-aac-srt-2600k.json | 87 ---- ...iaSourceInfo-mp4-h264-ac3-aacDef-srt-2600k.json | 87 ---- ...iaSourceInfo-mp4-h264-ac3-aacExt-srt-2600k.json | 89 ---- .../MediaSourceInfo-mp4-h264-ac3-srt-2600k.json | 71 ---- .../MediaSourceInfo-mp4-hevc-aac-srt-15200k.json | 75 ---- ...ediaSourceInfo-mp4-hevc-ac3-aac-srt-15200k.json | 89 ---- ...aSourceInfo-mp4-hevc-ac3-aacExt-srt-15200k.json | 91 ---- .../MediaSourceInfo-mp4-hevc-ac3-srt-15200k.json | 74 ---- .../Test Data/MediaSourceInfo-raw.json | 102 ----- .../Dlna/StreamBuilderTests.cs | 466 +++++++++++++++++++++ .../Jellyfin.Model.Tests.csproj | 7 + .../Test Data/DeviceProfile-AndroidPixel.json | 332 +++++++++++++++ .../Test Data/DeviceProfile-Chrome-NoHLS.json | 430 +++++++++++++++++++ .../Test Data/DeviceProfile-Chrome.json | 448 ++++++++++++++++++++ .../Test Data/DeviceProfile-DirectMedia.json | 90 ++++ .../Test Data/DeviceProfile-Firefox.json | 441 +++++++++++++++++++ .../DeviceProfile-JellyfinMediaPlayer.json | 137 ++++++ .../Test Data/DeviceProfile-LowBandwidth.json | 137 ++++++ .../Test Data/DeviceProfile-Null.json | 9 + .../Test Data/DeviceProfile-RokuSSPlus.json | 211 ++++++++++ .../Test Data/DeviceProfile-RokuSSPlusNext.json | 211 ++++++++++ .../Test Data/DeviceProfile-SafariNext.json | 357 ++++++++++++++++ .../Test Data/DeviceProfile-TranscodeMedia.json | 139 ++++++ .../Test Data/DeviceProfile-Yatse.json | 189 +++++++++ .../Test Data/DeviceProfile-Yatse2.json | 189 +++++++++ .../MediaSourceInfo-mkv-av1-aac-srt-2600k.json | 73 ++++ .../MediaSourceInfo-mkv-av1-vorbis-srt-2600k.json | 72 ++++ .../MediaSourceInfo-mkv-vp9-aac-srt-2600k.json | 73 ++++ .../MediaSourceInfo-mkv-vp9-ac3-srt-2600k.json | 72 ++++ .../MediaSourceInfo-mkv-vp9-vorbis-srt-2600k.json | 73 ++++ .../MediaSourceInfo-mkv-vp9-vorbis-vtt-2600k.json | 72 ++++ .../MediaSourceInfo-mp4-h264-aac-srt-2600k.json | 72 ++++ .../MediaSourceInfo-mp4-h264-aac-vtt-2600k.json | 72 ++++ ...MediaSourceInfo-mp4-h264-ac3-aac-srt-2600k.json | 87 ++++ ...iaSourceInfo-mp4-h264-ac3-aacDef-srt-2600k.json | 87 ++++ ...iaSourceInfo-mp4-h264-ac3-aacExt-srt-2600k.json | 89 ++++ .../MediaSourceInfo-mp4-h264-ac3-srt-2600k.json | 71 ++++ .../MediaSourceInfo-mp4-hevc-aac-srt-15200k.json | 75 ++++ ...ediaSourceInfo-mp4-hevc-ac3-aac-srt-15200k.json | 89 ++++ ...aSourceInfo-mp4-hevc-ac3-aacExt-srt-15200k.json | 91 ++++ .../MediaSourceInfo-mp4-hevc-ac3-srt-15200k.json | 74 ++++ .../Test Data/MediaSourceInfo-raw.json | 102 +++++ 67 files changed, 5137 insertions(+), 5137 deletions(-) delete mode 100644 tests/Jellyfin.Dlna.Tests/StreamBuilderTests.cs delete mode 100644 tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-AndroidPixel.json delete mode 100644 tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Chrome-NoHLS.json delete mode 100644 tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Chrome.json delete mode 100644 tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-DirectMedia.json delete mode 100644 tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Firefox.json delete mode 100644 tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-JellyfinMediaPlayer.json delete mode 100644 tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-LowBandwidth.json delete mode 100644 tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Null.json delete mode 100644 tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-RokuSSPlus.json delete mode 100644 tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-RokuSSPlusNext.json delete mode 100644 tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-SafariNext.json delete mode 100644 tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-TranscodeMedia.json delete mode 100644 tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Yatse.json delete mode 100644 tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Yatse2.json delete mode 100644 tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-av1-aac-srt-2600k.json delete mode 100644 tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-av1-vorbis-srt-2600k.json delete mode 100644 tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-vp9-aac-srt-2600k.json delete mode 100644 tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-vp9-ac3-srt-2600k.json delete mode 100644 tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-vp9-vorbis-srt-2600k.json delete mode 100644 tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-vp9-vorbis-vtt-2600k.json delete mode 100644 tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-aac-srt-2600k.json delete mode 100644 tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-aac-vtt-2600k.json delete mode 100644 tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aac-srt-2600k.json delete mode 100644 tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aacDef-srt-2600k.json delete mode 100644 tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aacExt-srt-2600k.json delete mode 100644 tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-srt-2600k.json delete mode 100644 tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-hevc-aac-srt-15200k.json delete mode 100644 tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-aac-srt-15200k.json delete mode 100644 tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-aacExt-srt-15200k.json delete mode 100644 tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-srt-15200k.json delete mode 100644 tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-raw.json create mode 100644 tests/Jellyfin.Model.Tests/Dlna/StreamBuilderTests.cs create mode 100644 tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-AndroidPixel.json create mode 100644 tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Chrome-NoHLS.json create mode 100644 tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Chrome.json create mode 100644 tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-DirectMedia.json create mode 100644 tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Firefox.json create mode 100644 tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-JellyfinMediaPlayer.json create mode 100644 tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-LowBandwidth.json create mode 100644 tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Null.json create mode 100644 tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-RokuSSPlus.json create mode 100644 tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-RokuSSPlusNext.json create mode 100644 tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-SafariNext.json create mode 100644 tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-TranscodeMedia.json create mode 100644 tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Yatse.json create mode 100644 tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Yatse2.json create mode 100644 tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-av1-aac-srt-2600k.json create mode 100644 tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-av1-vorbis-srt-2600k.json create mode 100644 tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-vp9-aac-srt-2600k.json create mode 100644 tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-vp9-ac3-srt-2600k.json create mode 100644 tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-vp9-vorbis-srt-2600k.json create mode 100644 tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-vp9-vorbis-vtt-2600k.json create mode 100644 tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-aac-srt-2600k.json create mode 100644 tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-aac-vtt-2600k.json create mode 100644 tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aac-srt-2600k.json create mode 100644 tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aacDef-srt-2600k.json create mode 100644 tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aacExt-srt-2600k.json create mode 100644 tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-srt-2600k.json create mode 100644 tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-hevc-aac-srt-15200k.json create mode 100644 tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-aac-srt-15200k.json create mode 100644 tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-aacExt-srt-15200k.json create mode 100644 tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-srt-15200k.json create mode 100644 tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-raw.json diff --git a/MediaBrowser.Model/Properties/AssemblyInfo.cs b/MediaBrowser.Model/Properties/AssemblyInfo.cs index 6bf1eb0c03..e50baf604e 100644 --- a/MediaBrowser.Model/Properties/AssemblyInfo.cs +++ b/MediaBrowser.Model/Properties/AssemblyInfo.cs @@ -16,7 +16,6 @@ using System.Runtime.InteropServices; [assembly: AssemblyCulture("")] [assembly: NeutralResourcesLanguage("en")] [assembly: InternalsVisibleTo("Jellyfin.Model.Tests")] -[assembly: InternalsVisibleTo("Jellyfin.Dlna.Tests")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from diff --git a/tests/Jellyfin.Dlna.Tests/Jellyfin.Dlna.Tests.csproj b/tests/Jellyfin.Dlna.Tests/Jellyfin.Dlna.Tests.csproj index 8cead4bf25..4918e2e828 100644 --- a/tests/Jellyfin.Dlna.Tests/Jellyfin.Dlna.Tests.csproj +++ b/tests/Jellyfin.Dlna.Tests/Jellyfin.Dlna.Tests.csproj @@ -14,12 +14,6 @@ - - - PreserveNewest - - - diff --git a/tests/Jellyfin.Dlna.Tests/StreamBuilderTests.cs b/tests/Jellyfin.Dlna.Tests/StreamBuilderTests.cs deleted file mode 100644 index c645ca9a63..0000000000 --- a/tests/Jellyfin.Dlna.Tests/StreamBuilderTests.cs +++ /dev/null @@ -1,466 +0,0 @@ -using System; -using System.Collections.Specialized; -using System.IO; -using System.Linq; -using System.Runtime.Serialization; -using System.Text.Json; -using System.Threading.Tasks; -using Jellyfin.Extensions.Json; -using MediaBrowser.Model.Dlna; -using MediaBrowser.Model.Dto; -using MediaBrowser.Model.Entities; -using MediaBrowser.Model.Session; -using Microsoft.Extensions.Logging.Abstractions; -using Moq; -using Xunit; - -namespace Jellyfin.MediaBrowser.Model.Tests -{ - public class StreamBuilderTests - { - [Theory] - // Chrome - [InlineData("Chrome", "mp4-h264-aac-vtt-2600k", PlayMethod.DirectPlay)] // #6450 - [InlineData("Chrome", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectPlay)] // #6450 - [InlineData("Chrome", "mp4-h264-ac3-aacDef-srt-2600k", PlayMethod.DirectPlay)] // #6450 - [InlineData("Chrome", "mp4-h264-ac3-aacExt-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioIsExternal)] // #6450 - [InlineData("Chrome", "mp4-h264-ac3-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 - [InlineData("Chrome", "mp4-hevc-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Transcode")] - [InlineData("Chrome", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Transcode")] - [InlineData("Chrome", "mkv-vp9-aac-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 - [InlineData("Chrome", "mkv-vp9-ac3-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 - [InlineData("Chrome", "mkv-vp9-vorbis-vtt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 - // Firefox - [InlineData("Firefox", "mp4-h264-aac-vtt-2600k", PlayMethod.DirectPlay)] // #6450 - [InlineData("Firefox", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectPlay)] // #6450 - [InlineData("Firefox", "mp4-h264-ac3-aacDef-srt-2600k", PlayMethod.DirectPlay)] // #6450 - [InlineData("Firefox", "mp4-h264-ac3-aacExt-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioIsExternal)] // #6450 - [InlineData("Firefox", "mp4-h264-ac3-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 - [InlineData("Firefox", "mp4-hevc-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Transcode")] - [InlineData("Firefox", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Transcode")] - [InlineData("Firefox", "mkv-vp9-aac-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 - [InlineData("Firefox", "mkv-vp9-ac3-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 - [InlineData("Firefox", "mkv-vp9-vorbis-vtt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 - // Safari - [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-aacDef-srt-2600k", PlayMethod.DirectPlay)] // #6450 - [InlineData("SafariNext", "mp4-h264-ac3-aacExt-srt-2600k", PlayMethod.DirectPlay)] // #6450 - [InlineData("SafariNext", "mp4-h264-ac3-srt-2600k", PlayMethod.DirectPlay)] // #6450 - [InlineData("SafariNext", "mp4-hevc-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Remux", "HLS.mp4")] // #6450 - [InlineData("SafariNext", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Remux", "HLS.mp4")] // #6450 - [InlineData("SafariNext", "mp4-hevc-ac3-aacExt-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Remux", "HLS.mp4")] // #6450 - // AndroidPixel - [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-aacDef-srt-2600k", PlayMethod.DirectPlay)] // #6450 - [InlineData("AndroidPixel", "mp4-h264-ac3-srt-2600k", PlayMethod.DirectPlay)] // #6450 - [InlineData("AndroidPixel", "mp4-hevc-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.ContainerBitrateExceedsLimit, "Transcode")] - [InlineData("AndroidPixel", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.ContainerBitrateExceedsLimit, "Transcode")] - // Yatse - [InlineData("Yatse", "mp4-h264-aac-srt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 - [InlineData("Yatse", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 - [InlineData("Yatse", "mp4-h264-ac3-aacDef-srt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 - [InlineData("Yatse", "mp4-h264-ac3-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] - [InlineData("Yatse", "mp4-hevc-aac-srt-15200k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 - [InlineData("Yatse", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 - // RokuSSPlus - [InlineData("RokuSSPlus", "mp4-h264-aac-srt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 - [InlineData("RokuSSPlus", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 should be DirectPlay - [InlineData("RokuSSPlus", "mp4-h264-ac3-aacDef-srt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 - [InlineData("RokuSSPlus", "mp4-h264-ac3-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 - [InlineData("RokuSSPlus", "mp4-hevc-aac-srt-15200k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 - [InlineData("RokuSSPlus", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 - [InlineData("RokuSSPlus", "mp4-hevc-ac3-srt-15200k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 - // JellyfinMediaPlayer - [InlineData("JellyfinMediaPlayer", "mp4-h264-aac-vtt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 - [InlineData("JellyfinMediaPlayer", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 - [InlineData("JellyfinMediaPlayer", "mp4-h264-ac3-srt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 - [InlineData("JellyfinMediaPlayer", "mp4-hevc-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.ContainerBitrateExceedsLimit, "Transcode")] - [InlineData("JellyfinMediaPlayer", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.ContainerBitrateExceedsLimit, "Transcode")] - [InlineData("JellyfinMediaPlayer", "mkv-vp9-aac-srt-2600k", PlayMethod.DirectPlay)] // #6450 - [InlineData("JellyfinMediaPlayer", "mkv-vp9-ac3-srt-2600k", PlayMethod.DirectPlay)] // #6450 - [InlineData("JellyfinMediaPlayer", "mkv-vp9-vorbis-vtt-2600k", PlayMethod.DirectPlay)] // #6450 - // Chrome-NoHLS - [InlineData("Chrome-NoHLS", "mp4-h264-aac-vtt-2600k", PlayMethod.DirectPlay)] // #6450 - [InlineData("Chrome-NoHLS", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectPlay)] // #6450 - [InlineData("Chrome-NoHLS", "mp4-h264-ac3-aacDef-srt-2600k", PlayMethod.DirectPlay)] // #6450 - [InlineData("Chrome-NoHLS", "mp4-h264-ac3-aacExt-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioIsExternal)] // #6450 - [InlineData("Chrome-NoHLS", "mp4-h264-ac3-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 - [InlineData("Chrome-NoHLS", "mp4-hevc-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Transcode", "http")] - [InlineData("Chrome-NoHLS", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Transcode", "http")] - [InlineData("Chrome-NoHLS", "mkv-vp9-aac-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 - [InlineData("Chrome-NoHLS", "mkv-vp9-ac3-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 - [InlineData("Chrome-NoHLS", "mkv-vp9-vorbis-vtt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 - // TranscodeMedia - [InlineData("TranscodeMedia", "mp4-h264-aac-vtt-2600k", PlayMethod.Transcode, TranscodeReason.DirectPlayError, "Remux", "HLS.mp4")] - [InlineData("TranscodeMedia", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.Transcode, TranscodeReason.DirectPlayError, "Remux", "HLS.mp4")] - [InlineData("TranscodeMedia", "mp4-h264-ac3-srt-2600k", PlayMethod.Transcode, TranscodeReason.DirectPlayError, "DirectStream", "HLS.mp4")] - [InlineData("TranscodeMedia", "mp4-hevc-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.DirectPlayError, "Remux", "HLS.mp4")] - [InlineData("TranscodeMedia", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.DirectPlayError, "Remux", "HLS.mp4")] - [InlineData("TranscodeMedia", "mkv-av1-aac-srt-2600k", PlayMethod.Transcode, TranscodeReason.DirectPlayError, "DirectStream", "http")] - [InlineData("TranscodeMedia", "mkv-av1-vorbis-srt-2600k", PlayMethod.Transcode, TranscodeReason.DirectPlayError, "Remux", "http")] - [InlineData("TranscodeMedia", "mkv-vp9-aac-srt-2600k", PlayMethod.Transcode, TranscodeReason.DirectPlayError, "DirectStream", "http")] - [InlineData("TranscodeMedia", "mkv-vp9-ac3-srt-2600k", PlayMethod.Transcode, TranscodeReason.DirectPlayError, "DirectStream", "http")] - [InlineData("TranscodeMedia", "mkv-vp9-vorbis-vtt-2600k", PlayMethod.Transcode, TranscodeReason.DirectPlayError, "Remux", "http")] - // DirectMedia - [InlineData("DirectMedia", "mp4-h264-aac-vtt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] - [InlineData("DirectMedia", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] - [InlineData("DirectMedia", "mp4-h264-ac3-aacDef-srt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] - [InlineData("DirectMedia", "mp4-h264-ac3-srt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] - [InlineData("DirectMedia", "mp4-hevc-aac-srt-15200k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] - [InlineData("DirectMedia", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] - [InlineData("DirectMedia", "mkv-vp9-aac-srt-2600k", PlayMethod.DirectPlay)] - [InlineData("DirectMedia", "mkv-vp9-ac3-srt-2600k", PlayMethod.DirectPlay)] - [InlineData("DirectMedia", "mkv-vp9-vorbis-vtt-2600k", PlayMethod.DirectPlay)] - // LowBandwidth - [InlineData("LowBandwidth", "mp4-h264-aac-vtt-2600k", PlayMethod.Transcode, TranscodeReason.ContainerBitrateExceedsLimit, "Transcode")] - [InlineData("LowBandwidth", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.Transcode, TranscodeReason.ContainerBitrateExceedsLimit, "Transcode")] - [InlineData("LowBandwidth", "mp4-h264-ac3-srt-2600k", PlayMethod.Transcode, TranscodeReason.ContainerBitrateExceedsLimit, "Transcode")] - [InlineData("LowBandwidth", "mp4-hevc-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.ContainerBitrateExceedsLimit, "Transcode")] - [InlineData("LowBandwidth", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.ContainerBitrateExceedsLimit, "Transcode")] - [InlineData("LowBandwidth", "mkv-vp9-aac-srt-2600k", PlayMethod.Transcode, TranscodeReason.ContainerBitrateExceedsLimit, "Transcode")] - [InlineData("LowBandwidth", "mkv-vp9-ac3-srt-2600k", PlayMethod.Transcode, TranscodeReason.ContainerBitrateExceedsLimit, "Transcode")] - [InlineData("LowBandwidth", "mkv-vp9-vorbis-vtt-2600k", PlayMethod.Transcode, TranscodeReason.ContainerBitrateExceedsLimit, "Transcode")] - // Null - [InlineData("Null", "mp4-h264-aac-vtt-2600k", null, TranscodeReason.ContainerBitrateExceedsLimit)] - [InlineData("Null", "mp4-h264-ac3-aac-srt-2600k", null, TranscodeReason.ContainerBitrateExceedsLimit)] - [InlineData("Null", "mp4-h264-ac3-srt-2600k", null, TranscodeReason.ContainerBitrateExceedsLimit)] - [InlineData("Null", "mp4-hevc-aac-srt-15200k", null, TranscodeReason.ContainerBitrateExceedsLimit)] - [InlineData("Null", "mp4-hevc-ac3-aac-srt-15200k", null, TranscodeReason.ContainerBitrateExceedsLimit)] - [InlineData("Null", "mkv-vp9-aac-srt-2600k", null, TranscodeReason.ContainerBitrateExceedsLimit)] - [InlineData("Null", "mkv-vp9-ac3-srt-2600k", null, TranscodeReason.ContainerBitrateExceedsLimit)] - [InlineData("Null", "mkv-vp9-vorbis-vtt-2600k", null, TranscodeReason.ContainerBitrateExceedsLimit)] - public async Task BuildVideoItemSimple(string deviceName, string mediaSource, PlayMethod? playMethod, TranscodeReason why = (TranscodeReason)0, string transcodeMode = "DirectStream", string transcodeProtocol = "") - { - var options = await GetVideoOptions(deviceName, mediaSource); - BuildVideoItemSimpleTest(options, playMethod, why, transcodeMode, transcodeProtocol); - } - - [Theory] - // Chrome - [InlineData("Chrome", "mp4-h264-aac-vtt-2600k", PlayMethod.DirectPlay)] // #6450 - [InlineData("Chrome", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 - [InlineData("Chrome", "mp4-h264-ac3-aacDef-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 - [InlineData("Chrome", "mp4-h264-ac3-aacExt-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 - [InlineData("Chrome", "mp4-h264-ac3-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 - [InlineData("Chrome", "mp4-hevc-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Transcode")] - [InlineData("Chrome", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Transcode")] - [InlineData("Chrome", "mkv-vp9-aac-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 - [InlineData("Chrome", "mkv-vp9-ac3-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 - [InlineData("Chrome", "mkv-vp9-vorbis-vtt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 - // Firefox - [InlineData("Firefox", "mp4-h264-aac-vtt-2600k", PlayMethod.DirectPlay)] // #6450 - [InlineData("Firefox", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 - [InlineData("Firefox", "mp4-h264-ac3-aacDef-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 - [InlineData("Firefox", "mp4-h264-ac3-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 - [InlineData("Firefox", "mp4-hevc-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Transcode")] - [InlineData("Firefox", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Transcode")] - [InlineData("Firefox", "mkv-vp9-aac-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 - [InlineData("Firefox", "mkv-vp9-ac3-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 - [InlineData("Firefox", "mkv-vp9-vorbis-vtt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 - // Safari - [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-aacDef-srt-2600k", PlayMethod.DirectPlay)] // #6450 - [InlineData("SafariNext", "mp4-h264-ac3-aacExt-srt-2600k", PlayMethod.DirectPlay)] // #6450 - [InlineData("SafariNext", "mp4-h264-ac3-srt-2600k", PlayMethod.DirectPlay)] // #6450 - [InlineData("SafariNext", "mp4-hevc-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Remux", "HLS.mp4")] // #6450 - [InlineData("SafariNext", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Remux", "HLS.mp4")] // #6450 - [InlineData("SafariNext", "mp4-hevc-ac3-aacExt-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Remux", "HLS.mp4")] // #6450 - // AndroidPixel - [InlineData("AndroidPixel", "mp4-h264-aac-srt-2600k", PlayMethod.DirectPlay)] // #6450 - [InlineData("AndroidPixel", "mp4-h264-ac3-aacDef-srt-2600k", PlayMethod.DirectPlay)] // #6450 - [InlineData("AndroidPixel", "mp4-h264-ac3-srt-2600k", PlayMethod.DirectPlay)] // #6450 - [InlineData("AndroidPixel", "mp4-hevc-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.ContainerBitrateExceedsLimit, "Transcode")] - [InlineData("AndroidPixel", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.ContainerBitrateExceedsLimit, "Transcode")] - // Yatse - [InlineData("Yatse", "mp4-h264-aac-srt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 - [InlineData("Yatse", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 - [InlineData("Yatse", "mp4-h264-ac3-aacDef-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 - [InlineData("Yatse", "mp4-h264-ac3-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] - [InlineData("Yatse", "mp4-hevc-aac-srt-15200k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 - [InlineData("Yatse", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 - // RokuSSPlus - [InlineData("RokuSSPlus", "mp4-h264-aac-srt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 - [InlineData("RokuSSPlus", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 should be DirectPlay - [InlineData("RokuSSPlus", "mp4-h264-ac3-aacDef-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 - [InlineData("RokuSSPlus", "mp4-h264-ac3-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 - [InlineData("RokuSSPlus", "mp4-hevc-aac-srt-15200k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 - [InlineData("RokuSSPlus", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 - [InlineData("RokuSSPlus", "mp4-hevc-ac3-srt-15200k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 - // JellyfinMediaPlayer - [InlineData("JellyfinMediaPlayer", "mp4-h264-aac-vtt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 - [InlineData("JellyfinMediaPlayer", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 - [InlineData("JellyfinMediaPlayer", "mp4-h264-ac3-srt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 - [InlineData("JellyfinMediaPlayer", "mp4-hevc-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.ContainerBitrateExceedsLimit, "Transcode")] // #6450 - [InlineData("JellyfinMediaPlayer", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.ContainerBitrateExceedsLimit, "Transcode")] // #6450 - [InlineData("JellyfinMediaPlayer", "mkv-vp9-aac-srt-2600k", PlayMethod.DirectPlay)] // #6450 - [InlineData("JellyfinMediaPlayer", "mkv-vp9-ac3-srt-2600k", PlayMethod.DirectPlay)] // #6450 - [InlineData("JellyfinMediaPlayer", "mkv-vp9-vorbis-vtt-2600k", PlayMethod.DirectPlay)] // #6450 - public async Task BuildVideoItemWithFirstExplicitStream(string deviceName, string mediaSource, PlayMethod? playMethod, TranscodeReason why = (TranscodeReason)0, string transcodeMode = "DirectStream", string transcodeProtocol = "") - { - var options = await GetVideoOptions(deviceName, mediaSource); - options.AudioStreamIndex = 1; - options.SubtitleStreamIndex = options.MediaSources[0].MediaStreams.Count - 1; - - var streamInfo = BuildVideoItemSimpleTest(options, playMethod, why, transcodeMode, transcodeProtocol); - Assert.Equal(streamInfo?.AudioStreamIndex, options.AudioStreamIndex); - Assert.Equal(streamInfo?.SubtitleStreamIndex, options.SubtitleStreamIndex); - } - - [Theory] - // Chrome - [InlineData("Chrome", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectPlay)] // #6450 - [InlineData("Chrome", "mp4-h264-ac3-aacExt-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioIsExternal)] // #6450 - [InlineData("Chrome", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Transcode")] - // Firefox - [InlineData("Firefox", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectPlay)] // #6450 - [InlineData("Firefox", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Transcode")] - // Yatse - [InlineData("Yatse", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 - [InlineData("Yatse", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 - // RokuSSPlus - [InlineData("RokuSSPlus", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 - [InlineData("RokuSSPlus", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 - public async Task BuildVideoItemWithDirectPlayExplicitStreams(string deviceName, string mediaSource, PlayMethod? playMethod, TranscodeReason why = (TranscodeReason)0, string transcodeMode = "DirectStream", string transcodeProtocol = "") - { - var options = await GetVideoOptions(deviceName, mediaSource); - var streamCount = options.MediaSources[0].MediaStreams.Count; - options.AudioStreamIndex = streamCount - 2; - options.SubtitleStreamIndex = streamCount - 1; - - var streamInfo = BuildVideoItemSimpleTest(options, playMethod, why, transcodeMode, transcodeProtocol); - Assert.Equal(streamInfo?.AudioStreamIndex, options.AudioStreamIndex); - Assert.Equal(streamInfo?.SubtitleStreamIndex, options.SubtitleStreamIndex); - } - - private StreamInfo? BuildVideoItemSimpleTest(VideoOptions options, PlayMethod? playMethod, TranscodeReason why, string transcodeMode, string transcodeProtocol) - { - if (string.IsNullOrEmpty(transcodeProtocol)) - { - transcodeProtocol = playMethod == PlayMethod.DirectStream ? "http" : "HLS.ts"; - } - - var builder = GetStreamBuilder(); - - var val = builder.BuildVideoItem(options); - Assert.NotNull(val); - - if (playMethod != null) - { - Assert.Equal(playMethod, val.PlayMethod); - } - - Assert.Equal(why, val.TranscodeReasons); - - var audioStreamIndexInput = options.AudioStreamIndex; - var targetVideoStream = val.TargetVideoStream; - var targetAudioStream = val.TargetAudioStream; - - var mediaSource = options.MediaSources.First(source => source.Id == val.MediaSourceId); - Assert.NotNull(mediaSource); - var videoStreams = mediaSource.MediaStreams.Where(stream => stream.Type == MediaStreamType.Video); - var audioStreams = mediaSource.MediaStreams.Where(stream => stream.Type == MediaStreamType.Audio); - // TODO: check AudioStreamIndex vs options.AudioStreamIndex - var inputAudioStream = mediaSource.GetDefaultAudioStream(audioStreamIndexInput ?? mediaSource.DefaultAudioStreamIndex); - - var uri = ParseUri(val); - - if (playMethod == PlayMethod.DirectPlay) - { - // check expected container - var containers = ContainerProfile.SplitValue(mediaSource.Container); - // TODO: test transcode too - // Assert.Contains(uri.Extension, containers); - - // check expected video codec (1) - Assert.Contains(targetVideoStream.Codec, val.TargetVideoCodec); - Assert.Single(val.TargetVideoCodec); - - // check expected audio codecs (1) - Assert.Contains(targetAudioStream.Codec, val.TargetAudioCodec); - Assert.Single(val.TargetAudioCodec); - // Assert.Single(val.AudioCodecs); - - if (transcodeMode == "DirectStream") - { - Assert.Equal(val.Container, uri.Extension); - } - } - else if (playMethod == PlayMethod.DirectStream || playMethod == PlayMethod.Transcode) - { - Assert.NotNull(val.Container); - Assert.NotEmpty(val.VideoCodecs); - Assert.NotEmpty(val.AudioCodecs); - - // check expected container (todo: this could be a test param) - if (transcodeProtocol == "http") - { - // Assert.Equal("webm", val.Container); - Assert.Equal(val.Container, uri.Extension); - Assert.Equal("stream", uri.Filename); - Assert.Equal("http", val.SubProtocol); - } - else if (transcodeProtocol == "HLS.mp4") - { - Assert.Equal("mp4", val.Container); - Assert.Equal("m3u8", uri.Extension); - Assert.Equal("master", uri.Filename); - Assert.Equal("hls", val.SubProtocol); - } - else - { - Assert.Equal("ts", val.Container); - Assert.Equal("m3u8", uri.Extension); - Assert.Equal("master", uri.Filename); - Assert.Equal("hls", val.SubProtocol); - } - - // Full transcode - if (transcodeMode == "Transcode") - { - if ((val.TranscodeReasons & (StreamBuilder.ContainerReasons | TranscodeReason.DirectPlayError)) == 0) - { - Assert.All( - videoStreams, - stream => Assert.DoesNotContain(stream.Codec, val.VideoCodecs)); - } - - // todo: fill out tests here - } - - // DirectStream and Remux - else - { - // check expected video codec (1) - Assert.Contains(targetVideoStream.Codec, val.TargetVideoCodec); - Assert.Single(val.TargetVideoCodec); - - if (transcodeMode == "DirectStream") - { - if (!targetAudioStream.IsExternal) - { - // check expected audio codecs (1) - Assert.DoesNotContain(targetAudioStream.Codec, val.AudioCodecs); - } - } - else if (transcodeMode == "Remux") - { - // check expected audio codecs (1) - Assert.Contains(targetAudioStream.Codec, val.AudioCodecs); - Assert.Single(val.AudioCodecs); - } - - // video details - var videoStream = targetVideoStream; - Assert.False(val.EstimateContentLength); - Assert.Equal(TranscodeSeekInfo.Auto, val.TranscodeSeekInfo); - Assert.Contains(videoStream.Profile?.ToLowerInvariant() ?? string.Empty, val.TargetVideoProfile?.Split(",").Select(s => s.ToLowerInvariant()) ?? Array.Empty()); - Assert.Equal(videoStream.Level, val.TargetVideoLevel); - Assert.Equal(videoStream.BitDepth, val.TargetVideoBitDepth); - Assert.InRange(val.VideoBitrate.GetValueOrDefault(), videoStream.BitRate.GetValueOrDefault(), int.MaxValue); - - // audio codec not supported - if ((why & TranscodeReason.AudioCodecNotSupported) != 0) - { - // audio stream specified - if (options.AudioStreamIndex >= 0) - { - // TODO:fixme - if (!targetAudioStream.IsExternal) - { - Assert.DoesNotContain(targetAudioStream.Codec, val.AudioCodecs); - } - } - - // audio stream not specified - else - { - // TODO:fixme - Assert.All(audioStreams, stream => - { - if (!stream.IsExternal) - { - Assert.DoesNotContain(stream.Codec, val.AudioCodecs); - } - }); - } - } - } - } - else if (playMethod == null) - { - Assert.Null(val.SubProtocol); - Assert.Equal("stream", uri.Filename); - - Assert.False(val.EstimateContentLength); - Assert.Equal(TranscodeSeekInfo.Auto, val.TranscodeSeekInfo); - } - - return val; - } - - private static async ValueTask TestData(string name) - { - var path = Path.Join("Test Data", typeof(T).Name + "-" + name + ".json"); - using (var stream = File.OpenRead(path)) - { - var value = await JsonSerializer.DeserializeAsync(stream, JsonDefaults.Options); - if (value != null) - { - return value; - } - - throw new SerializationException("Invalid test data: " + name); - } - } - - private StreamBuilder GetStreamBuilder() - { - var transcodeSupport = new Mock(); - var logger = new NullLogger(); - - return new StreamBuilder(transcodeSupport.Object, logger); - } - - private static async ValueTask GetVideoOptions(string deviceProfile, params string[] sources) - { - var mediaSources = sources.Select(src => TestData(src)) - .Select(val => val.Result) - .ToArray(); - var mediaSourceId = mediaSources[0]?.Id; - - var dp = await TestData(deviceProfile); - - return new VideoOptions() - { - ItemId = new Guid("11D229B7-2D48-4B95-9F9B-49F6AB75E613"), - MediaSourceId = mediaSourceId, - MediaSources = mediaSources, - DeviceId = "test-deviceId", - Profile = dp, - AllowAudioStreamCopy = true, - AllowVideoStreamCopy = true, - }; - } - - private static (string Path, NameValueCollection Query, string Filename, string Extension) ParseUri(StreamInfo val) - { - var href = val.ToUrl("media:", "ACCESSTOKEN").Split("?", 2); - var path = href[0]; - - var queryString = href.ElementAtOrDefault(1); - var query = string.IsNullOrEmpty(queryString) ? System.Web.HttpUtility.ParseQueryString(queryString ?? string.Empty) : new NameValueCollection(); - - var filename = System.IO.Path.GetFileNameWithoutExtension(path); - var extension = System.IO.Path.GetExtension(path); - if (extension.Length > 0) - { - extension = extension.Substring(1); - } - - return (path, query, filename, extension); - } - } -} diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-AndroidPixel.json b/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-AndroidPixel.json deleted file mode 100644 index 68ce3ea4ab..0000000000 --- a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-AndroidPixel.json +++ /dev/null @@ -1,332 +0,0 @@ -{ - "Name": "Jellyfin Android", - "EnableAlbumArtInDidl": false, - "EnableSingleAlbumArtLimit": false, - "EnableSingleSubtitleLimit": false, - "SupportedMediaTypes": "Audio,Photo,Video", - "MaxAlbumArtWidth": 2147483647, - "MaxAlbumArtHeight": 2147483647, - "MaxStreamingBitrate": 8000000, - "MaxStaticBitrate": 8000000, - "MusicStreamingTranscodingBitrate": 128000, - "TimelineOffsetSeconds": 0, - "RequiresPlainVideoItems": false, - "RequiresPlainFolders": false, - "EnableMSMediaReceiverRegistrar": false, - "IgnoreTranscodeByteRangeRequests": false, - "DirectPlayProfiles": [ - { - "Container": "mp4", - "AudioCodec": "mp3,aac,alac,ac3", - "VideoCodec": "h263,mpeg4,h264,hevc,av1", - "Type": "Video", - "$type": "DirectPlayProfile" - }, - { - "Container": "mp4", - "AudioCodec": "mp3,aac,alac,ac3", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "fmp4", - "AudioCodec": "mp3,aac,ac3,eac3", - "VideoCodec": "h263,mpeg4,h264,hevc,av1", - "Type": "Video", - "$type": "DirectPlayProfile" - }, - { - "Container": "fmp4", - "AudioCodec": "mp3,aac,ac3,eac3", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "webm", - "AudioCodec": "vorbis,opus", - "VideoCodec": "vp8,vp9,av1", - "Type": "Video", - "$type": "DirectPlayProfile" - }, - { - "Container": "webm", - "AudioCodec": "vorbis,opus", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "mkv", - "AudioCodec": "pcm_s8,pcm_s16be,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,pcm_alaw,pcm_mulaw,mp3,aac,vorbis,opus,flac,alac,ac3,eac3,dts,mlp,truehd", - "VideoCodec": "h263,mpeg4,h264,hevc,av1,vp8,vp9,av1", - "Type": "Video", - "$type": "DirectPlayProfile" - }, - { - "Container": "mkv", - "AudioCodec": "pcm_s8,pcm_s16be,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,pcm_alaw,pcm_mulaw,mp3,aac,vorbis,opus,flac,alac,ac3,eac3,dts,mlp,truehd", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "mp3", - "AudioCodec": "mp3", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "ogg", - "AudioCodec": "vorbis,opus,flac", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "wav", - "AudioCodec": "pcm_s8,pcm_s16be,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,pcm_alaw,pcm_mulaw", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "mpegts", - "AudioCodec": "pcm_s8,pcm_s16be,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,pcm_alaw,pcm_mulaw,mp3,aac,ac3,eac3,dts,mlp,truehd", - "VideoCodec": "mpeg4,h264,hevc", - "Type": "Video", - "$type": "DirectPlayProfile" - }, - { - "Container": "mpegts", - "AudioCodec": "pcm_s8,pcm_s16be,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,pcm_alaw,pcm_mulaw,mp3,aac,ac3,eac3,dts,mlp,truehd", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "flv", - "AudioCodec": "mp3,aac", - "VideoCodec": "mpeg4,h264", - "Type": "Video", - "$type": "DirectPlayProfile" - }, - { - "Container": "flv", - "AudioCodec": "mp3,aac", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "aac", - "AudioCodec": "aac", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "flac", - "AudioCodec": "flac", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "3gp", - "AudioCodec": "3gpp,aac,flac", - "VideoCodec": "h263,mpeg4,h264,hevc", - "Type": "Video", - "$type": "DirectPlayProfile" - }, - { - "Container": "3gp", - "AudioCodec": "3gpp,aac,flac", - "Type": "Audio", - "$type": "DirectPlayProfile" - } - ], - "TranscodingProfiles": [ - { - "Container": "ts", - "Type": "Video", - "VideoCodec": "h264", - "AudioCodec": "mp1,mp2,mp3,aac,ac3,eac3,dts,mlp,truehd", - "Protocol": "hls", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "mkv", - "Type": "Video", - "VideoCodec": "h264", - "AudioCodec": "pcm_s8,pcm_s16be,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,pcm_alaw,pcm_mulaw,mp1,mp2,mp3,aac,vorbis,opus,flac,alac,ac3,eac3,dts,mlp,truehd", - "Protocol": "hls", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "mp3", - "Type": "Audio", - "AudioCodec": "mp3", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - } - ], - "ContainerProfiles": [ - { - "Type": "Video", - "Container": "mp4", - "$type": "ContainerProfile" - }, - { - "Type": "Audio", - "Container": "mp4", - "$type": "ContainerProfile" - }, - { - "Type": "Video", - "Container": "fmp4", - "$type": "ContainerProfile" - }, - { - "Type": "Audio", - "Container": "fmp4", - "$type": "ContainerProfile" - }, - { - "Type": "Video", - "Container": "webm", - "$type": "ContainerProfile" - }, - { - "Type": "Audio", - "Container": "webm", - "$type": "ContainerProfile" - }, - { - "Type": "Video", - "Container": "mkv", - "$type": "ContainerProfile" - }, - { - "Type": "Audio", - "Container": "mkv", - "$type": "ContainerProfile" - }, - { - "Type": "Audio", - "Container": "mp3", - "$type": "ContainerProfile" - }, - { - "Type": "Audio", - "Container": "ogg", - "$type": "ContainerProfile" - }, - { - "Type": "Audio", - "Container": "wav", - "$type": "ContainerProfile" - }, - { - "Type": "Video", - "Container": "mpegts", - "$type": "ContainerProfile" - }, - { - "Type": "Audio", - "Container": "mpegts", - "$type": "ContainerProfile" - }, - { - "Type": "Video", - "Container": "flv", - "$type": "ContainerProfile" - }, - { - "Type": "Audio", - "Container": "flv", - "$type": "ContainerProfile" - }, - { - "Type": "Audio", - "Container": "aac", - "$type": "ContainerProfile" - }, - { - "Type": "Audio", - "Container": "flac", - "$type": "ContainerProfile" - }, - { - "Type": "Video", - "Container": "3gp", - "$type": "ContainerProfile" - }, - { - "Type": "Audio", - "Container": "3gp", - "$type": "ContainerProfile" - } - ], - "SubtitleProfiles": [ - { - "Format": "srt", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "subrip", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "ttml", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "srt", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "subrip", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "ttml", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "vtt", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "webvtt", - "Method": "External", - "$type": "SubtitleProfile" - } - ], - "$type": "DeviceProfile" -} diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Chrome-NoHLS.json b/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Chrome-NoHLS.json deleted file mode 100644 index 5d1f5f1620..0000000000 --- a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Chrome-NoHLS.json +++ /dev/null @@ -1,430 +0,0 @@ -{ - "EnableAlbumArtInDidl": false, - "EnableSingleAlbumArtLimit": false, - "EnableSingleSubtitleLimit": false, - "SupportedMediaTypes": "Audio,Photo,Video", - "MaxAlbumArtWidth": 0, - "MaxAlbumArtHeight": 0, - "MaxStreamingBitrate": 120000000, - "MaxStaticBitrate": 100000000, - "MusicStreamingTranscodingBitrate": 384000, - "TimelineOffsetSeconds": 0, - "RequiresPlainVideoItems": false, - "RequiresPlainFolders": false, - "EnableMSMediaReceiverRegistrar": false, - "IgnoreTranscodeByteRangeRequests": false, - "DirectPlayProfiles": [ - { - "Container": "webm", - "AudioCodec": "vorbis,opus", - "VideoCodec": "vp8,vp9,av1", - "Type": "Video", - "$type": "DirectPlayProfile" - }, - { - "Container": "mp4,m4v", - "AudioCodec": "aac,mp3,opus,flac,alac,vorbis", - "VideoCodec": "h264,vp8,vp9,av1", - "Type": "Video", - "$type": "DirectPlayProfile" - }, - { - "Container": "mov", - "AudioCodec": "aac,mp3,opus,flac,alac,vorbis", - "VideoCodec": "h264", - "Type": "Video", - "$type": "DirectPlayProfile" - }, - { - "Container": "opus", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "webm", - "AudioCodec": "opus", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "mp3", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "aac", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "m4a", - "AudioCodec": "aac", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "m4b", - "AudioCodec": "aac", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "flac", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "alac", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "m4a", - "AudioCodec": "alac", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "m4b", - "AudioCodec": "alac", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "webma", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "webm", - "AudioCodec": "webma", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "wav", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "ogg", - "Type": "Audio", - "$type": "DirectPlayProfile" - } - ], - "TranscodingProfiles": [ - { - "Container": "aac", - "Type": "Audio", - "AudioCodec": "aac", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "mp3", - "Type": "Audio", - "AudioCodec": "mp3", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "opus", - "Type": "Audio", - "AudioCodec": "opus", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "wav", - "Type": "Audio", - "AudioCodec": "wav", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "opus", - "Type": "Audio", - "AudioCodec": "opus", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Static", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "mp3", - "Type": "Audio", - "AudioCodec": "mp3", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Static", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "aac", - "Type": "Audio", - "AudioCodec": "aac", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Static", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "wav", - "Type": "Audio", - "AudioCodec": "wav", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Static", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "mp4", - "Type": "Video", - "VideoCodec": "h264", - "AudioCodec": "aac,mp3,opus,flac,alac,vorbis", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "webm", - "Type": "Video", - "VideoCodec": "vp8,vp9,av1,vpx", - "AudioCodec": "vorbis,opus", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "mp4", - "Type": "Video", - "VideoCodec": "h264", - "AudioCodec": "aac,mp3,opus,flac,alac,vorbis", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Static", - "EnableSubtitlesInManifest": false, - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - } - ], - "CodecProfiles": [ - { - "Type": "VideoAudio", - "Conditions": [ - { - "Condition": "Equals", - "Property": "IsSecondaryAudio", - "Value": "false", - "IsRequired": false, - "$type": "ProfileCondition" - } - ], - "Codec": "aac", - "$type": "CodecProfile" - }, - { - "Type": "VideoAudio", - "Conditions": [ - { - "Condition": "Equals", - "Property": "IsSecondaryAudio", - "Value": "false", - "IsRequired": false, - "$type": "ProfileCondition" - } - ], - "$type": "CodecProfile" - }, - { - "Type": "Video", - "Conditions": [ - { - "Condition": "NotEquals", - "Property": "IsAnamorphic", - "Value": "true", - "IsRequired": false, - "$type": "ProfileCondition" - }, - { - "Condition": "EqualsAny", - "Property": "VideoProfile", - "Value": "high|main|baseline|constrained baseline|high 10", - "IsRequired": false, - "$type": "ProfileCondition" - }, - { - "Condition": "LessThanEqual", - "Property": "VideoLevel", - "Value": "52", - "IsRequired": false, - "$type": "ProfileCondition" - }, - { - "Condition": "NotEquals", - "Property": "IsInterlaced", - "Value": "true", - "IsRequired": false, - "$type": "ProfileCondition" - } - ], - "Codec": "h264", - "$type": "CodecProfile" - }, - { - "Type": "Video", - "Conditions": [ - { - "Condition": "NotEquals", - "Property": "IsAnamorphic", - "Value": "true", - "IsRequired": false, - "$type": "ProfileCondition" - }, - { - "Condition": "EqualsAny", - "Property": "VideoProfile", - "Value": "main", - "IsRequired": false, - "$type": "ProfileCondition" - }, - { - "Condition": "LessThanEqual", - "Property": "VideoLevel", - "Value": "120", - "IsRequired": false, - "$type": "ProfileCondition" - }, - { - "Condition": "NotEquals", - "Property": "IsInterlaced", - "Value": "true", - "IsRequired": false, - "$type": "ProfileCondition" - } - ], - "Codec": "hevc", - "$type": "CodecProfile" - } - ], - "ResponseProfiles": [ - { - "Container": "m4v", - "Type": "Video", - "MimeType": "video/mp4", - "$type": "ResponseProfile" - } - ], - "SubtitleProfiles": [ - { - "Format": "vtt", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "ass", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "ssa", - "Method": "External", - "$type": "SubtitleProfile" - } - ], - "$type": "DeviceProfile" -} diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Chrome.json b/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Chrome.json deleted file mode 100644 index 81bb97ac82..0000000000 --- a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Chrome.json +++ /dev/null @@ -1,448 +0,0 @@ -{ - "EnableAlbumArtInDidl": false, - "EnableSingleAlbumArtLimit": false, - "EnableSingleSubtitleLimit": false, - "SupportedMediaTypes": "Audio,Photo,Video", - "MaxAlbumArtWidth": 0, - "MaxAlbumArtHeight": 0, - "MaxStreamingBitrate": 120000000, - "MaxStaticBitrate": 100000000, - "MusicStreamingTranscodingBitrate": 384000, - "TimelineOffsetSeconds": 0, - "RequiresPlainVideoItems": false, - "RequiresPlainFolders": false, - "EnableMSMediaReceiverRegistrar": false, - "IgnoreTranscodeByteRangeRequests": false, - "DirectPlayProfiles": [ - { - "Container": "webm", - "AudioCodec": "vorbis,opus", - "VideoCodec": "vp8,vp9,av1", - "Type": "Video", - "$type": "DirectPlayProfile" - }, - { - "Container": "mp4,m4v", - "AudioCodec": "aac,mp3,opus,flac,alac,vorbis", - "VideoCodec": "h264,vp8,vp9,av1", - "Type": "Video", - "$type": "DirectPlayProfile" - }, - { - "Container": "mov", - "AudioCodec": "aac,mp3,opus,flac,alac,vorbis", - "VideoCodec": "h264", - "Type": "Video", - "$type": "DirectPlayProfile" - }, - { - "Container": "opus", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "webm", - "AudioCodec": "opus", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "mp3", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "aac", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "m4a", - "AudioCodec": "aac", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "m4b", - "AudioCodec": "aac", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "flac", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "alac", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "m4a", - "AudioCodec": "alac", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "m4b", - "AudioCodec": "alac", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "webma", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "webm", - "AudioCodec": "webma", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "wav", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "ogg", - "Type": "Audio", - "$type": "DirectPlayProfile" - } - ], - "TranscodingProfiles": [ - { - "Container": "ts", - "Type": "Audio", - "AudioCodec": "aac", - "Protocol": "hls", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 2, - "SegmentLength": 0, - "BreakOnNonKeyFrames": true, - "$type": "TranscodingProfile" - }, - { - "Container": "aac", - "Type": "Audio", - "AudioCodec": "aac", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "mp3", - "Type": "Audio", - "AudioCodec": "mp3", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "opus", - "Type": "Audio", - "AudioCodec": "opus", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "wav", - "Type": "Audio", - "AudioCodec": "wav", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "opus", - "Type": "Audio", - "AudioCodec": "opus", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Static", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "mp3", - "Type": "Audio", - "AudioCodec": "mp3", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Static", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "aac", - "Type": "Audio", - "AudioCodec": "aac", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Static", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "wav", - "Type": "Audio", - "AudioCodec": "wav", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Static", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "ts", - "Type": "Video", - "VideoCodec": "h264", - "AudioCodec": "aac,mp3", - "Protocol": "hls", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 2, - "SegmentLength": 0, - "BreakOnNonKeyFrames": true, - "$type": "TranscodingProfile" - }, - { - "Container": "webm", - "Type": "Video", - "VideoCodec": "vp8,vp9,av1,vpx", - "AudioCodec": "vorbis,opus", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "mp4", - "Type": "Video", - "VideoCodec": "h264", - "AudioCodec": "aac,mp3,opus,flac,alac,vorbis", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Static", - "EnableSubtitlesInManifest": false, - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - } - ], - "CodecProfiles": [ - { - "Type": "VideoAudio", - "Conditions": [ - { - "Condition": "Equals", - "Property": "IsSecondaryAudio", - "Value": "false", - "IsRequired": false, - "$type": "ProfileCondition" - } - ], - "Codec": "aac", - "$type": "CodecProfile" - }, - { - "Type": "VideoAudio", - "Conditions": [ - { - "Condition": "Equals", - "Property": "IsSecondaryAudio", - "Value": "false", - "IsRequired": false, - "$type": "ProfileCondition" - } - ], - "$type": "CodecProfile" - }, - { - "Type": "Video", - "Conditions": [ - { - "Condition": "NotEquals", - "Property": "IsAnamorphic", - "Value": "true", - "IsRequired": false, - "$type": "ProfileCondition" - }, - { - "Condition": "EqualsAny", - "Property": "VideoProfile", - "Value": "high|main|baseline|constrained baseline|high 10", - "IsRequired": false, - "$type": "ProfileCondition" - }, - { - "Condition": "LessThanEqual", - "Property": "VideoLevel", - "Value": "52", - "IsRequired": false, - "$type": "ProfileCondition" - }, - { - "Condition": "NotEquals", - "Property": "IsInterlaced", - "Value": "true", - "IsRequired": false, - "$type": "ProfileCondition" - } - ], - "Codec": "h264", - "$type": "CodecProfile" - }, - { - "Type": "Video", - "Conditions": [ - { - "Condition": "NotEquals", - "Property": "IsAnamorphic", - "Value": "true", - "IsRequired": false, - "$type": "ProfileCondition" - }, - { - "Condition": "EqualsAny", - "Property": "VideoProfile", - "Value": "main", - "IsRequired": false, - "$type": "ProfileCondition" - }, - { - "Condition": "LessThanEqual", - "Property": "VideoLevel", - "Value": "120", - "IsRequired": false, - "$type": "ProfileCondition" - }, - { - "Condition": "NotEquals", - "Property": "IsInterlaced", - "Value": "true", - "IsRequired": false, - "$type": "ProfileCondition" - } - ], - "Codec": "hevc", - "$type": "CodecProfile" - } - ], - "ResponseProfiles": [ - { - "Container": "m4v", - "Type": "Video", - "MimeType": "video/mp4", - "$type": "ResponseProfile" - } - ], - "SubtitleProfiles": [ - { - "Format": "vtt", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "ass", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "ssa", - "Method": "External", - "$type": "SubtitleProfile" - } - ], - "$type": "DeviceProfile" -} diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-DirectMedia.json b/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-DirectMedia.json deleted file mode 100644 index d1df7341e1..0000000000 --- a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-DirectMedia.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "Name": "Jellyfin Media Player", - "SupportedMediaTypes": "Audio,Photo,Video", - "MaxStreamingBitrate": 20000000, - "MaxStaticBitrate": 20000000, - "MusicStreamingTranscodingBitrate": 1280000, - "TimelineOffsetSeconds": 5, - "DirectPlayProfiles": [ - { - "Type": "Video", - "$type": "DirectPlayProfile" - }, - { - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Type": "Photo", - "$type": "DirectPlayProfile" - } - ], - "SubtitleProfiles": [ - { - "Format": "srt", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "srt", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "ass", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "ass", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "sub", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "sub", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "ssa", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "ssa", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "smi", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "smi", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "pgssub", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "dvdsub", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "pgs", - "Method": "Embed", - "$type": "SubtitleProfile" - } - ], - "$type": "DeviceProfile" -} diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Firefox.json b/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Firefox.json deleted file mode 100644 index 9874793d37..0000000000 --- a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Firefox.json +++ /dev/null @@ -1,441 +0,0 @@ -{ - "EnableAlbumArtInDidl": false, - "EnableSingleAlbumArtLimit": false, - "EnableSingleSubtitleLimit": false, - "SupportedMediaTypes": "Audio,Photo,Video", - "MaxAlbumArtWidth": 0, - "MaxAlbumArtHeight": 0, - "MaxStreamingBitrate": 120000000, - "MaxStaticBitrate": 100000000, - "MusicStreamingTranscodingBitrate": 384000, - "TimelineOffsetSeconds": 0, - "RequiresPlainVideoItems": false, - "RequiresPlainFolders": false, - "EnableMSMediaReceiverRegistrar": false, - "IgnoreTranscodeByteRangeRequests": false, - "DirectPlayProfiles": [ - { - "Container": "webm", - "AudioCodec": "vorbis,opus", - "VideoCodec": "vp8,vp9,av1", - "Type": "Video", - "$type": "DirectPlayProfile" - }, - { - "Container": "mp4,m4v", - "AudioCodec": "aac,mp3,opus,flac,alac,vorbis", - "VideoCodec": "h264,vp8,vp9,av1", - "Type": "Video", - "$type": "DirectPlayProfile" - }, - { - "Container": "opus", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "webm", - "AudioCodec": "opus", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "mp3", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "aac", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "m4a", - "AudioCodec": "aac", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "m4b", - "AudioCodec": "aac", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "flac", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "alac", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "m4a", - "AudioCodec": "alac", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "m4b", - "AudioCodec": "alac", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "webma", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "webm", - "AudioCodec": "webma", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "wav", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "ogg", - "Type": "Audio", - "$type": "DirectPlayProfile" - } - ], - "TranscodingProfiles": [ - { - "Container": "ts", - "Type": "Audio", - "AudioCodec": "aac", - "Protocol": "hls", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 2, - "SegmentLength": 0, - "BreakOnNonKeyFrames": true, - "$type": "TranscodingProfile" - }, - { - "Container": "aac", - "Type": "Audio", - "AudioCodec": "aac", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "mp3", - "Type": "Audio", - "AudioCodec": "mp3", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "opus", - "Type": "Audio", - "AudioCodec": "opus", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "wav", - "Type": "Audio", - "AudioCodec": "wav", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "opus", - "Type": "Audio", - "AudioCodec": "opus", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Static", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "mp3", - "Type": "Audio", - "AudioCodec": "mp3", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Static", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "aac", - "Type": "Audio", - "AudioCodec": "aac", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Static", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "wav", - "Type": "Audio", - "AudioCodec": "wav", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Static", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "ts", - "Type": "Video", - "VideoCodec": "h264", - "AudioCodec": "aac,mp3", - "Protocol": "hls", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 2, - "SegmentLength": 0, - "BreakOnNonKeyFrames": true, - "$type": "TranscodingProfile" - }, - { - "Container": "webm", - "Type": "Video", - "VideoCodec": "vp8,vp9,av1,vpx", - "AudioCodec": "vorbis,opus", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "mp4", - "Type": "Video", - "VideoCodec": "h264", - "AudioCodec": "aac,mp3,opus,flac,alac,vorbis", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Static", - "EnableSubtitlesInManifest": false, - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - } - ], - "CodecProfiles": [ - { - "Type": "VideoAudio", - "Conditions": [ - { - "Condition": "Equals", - "Property": "IsSecondaryAudio", - "Value": "false", - "IsRequired": false, - "$type": "ProfileCondition" - } - ], - "Codec": "aac", - "$type": "CodecProfile" - }, - { - "Type": "VideoAudio", - "Conditions": [ - { - "Condition": "Equals", - "Property": "IsSecondaryAudio", - "Value": "false", - "IsRequired": false, - "$type": "ProfileCondition" - } - ], - "$type": "CodecProfile" - }, - { - "Type": "Video", - "Conditions": [ - { - "Condition": "NotEquals", - "Property": "IsAnamorphic", - "Value": "true", - "IsRequired": false, - "$type": "ProfileCondition" - }, - { - "Condition": "EqualsAny", - "Property": "VideoProfile", - "Value": "high|main|baseline|constrained baseline", - "IsRequired": false, - "$type": "ProfileCondition" - }, - { - "Condition": "LessThanEqual", - "Property": "VideoLevel", - "Value": "52", - "IsRequired": false, - "$type": "ProfileCondition" - }, - { - "Condition": "NotEquals", - "Property": "IsInterlaced", - "Value": "true", - "IsRequired": false, - "$type": "ProfileCondition" - } - ], - "Codec": "h264", - "$type": "CodecProfile" - }, - { - "Type": "Video", - "Conditions": [ - { - "Condition": "NotEquals", - "Property": "IsAnamorphic", - "Value": "true", - "IsRequired": false, - "$type": "ProfileCondition" - }, - { - "Condition": "EqualsAny", - "Property": "VideoProfile", - "Value": "main", - "IsRequired": false, - "$type": "ProfileCondition" - }, - { - "Condition": "LessThanEqual", - "Property": "VideoLevel", - "Value": "120", - "IsRequired": false, - "$type": "ProfileCondition" - }, - { - "Condition": "NotEquals", - "Property": "IsInterlaced", - "Value": "true", - "IsRequired": false, - "$type": "ProfileCondition" - } - ], - "Codec": "hevc", - "$type": "CodecProfile" - } - ], - "ResponseProfiles": [ - { - "Container": "m4v", - "Type": "Video", - "MimeType": "video/mp4", - "$type": "ResponseProfile" - } - ], - "SubtitleProfiles": [ - { - "Format": "vtt", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "ass", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "ssa", - "Method": "External", - "$type": "SubtitleProfile" - } - ], - "$type": "DeviceProfile" -} diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-JellyfinMediaPlayer.json b/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-JellyfinMediaPlayer.json deleted file mode 100644 index da9a1a4ada..0000000000 --- a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-JellyfinMediaPlayer.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "Name": "Jellyfin Media Player", - "SupportedMediaTypes": "Audio,Photo,Video", - "MaxStreamingBitrate": 8000000, - "MaxStaticBitrate": 8000000, - "MusicStreamingTranscodingBitrate": 1280000, - "TimelineOffsetSeconds": 5, - "DirectPlayProfiles": [ - { - "Type": "Video", - "$type": "DirectPlayProfile" - }, - { - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Type": "Photo", - "$type": "DirectPlayProfile" - } - ], - "TranscodingProfiles": [ - { - "Type": "Audio", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "ts", - "Type": "Video", - "VideoCodec": "h264,h265,hevc,mpeg4,mpeg2video", - "AudioCodec": "aac,mp3,ac3,opus,flac,vorbis", - "Protocol": "hls", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "jpeg", - "Type": "Photo", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - } - ], - "SubtitleProfiles": [ - { - "Format": "srt", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "srt", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "ass", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "ass", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "sub", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "sub", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "ssa", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "ssa", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "smi", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "smi", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "pgssub", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "dvdsub", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "pgs", - "Method": "Embed", - "$type": "SubtitleProfile" - } - ], - "$type": "DeviceProfile" -} diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-LowBandwidth.json b/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-LowBandwidth.json deleted file mode 100644 index 82b73fb0f8..0000000000 --- a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-LowBandwidth.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "Name": "Jellyfin Media Player", - "SupportedMediaTypes": "Audio,Photo,Video", - "MaxStreamingBitrate": 120000, - "MaxStaticBitrate": 100000, - "MusicStreamingTranscodingBitrate": 3840, - "TimelineOffsetSeconds": 5, - "DirectPlayProfiles": [ - { - "Type": "Video", - "$type": "DirectPlayProfile" - }, - { - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Type": "Photo", - "$type": "DirectPlayProfile" - } - ], - "TranscodingProfiles": [ - { - "Type": "Audio", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "ts", - "Type": "Video", - "VideoCodec": "h264,h265,hevc,mpeg4,mpeg2video", - "AudioCodec": "aac,mp3,ac3,opus,flac,vorbis", - "Protocol": "hls", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "jpeg", - "Type": "Photo", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - } - ], - "SubtitleProfiles": [ - { - "Format": "srt", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "srt", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "ass", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "ass", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "sub", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "sub", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "ssa", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "ssa", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "smi", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "smi", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "pgssub", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "dvdsub", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "pgs", - "Method": "Embed", - "$type": "SubtitleProfile" - } - ], - "$type": "DeviceProfile" -} diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Null.json b/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Null.json deleted file mode 100644 index d463bd896f..0000000000 --- a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Null.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "Name": "Jellyfin Media Player", - "SupportedMediaTypes": "Audio,Photo,Video", - "MaxStreamingBitrate": 120000, - "MaxStaticBitrate": 100000, - "MusicStreamingTranscodingBitrate": 3840, - "TimelineOffsetSeconds": 5, - "$type": "DeviceProfile" -} diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-RokuSSPlus.json b/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-RokuSSPlus.json deleted file mode 100644 index 37b923558b..0000000000 --- a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-RokuSSPlus.json +++ /dev/null @@ -1,211 +0,0 @@ -{ - "EnableAlbumArtInDidl": false, - "EnableSingleAlbumArtLimit": false, - "EnableSingleSubtitleLimit": false, - "SupportedMediaTypes": "Audio,Photo,Video", - "MaxAlbumArtWidth": 0, - "MaxAlbumArtHeight": 0, - "MaxStreamingBitrate": 120000000, - "MaxStaticBitrate": 100000000, - "MusicStreamingTranscodingBitrate": 192000, - "TimelineOffsetSeconds": 0, - "RequiresPlainVideoItems": false, - "RequiresPlainFolders": false, - "EnableMSMediaReceiverRegistrar": false, - "IgnoreTranscodeByteRangeRequests": false, - "DirectPlayProfiles": [ - { - "Container": "mp4,m4v,mov", - "AudioCodec": "mp3,pcm,lpcm,wav,alac,aac", - "VideoCodec": "h264,h265,hevc,mpeg2video", - "Type": "Video", - "$type": "DirectPlayProfile" - }, - { - "Container": "mkv,webm", - "AudioCodec": "mp3,pcm,lpcm,wav,flac,alac,aac,opus,vorbis", - "VideoCodec": "h264,vp8,h265,hevc,vp9,mpeg2video", - "Type": "Video", - "$type": "DirectPlayProfile" - }, - { - "Container": "mp3,pcm,lpcm,wav,wma,flac,alac,aac,wmapro", - "Type": "Audio", - "$type": "DirectPlayProfile" - } - ], - "TranscodingProfiles": [ - { - "Container": "aac", - "Type": "Audio", - "AudioCodec": "aac", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": " 2", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "mp3", - "Type": "Audio", - "AudioCodec": "mp3", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "2", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "mp3", - "Type": "Audio", - "AudioCodec": "mp3", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Static", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "2", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "aac", - "Type": "Audio", - "AudioCodec": "aac", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Static", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": " 2", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "ts", - "Type": "Video", - "VideoCodec": "h264,mpeg2video", - "AudioCodec": "aac", - "Protocol": "hls", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": " 2", - "MinSegments": 1, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "mp4", - "Type": "Video", - "VideoCodec": "h264,h265,hevc,mpeg2video", - "AudioCodec": "mp3,pcm,lpcm,wav,alac,aac", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Static", - "EnableSubtitlesInManifest": false, - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - } - ], - "CodecProfiles": [ - { - "Type": "Video", - "Conditions": [ - { - "Condition": "EqualsAny", - "Property": "VideoProfile", - "Value": "high|main|baseline|constrained baseline", - "IsRequired": false, - "$type": "ProfileCondition" - }, - { - "Condition": "LessThanEqual", - "Property": "VideoLevel", - "Value": "51", - "IsRequired": false, - "$type": "ProfileCondition" - } - ], - "Codec": "h264", - "$type": "CodecProfile" - }, - { - "Type": "Video", - "Conditions": [ - { - "Condition": "NotEquals", - "Property": "IsAnamorphic", - "Value": "true", - "IsRequired": false, - "$type": "ProfileCondition" - }, - { - "Condition": "EqualsAny", - "Property": "VideoProfile", - "Value": "main|main 10", - "IsRequired": false, - "$type": "ProfileCondition" - }, - { - "Condition": "NotEquals", - "Property": "IsInterlaced", - "Value": "true", - "IsRequired": false, - "$type": "ProfileCondition" - } - ], - "Codec": "hevc", - "$type": "CodecProfile" - } - ], - "SubtitleProfiles": [ - { - "Format": "vtt", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "srt", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "ttml", - "Method": "External", - "$type": "SubtitleProfile" - } - ], - "$type": "DeviceProfile" -} diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-RokuSSPlusNext.json b/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-RokuSSPlusNext.json deleted file mode 100644 index 542bf6370a..0000000000 --- a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-RokuSSPlusNext.json +++ /dev/null @@ -1,211 +0,0 @@ -{ - "EnableAlbumArtInDidl": false, - "EnableSingleAlbumArtLimit": false, - "EnableSingleSubtitleLimit": false, - "SupportedMediaTypes": "Audio,Photo,Video", - "MaxAlbumArtWidth": 0, - "MaxAlbumArtHeight": 0, - "MaxStreamingBitrate": 120000000, - "MaxStaticBitrate": 100000000, - "MusicStreamingTranscodingBitrate": 192000, - "TimelineOffsetSeconds": 0, - "RequiresPlainVideoItems": false, - "RequiresPlainFolders": false, - "EnableMSMediaReceiverRegistrar": false, - "IgnoreTranscodeByteRangeRequests": false, - "DirectPlayProfiles": [ - { - "Container": "mp4,m4v,mov", - "AudioCodec": "mp3,pcm,lpcm,wav,alac,aac", - "VideoCodec": "h264,h265,hevc,mpeg2video", - "Type": "Video", - "$type": "DirectPlayProfile" - }, - { - "Container": "mkv,webm", - "AudioCodec": "mp3,pcm,lpcm,wav,flac,alac,aac,opus,vorbis", - "VideoCodec": "h264,vp8,h265,hevc,vp9,mpeg2video", - "Type": "Video", - "$type": "DirectPlayProfile" - }, - { - "Container": "mp3,pcm,lpcm,wav,wma,flac,alac,aac,wmapro", - "Type": "Audio", - "$type": "DirectPlayProfile" - } - ], - "TranscodingProfiles": [ - { - "Container": "aac", - "Type": "Audio", - "AudioCodec": "aac", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": " 2", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "mp3", - "Type": "Audio", - "AudioCodec": "mp3", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "2", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "mp3", - "Type": "Audio", - "AudioCodec": "mp3", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Static", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "2", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "aac", - "Type": "Audio", - "AudioCodec": "aac", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Static", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": " 2", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "ts", - "Type": "Video", - "VideoCodec": "h264,h265,hevc,mpeg2video", - "AudioCodec": "aac", - "Protocol": "hls", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": " 2", - "MinSegments": 1, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "mp4", - "Type": "Video", - "VideoCodec": "h264,h265,hevc,mpeg2video", - "AudioCodec": "mp3,pcm,lpcm,wav,alac,aac", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Static", - "EnableSubtitlesInManifest": false, - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - } - ], - "CodecProfiles": [ - { - "Type": "Video", - "Conditions": [ - { - "Condition": "EqualsAny", - "Property": "VideoProfile", - "Value": "high|main|baseline|constrained baseline", - "IsRequired": false, - "$type": "ProfileCondition" - }, - { - "Condition": "LessThanEqual", - "Property": "VideoLevel", - "Value": "51", - "IsRequired": false, - "$type": "ProfileCondition" - } - ], - "Codec": "h264", - "$type": "CodecProfile" - }, - { - "Type": "Video", - "Conditions": [ - { - "Condition": "NotEquals", - "Property": "IsAnamorphic", - "Value": "true", - "IsRequired": false, - "$type": "ProfileCondition" - }, - { - "Condition": "EqualsAny", - "Property": "VideoProfile", - "Value": "main|main 10", - "IsRequired": false, - "$type": "ProfileCondition" - }, - { - "Condition": "NotEquals", - "Property": "IsInterlaced", - "Value": "true", - "IsRequired": false, - "$type": "ProfileCondition" - } - ], - "Codec": "hevc", - "$type": "CodecProfile" - } - ], - "SubtitleProfiles": [ - { - "Format": "vtt", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "srt", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "ttml", - "Method": "External", - "$type": "SubtitleProfile" - } - ], - "$type": "DeviceProfile" -} diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-SafariNext.json b/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-SafariNext.json deleted file mode 100644 index 3b5a0c2549..0000000000 --- a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-SafariNext.json +++ /dev/null @@ -1,357 +0,0 @@ -{ - "EnableAlbumArtInDidl": false, - "EnableSingleAlbumArtLimit": false, - "EnableSingleSubtitleLimit": false, - "SupportedMediaTypes": "Audio,Photo,Video", - "MaxAlbumArtWidth": 0, - "MaxAlbumArtHeight": 0, - "MaxStreamingBitrate": 120000000, - "MaxStaticBitrate": 100000000, - "MusicStreamingTranscodingBitrate": 384000, - "TimelineOffsetSeconds": 0, - "RequiresPlainVideoItems": false, - "RequiresPlainFolders": false, - "EnableMSMediaReceiverRegistrar": false, - "IgnoreTranscodeByteRangeRequests": false, - "DirectPlayProfiles": [ - { - "Container": "webm", - "AudioCodec": "vorbis", - "VideoCodec": "vp8,vp9", - "Type": "Video", - "$type": "DirectPlayProfile" - }, - { - "Container": "mp4,m4v", - "AudioCodec": "aac,mp3,ac3,eac3,flac,alac,vorbis", - "VideoCodec": "h264,vp8,vp9", - "Type": "Video", - "$type": "DirectPlayProfile" - }, - { - "Container": "mov", - "AudioCodec": "aac,mp3,ac3,eac3,flac,alac,vorbis", - "VideoCodec": "h264", - "Type": "Video", - "$type": "DirectPlayProfile" - }, - { - "Container": "mp3", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "aac", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "m4a", - "AudioCodec": "aac", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "m4b", - "AudioCodec": "aac", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "flac", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "alac", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "m4a", - "AudioCodec": "alac", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "m4b", - "AudioCodec": "alac", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "webma", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "webm", - "AudioCodec": "webma", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "wav", - "Type": "Audio", - "$type": "DirectPlayProfile" - } - ], - "TranscodingProfiles": [ - { - "Container": "aac", - "Type": "Audio", - "AudioCodec": "aac", - "Protocol": "hls", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 2, - "SegmentLength": 0, - "BreakOnNonKeyFrames": true, - "$type": "TranscodingProfile" - }, - { - "Container": "aac", - "Type": "Audio", - "AudioCodec": "aac", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "mp3", - "Type": "Audio", - "AudioCodec": "mp3", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "wav", - "Type": "Audio", - "AudioCodec": "wav", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "mp3", - "Type": "Audio", - "AudioCodec": "mp3", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Static", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "aac", - "Type": "Audio", - "AudioCodec": "aac", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Static", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "wav", - "Type": "Audio", - "AudioCodec": "wav", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Static", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "mp4", - "Type": "Video", - "AudioCodec": "aac,ac3,eac3,flac,alac", - "VideoCodec": "hevc,h264", - "Context": "Streaming", - "Protocol": "hls", - "MaxAudioChannels": "2", - "MinSegments": "2", - "BreakOnNonKeyFrames": true - }, - { - "Container": "ts", - "Type": "Video", - "AudioCodec": "aac,mp3,ac3,eac3", - "VideoCodec": "h264", - "Context": "Streaming", - "Protocol": "hls", - "MaxAudioChannels": "2", - "MinSegments": "2", - "BreakOnNonKeyFrames": true - }, - { - "Container": "webm", - "Type": "Video", - "AudioCodec": "vorbis", - "VideoCodec": "vp8,vpx", - "Context": "Streaming", - "Protocol": "http", - "MaxAudioChannels": "2" - }, - { - "Container": "mp4", - "Type": "Video", - "AudioCodec": "aac,mp3,ac3,eac3,flac,alac,vorbis", - "VideoCodec": "h264", - "Context": "Static", - "Protocol": "http" - } - ], - "CodecProfiles": [ - { - "Type": "Video", - "Conditions": [ - { - "Condition": "NotEquals", - "Property": "IsAnamorphic", - "Value": "true", - "IsRequired": false, - "$type": "ProfileCondition" - }, - { - "Condition": "EqualsAny", - "Property": "VideoProfile", - "Value": "high|main|baseline|constrained baseline", - "IsRequired": false, - "$type": "ProfileCondition" - }, - { - "Condition": "LessThanEqual", - "Property": "VideoLevel", - "Value": "52", - "IsRequired": false, - "$type": "ProfileCondition" - }, - { - "Condition": "NotEquals", - "Property": "IsInterlaced", - "Value": "true", - "IsRequired": false, - "$type": "ProfileCondition" - } - ], - "Codec": "h264", - "$type": "CodecProfile" - }, - { - "Type": "Video", - "Conditions": [ - { - "Condition": "NotEquals", - "Property": "IsAnamorphic", - "Value": "true", - "IsRequired": false, - "$type": "ProfileCondition" - }, - { - "Condition": "EqualsAny", - "Property": "VideoProfile", - "Value": "main|main 10", - "IsRequired": false, - "$type": "ProfileCondition" - }, - { - "Condition": "LessThanEqual", - "Property": "VideoLevel", - "Value": "183", - "IsRequired": false, - "$type": "ProfileCondition" - }, - { - "Condition": "NotEquals", - "Property": "IsInterlaced", - "Value": "true", - "IsRequired": false, - "$type": "ProfileCondition" - } - ], - "Codec": "hevc", - "$type": "CodecProfile" - } - ], - "ResponseProfiles": [ - { - "Container": "m4v", - "Type": "Video", - "MimeType": "video/mp4", - "$type": "ResponseProfile" - } - ], - "SubtitleProfiles": [ - { - "Format": "vtt", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "ass", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "ssa", - "Method": "External", - "$type": "SubtitleProfile" - } - ], - "$type": "DeviceProfile" -} diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-TranscodeMedia.json b/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-TranscodeMedia.json deleted file mode 100644 index 9fc1ae6bb2..0000000000 --- a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-TranscodeMedia.json +++ /dev/null @@ -1,139 +0,0 @@ -{ - "Name": "Jellyfin Media Player", - "SupportedMediaTypes": "Audio,Photo,Video", - "MaxStreamingBitrate": 20000000, - "MaxStaticBitrate": 20000000, - "MusicStreamingTranscodingBitrate": 1280000, - "TimelineOffsetSeconds": 5, - "TranscodingProfiles": [ - { - "Type": "Audio", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "mp4", - "Type": "Video", - "AudioCodec": "aac,flac,alac", - "VideoCodec": "hevc,h264", - "Context": "Streaming", - "Protocol": "hls", - "MaxAudioChannels": "2", - "MinSegments": "2", - "BreakOnNonKeyFrames": true, - "$type": "TranscodingProfile" - }, - { - "Container": "ts", - "Type": "Video", - "AudioCodec": "aac,mp3", - "VideoCodec": "h264", - "Context": "Streaming", - "Protocol": "hls", - "MaxAudioChannels": "2", - "MinSegments": "2", - "BreakOnNonKeyFrames": true, - "$type": "TranscodingProfile" - }, - { - "Container": "webm", - "Type": "Video", - "AudioCodec": "vorbis", - "VideoCodec": "vp9,vp8,vpx,av1", - "Context": "Streaming", - "Protocol": "http", - "MaxAudioChannels": "2", - "$type": "TranscodingProfile" - }, - { - "Container": "jpeg", - "Type": "Photo", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - } - ], - "SubtitleProfiles": [ - { - "Format": "srt", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "srt", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "ass", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "ass", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "sub", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "sub", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "ssa", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "ssa", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "smi", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "smi", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "pgssub", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "dvdsub", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "pgs", - "Method": "Embed", - "$type": "SubtitleProfile" - } - ], - "$type": "DeviceProfile" -} diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Yatse.json b/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Yatse.json deleted file mode 100644 index 256c8dc2f0..0000000000 --- a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Yatse.json +++ /dev/null @@ -1,189 +0,0 @@ -{ - "EnableAlbumArtInDidl": false, - "EnableSingleAlbumArtLimit": false, - "EnableSingleSubtitleLimit": false, - "SupportedMediaTypes": "Audio,Photo,Video", - "MaxAlbumArtWidth": 0, - "MaxAlbumArtHeight": 0, - "MaxStreamingBitrate": 120000000, - "MaxStaticBitrate": 100000000, - "MusicStreamingTranscodingBitrate": 192000, - "TimelineOffsetSeconds": 0, - "RequiresPlainVideoItems": false, - "RequiresPlainFolders": false, - "EnableMSMediaReceiverRegistrar": false, - "IgnoreTranscodeByteRangeRequests": false, - "DirectPlayProfiles": [ - { - "Container": "", - "AudioCodec": "aac", - "VideoCodec": "", - "Type": "Video", - "$type": "DirectPlayProfile" - }, - { - "Container": "ts,mp4,mka,m4a,mp3,mp2,wav,flac,ogg", - "AudioCodec": "", - "VideoCodec": "", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "", - "AudioCodec": "", - "VideoCodec": "", - "Type": "Photo", - "$type": "DirectPlayProfile" - } - ], - "TranscodingProfiles": [ - { - "Container": "ts", - "Type": "Video", - "VideoCodec": "h264", - "AudioCodec": "aac", - "Protocol": "hls", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": true, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "mp3", - "Type": "Audio", - "VideoCodec": "", - "AudioCodec": "mp3", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Static", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "mp3", - "Type": "Audio", - "VideoCodec": "", - "AudioCodec": "mp3", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - } - ], - "CodecProfiles": [ - { - "Type": "VideoAudio", - "Conditions": [ - { - "Condition": "Equals", - "Property": "IsSecondaryAudio", - "Value": "false", - "IsRequired": false, - "$type": "ProfileCondition" - } - ], - "Codec": "", - "Container": "", - "$type": "CodecProfile" - } - ], - "ResponseProfiles": [ - { - "Container": "m4v", - "Type": "Video", - "MimeType": "video/mp4", - "$type": "ResponseProfile" - }, - { - "Container": "mov", - "Type": "Video", - "MimeType": "video/webm", - "$type": "ResponseProfile" - } - ], - "SubtitleProfiles": [ - { - "Format": "vtt", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "srt", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "ass", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "ssa", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "smi", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "subrip", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "sub", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "dvdsub", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "pgs", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "pgssub", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "srt", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "sub", - "Method": "External", - "$type": "SubtitleProfile" - } - ], - "$type": "DeviceProfile" -} diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Yatse2.json b/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Yatse2.json deleted file mode 100644 index 256c8dc2f0..0000000000 --- a/tests/Jellyfin.Dlna.Tests/Test Data/DeviceProfile-Yatse2.json +++ /dev/null @@ -1,189 +0,0 @@ -{ - "EnableAlbumArtInDidl": false, - "EnableSingleAlbumArtLimit": false, - "EnableSingleSubtitleLimit": false, - "SupportedMediaTypes": "Audio,Photo,Video", - "MaxAlbumArtWidth": 0, - "MaxAlbumArtHeight": 0, - "MaxStreamingBitrate": 120000000, - "MaxStaticBitrate": 100000000, - "MusicStreamingTranscodingBitrate": 192000, - "TimelineOffsetSeconds": 0, - "RequiresPlainVideoItems": false, - "RequiresPlainFolders": false, - "EnableMSMediaReceiverRegistrar": false, - "IgnoreTranscodeByteRangeRequests": false, - "DirectPlayProfiles": [ - { - "Container": "", - "AudioCodec": "aac", - "VideoCodec": "", - "Type": "Video", - "$type": "DirectPlayProfile" - }, - { - "Container": "ts,mp4,mka,m4a,mp3,mp2,wav,flac,ogg", - "AudioCodec": "", - "VideoCodec": "", - "Type": "Audio", - "$type": "DirectPlayProfile" - }, - { - "Container": "", - "AudioCodec": "", - "VideoCodec": "", - "Type": "Photo", - "$type": "DirectPlayProfile" - } - ], - "TranscodingProfiles": [ - { - "Container": "ts", - "Type": "Video", - "VideoCodec": "h264", - "AudioCodec": "aac", - "Protocol": "hls", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": true, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "mp3", - "Type": "Audio", - "VideoCodec": "", - "AudioCodec": "mp3", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Static", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - }, - { - "Container": "mp3", - "Type": "Audio", - "VideoCodec": "", - "AudioCodec": "mp3", - "Protocol": "http", - "EstimateContentLength": false, - "EnableMpegtsM2TsMode": false, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": false, - "Context": "Streaming", - "EnableSubtitlesInManifest": false, - "MaxAudioChannels": "6", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": false, - "$type": "TranscodingProfile" - } - ], - "CodecProfiles": [ - { - "Type": "VideoAudio", - "Conditions": [ - { - "Condition": "Equals", - "Property": "IsSecondaryAudio", - "Value": "false", - "IsRequired": false, - "$type": "ProfileCondition" - } - ], - "Codec": "", - "Container": "", - "$type": "CodecProfile" - } - ], - "ResponseProfiles": [ - { - "Container": "m4v", - "Type": "Video", - "MimeType": "video/mp4", - "$type": "ResponseProfile" - }, - { - "Container": "mov", - "Type": "Video", - "MimeType": "video/webm", - "$type": "ResponseProfile" - } - ], - "SubtitleProfiles": [ - { - "Format": "vtt", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "srt", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "ass", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "ssa", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "smi", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "subrip", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "sub", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "dvdsub", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "pgs", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "pgssub", - "Method": "Embed", - "$type": "SubtitleProfile" - }, - { - "Format": "srt", - "Method": "External", - "$type": "SubtitleProfile" - }, - { - "Format": "sub", - "Method": "External", - "$type": "SubtitleProfile" - } - ], - "$type": "DeviceProfile" -} diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-av1-aac-srt-2600k.json b/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-av1-aac-srt-2600k.json deleted file mode 100644 index da185aacfb..0000000000 --- a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-av1-aac-srt-2600k.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "Id": "a766d122b58e45d9492d17af66748bf5", - "Path": "/Media/MyVideo-720p.mkv", - "Container": "mkv,webm", - "Size": 835317696, - "Name": "MyVideo-1080p", - "ETag": "579a34c6d5dfb23f61539a51220b6a23", - "RunTimeTicks": 25801230336, - "SupportsTranscoding": true, - "SupportsDirectStream": true, - "SupportsDirectPlay": true, - "SupportsProbing": true, - "MediaStreams": [ - { - "Codec": "av1", - "Language": "eng", - "ColorTransfer": "bt709", - "ColorPrimaries": "bt709", - "TimeBase": "1/11988", - "VideoRange": "SDR", - "DisplayTitle": "1080p AV1 SDR", - "NalLengthSize": "0", - "BitRate": 2032876, - "BitDepth": 8, - "RefFrames": 1, - "IsDefault": true, - "Height": 720, - "Width": 1280, - "AverageFrameRate": 23.976, - "RealFrameRate": 23.976, - "Profile": "Main", - "Type": 1, - "AspectRatio": "16:9", - "PixelFormat": "yuv420p", - "Level": -99 - }, - { - "Codec": "aac", - "CodecTag": "mp4a", - "Language": "eng", - "TimeBase": "1/48000", - "DisplayTitle": "En - AAC - Stereo - Default", - "ChannelLayout": "stereo", - "BitRate": 164741, - "Channels": 2, - "SampleRate": 48000, - "IsDefault": true, - "Profile": "LC", - "Index": 1, - "Score": 203 - }, - { - "Codec": "srt", - "Language": "eng", - "TimeBase": "1/1000000", - "localizedUndefined": "Undefined", - "localizedDefault": "Default", - "localizedForced": "Forced", - "DisplayTitle": "En - Default", - "BitRate": 92, - "IsDefault": true, - "Type": 2, - "Index": 2, - "Score": 6421, - "IsExternal": true, - "IsTextSubtitleStream": true, - "SupportsExternalStream": true - } - ], - "Bitrate": 2590008, - "DefaultAudioStreamIndex": 1, - "DefaultSubtitleStreamIndex": 2 -} diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-av1-vorbis-srt-2600k.json b/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-av1-vorbis-srt-2600k.json deleted file mode 100644 index 774dba32ae..0000000000 --- a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-av1-vorbis-srt-2600k.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "Id": "a766d122b58e45d9492d17af66748bf5", - "Path": "/Media/MyVideo-720p.mkv", - "Container": "mkv,webm", - "Size": 835317696, - "Name": "MyVideo-1080p", - "ETag": "579a34c6d5dfb23f61539a51220b6a23", - "RunTimeTicks": 25801230336, - "SupportsTranscoding": true, - "SupportsDirectStream": true, - "SupportsDirectPlay": true, - "SupportsProbing": true, - "MediaStreams": [ - { - "Codec": "av1", - "Language": "eng", - "ColorTransfer": "bt709", - "ColorPrimaries": "bt709", - "TimeBase": "1/11988", - "VideoRange": "SDR", - "DisplayTitle": "1080p AV1 SDR", - "NalLengthSize": "0", - "BitRate": 2032876, - "BitDepth": 8, - "RefFrames": 1, - "IsDefault": true, - "Height": 720, - "Width": 1280, - "AverageFrameRate": 23.976, - "RealFrameRate": 23.976, - "Profile": "Main", - "Type": 1, - "AspectRatio": "16:9", - "PixelFormat": "yuv420p", - "Level": -99 - }, - { - "Codec": "vorbis", - "CodecTag": "ogg", - "Language": "eng", - "TimeBase": "1/48000", - "DisplayTitle": "En - Vorbis - Stereo - Default", - "ChannelLayout": "stereo", - "BitRate": 164741, - "Channels": 2, - "SampleRate": 48000, - "IsDefault": true, - "Index": 1, - "Score": 203 - }, - { - "Codec": "srt", - "Language": "eng", - "TimeBase": "1/1000000", - "localizedUndefined": "Undefined", - "localizedDefault": "Default", - "localizedForced": "Forced", - "DisplayTitle": "En - Default", - "BitRate": 92, - "IsDefault": true, - "Type": 2, - "Index": 2, - "Score": 6421, - "IsExternal": true, - "IsTextSubtitleStream": true, - "SupportsExternalStream": true - } - ], - "Bitrate": 2590008, - "DefaultAudioStreamIndex": 1, - "DefaultSubtitleStreamIndex": 2 -} diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-vp9-aac-srt-2600k.json b/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-vp9-aac-srt-2600k.json deleted file mode 100644 index 0a85a13533..0000000000 --- a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-vp9-aac-srt-2600k.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "Id": "a766d122b58e45d9492d17af66748bf5", - "Path": "/Media/MyVideo-720p.mkv", - "Container": "mkv,webm", - "Size": 835317696, - "Name": "MyVideo-1080p", - "ETag": "579a34c6d5dfb23f61539a51220b6a23", - "RunTimeTicks": 25801230336, - "SupportsTranscoding": true, - "SupportsDirectStream": true, - "SupportsDirectPlay": true, - "SupportsProbing": true, - "MediaStreams": [ - { - "Codec": "vp9", - "Language": "eng", - "ColorTransfer": "bt709", - "ColorPrimaries": "bt709", - "TimeBase": "1/11988", - "VideoRange": "SDR", - "DisplayTitle": "1080p VP9 SDR", - "NalLengthSize": "0", - "BitRate": 2032876, - "BitDepth": 8, - "RefFrames": 1, - "IsDefault": true, - "Height": 720, - "Width": 1280, - "AverageFrameRate": 23.976, - "RealFrameRate": 23.976, - "Profile": "Profile 0", - "Type": 1, - "AspectRatio": "16:9", - "PixelFormat": "yuv420p", - "Level": -99 - }, - { - "Codec": "aac", - "CodecTag": "mp4a", - "Language": "eng", - "TimeBase": "1/48000", - "DisplayTitle": "En - AAC - Stereo - Default", - "ChannelLayout": "stereo", - "BitRate": 164741, - "Channels": 2, - "SampleRate": 48000, - "IsDefault": true, - "Profile": "LC", - "Index": 1, - "Score": 203 - }, - { - "Codec": "srt", - "Language": "eng", - "TimeBase": "1/1000000", - "localizedUndefined": "Undefined", - "localizedDefault": "Default", - "localizedForced": "Forced", - "DisplayTitle": "En - Default", - "BitRate": 92, - "IsDefault": true, - "Type": 2, - "Index": 2, - "Score": 6421, - "IsExternal": true, - "IsTextSubtitleStream": true, - "SupportsExternalStream": true - } - ], - "Bitrate": 2590008, - "DefaultAudioStreamIndex": 1, - "DefaultSubtitleStreamIndex": 2 -} diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-vp9-ac3-srt-2600k.json b/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-vp9-ac3-srt-2600k.json deleted file mode 100644 index 2b932ff52a..0000000000 --- a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-vp9-ac3-srt-2600k.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "Id": "a766d122b58e45d9492d17af66748bf5", - "Path": "/Media/MyVideo-720p.mkv", - "Container": "mkv,webm", - "Size": 835317696, - "Name": "MyVideo-1080p", - "ETag": "579a34c6d5dfb23f61539a51220b6a23", - "RunTimeTicks": 25801230336, - "SupportsTranscoding": true, - "SupportsDirectStream": true, - "SupportsDirectPlay": true, - "SupportsProbing": true, - "MediaStreams": [ - { - "Codec": "vp9", - "Language": "eng", - "ColorTransfer": "bt709", - "ColorPrimaries": "bt709", - "TimeBase": "1/11988", - "VideoRange": "SDR", - "DisplayTitle": "1080p VP9 SDR", - "NalLengthSize": "0", - "BitRate": 2032876, - "BitDepth": 8, - "RefFrames": 1, - "IsDefault": true, - "Height": 720, - "Width": 1280, - "AverageFrameRate": 23.976, - "RealFrameRate": 23.976, - "Profile": "Profile 0", - "Type": 1, - "AspectRatio": "16:9", - "PixelFormat": "yuv420p", - "Level": -99 - }, - { - "Codec": "ac3", - "CodecTag": "ac-3", - "Language": "eng", - "TimeBase": "1/48000", - "DisplayTitle": "En - Dolby Digital - 5.1 - Default", - "ChannelLayout": "5.1", - "BitRate": 384000, - "Channels": 6, - "SampleRate": 48000, - "IsDefault": true, - "Index": 1, - "Score": 202 - }, - { - "Codec": "srt", - "Language": "eng", - "TimeBase": "1/1000000", - "localizedUndefined": "Undefined", - "localizedDefault": "Default", - "localizedForced": "Forced", - "DisplayTitle": "En - Default", - "BitRate": 92, - "IsDefault": true, - "Type": 2, - "Index": 2, - "Score": 6421, - "IsExternal": true, - "IsTextSubtitleStream": true, - "SupportsExternalStream": true - } - ], - "Bitrate": 2590008, - "DefaultAudioStreamIndex": 1, - "DefaultSubtitleStreamIndex": 2 -} diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-vp9-vorbis-srt-2600k.json b/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-vp9-vorbis-srt-2600k.json deleted file mode 100644 index 56b04b7898..0000000000 --- a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-vp9-vorbis-srt-2600k.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "Id": "a766d122b58e45d9492d17af66748bf5", - "Path": "/Media/MyVideo-720p.mkv", - "Container": "mkv,webm", - "Size": 835317696, - "Name": "MyVideo-1080p", - "ETag": "579a34c6d5dfb23f61539a51220b6a23", - "RunTimeTicks": 25801230336, - "SupportsTranscoding": true, - "SupportsDirectStream": true, - "SupportsDirectPlay": true, - "SupportsProbing": true, - "MediaStreams": [ - { - "Codec": "vp9", - "Language": "eng", - "ColorTransfer": "bt709", - "ColorPrimaries": "bt709", - "TimeBase": "1/11988", - "VideoRange": "SDR", - "DisplayTitle": "1080p VP9 SDR", - "NalLengthSize": "0", - "BitRate": 2032876, - "BitDepth": 8, - "RefFrames": 1, - "IsDefault": true, - "Height": 720, - "Width": 1280, - "AverageFrameRate": 23.976, - "RealFrameRate": 23.976, - "Profile": "Profile 0", - "Type": 1, - "AspectRatio": "16:9", - "PixelFormat": "yuv420p", - "Level": -99 - }, - { - "Codec": "vorbis", - "Language": "eng", - "TimeBase": "1/48000", - "DisplayTitle": "En - Vorbis - Stereo - Default", - "ChannelLayout": "stereo", - "BitRate": 164741, - "Channels": 2, - "SampleRate": 48000, - "IsDefault": true, - "Profile": "LC", - "Index": 1, - "Score": 203 - }, - { - "Codec": "srt", - "Language": "eng", - "TimeBase": "1/1000000", - "localizedUndefined": "Undefined", - "localizedDefault": "Default", - "localizedForced": "Forced", - "DisplayTitle": "En - Default", - "BitRate": 92, - "IsDefault": true, - "Type": 2, - "Index": 2, - "Score": 6421, - "IsExternal": true, - "IsTextSubtitleStream": true, - "SupportsExternalStream": true - } - ], - "Bitrate": 2590008, - "RequiredHttpHeaders": {}, - "DefaultAudioStreamIndex": 1, - "DefaultSubtitleStreamIndex": 2 -} diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-vp9-vorbis-vtt-2600k.json b/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-vp9-vorbis-vtt-2600k.json deleted file mode 100644 index 1ee7eade98..0000000000 --- a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mkv-vp9-vorbis-vtt-2600k.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "Id": "a766d122b58e45d9492d17af66748bf5", - "Path": "/Media/MyVideo-720p.mkv", - "Container": "mkv,webm", - "Size": 835317696, - "Name": "MyVideo-1080p", - "ETag": "579a34c6d5dfb23f61539a51220b6a23", - "RunTimeTicks": 25801230336, - "SupportsTranscoding": true, - "SupportsDirectStream": true, - "SupportsDirectPlay": true, - "SupportsProbing": true, - "MediaStreams": [ - { - "Codec": "vp9", - "Language": "eng", - "ColorTransfer": "bt709", - "ColorPrimaries": "bt709", - "TimeBase": "1/11988", - "VideoRange": "SDR", - "DisplayTitle": "1080p VP9 SDR", - "NalLengthSize": "0", - "BitRate": 2032876, - "BitDepth": 8, - "RefFrames": 1, - "IsDefault": true, - "Height": 720, - "Width": 1280, - "AverageFrameRate": 23.976, - "RealFrameRate": 23.976, - "Profile": "Profile 0", - "Type": 1, - "AspectRatio": "16:9", - "PixelFormat": "yuv420p", - "Level": -99 - }, - { - "Codec": "vorbis", - "Language": "eng", - "TimeBase": "1/48000", - "DisplayTitle": "En - Vorbis - Stereo - Default", - "ChannelLayout": "stereo", - "BitRate": 164741, - "Channels": 2, - "SampleRate": 48000, - "IsDefault": true, - "Profile": "LC", - "Index": 1, - "Score": 203 - }, - { - "Codec": "webvtt", - "Language": "eng", - "TimeBase": "1/1000000", - "localizedUndefined": "Undefined", - "localizedDefault": "Default", - "localizedForced": "Forced", - "DisplayTitle": "En - Default", - "BitRate": 92, - "IsDefault": true, - "Type": 2, - "Index": 2, - "Score": 6421, - "IsExternal": true, - "IsTextSubtitleStream": true, - "SupportsExternalStream": true - } - ], - "Bitrate": 2590008, - "DefaultAudioStreamIndex": 1, - "DefaultSubtitleStreamIndex": 2 -} diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-aac-srt-2600k.json b/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-aac-srt-2600k.json deleted file mode 100644 index 21911843d1..0000000000 --- a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-aac-srt-2600k.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "Id": "a766d122b58e45d9492d17af77748bf5", - "Path": "/Media/MyVideo-720p.mp4", - "Container": "mov,mp4,m4a,3gp,3g2,mj2", - "Size": 835317696, - "Name": "MyVideo-720p", - "ETag": "579a34c6d5dfb21d81539a51220b6a23", - "RunTimeTicks": 25801230336, - "SupportsTranscoding": true, - "SupportsDirectStream": true, - "SupportsDirectPlay": true, - "SupportsProbing": true, - "MediaStreams": [ - { - "Codec": "h264", - "CodecTag": "avc1", - "Language": "eng", - "TimeBase": "1/11988", - "VideoRange": "SDR", - "DisplayTitle": "720p H264 SDR", - "NalLengthSize": "0", - "BitRate": 2032876, - "BitDepth": 8, - "RefFrames": 1, - "IsDefault": true, - "Height": 720, - "Width": 1280, - "AverageFrameRate": 23.976, - "RealFrameRate": 23.976, - "Profile": "High", - "Type": 1, - "AspectRatio": "16:9", - "PixelFormat": "yuv420p", - "Level": 41 - }, - { - "Codec": "aac", - "CodecTag": "mp4a", - "Language": "eng", - "TimeBase": "1/48000", - "DisplayTitle": "En - AAC - Stereo - Default", - "ChannelLayout": "stereo", - "BitRate": 164741, - "Channels": 2, - "SampleRate": 48000, - "IsDefault": true, - "Profile": "LC", - "Index": 1, - "Score": 203 - }, - { - "Codec": "srt", - "Language": "eng", - "TimeBase": "1/1000000", - "localizedUndefined": "Undefined", - "localizedDefault": "Default", - "localizedForced": "Forced", - "DisplayTitle": "En - Default", - "BitRate": 92, - "IsDefault": true, - "Type": 2, - "Index": 2, - "Score": 6421, - "IsExternal": true, - "IsTextSubtitleStream": true, - "SupportsExternalStream": true - } - ], - "Bitrate": 2590008, - "DefaultAudioStreamIndex": 1, - "DefaultSubtitleStreamIndex": 2 -} diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-aac-vtt-2600k.json b/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-aac-vtt-2600k.json deleted file mode 100644 index 77954a31a2..0000000000 --- a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-aac-vtt-2600k.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "Id": "a766d122b58e45d9492d17af77748bf5", - "Path": "/Media/MyVideo-720p.mp4", - "Container": "mov,mp4,m4a,3gp,3g2,mj2", - "Size": 835317696, - "Name": "MyVideo-720p", - "ETag": "579a34c6d5dfb21d81539a51220b6a23", - "RunTimeTicks": 25801230336, - "SupportsTranscoding": true, - "SupportsDirectStream": true, - "SupportsDirectPlay": true, - "SupportsProbing": true, - "MediaStreams": [ - { - "Codec": "h264", - "CodecTag": "avc1", - "Language": "eng", - "TimeBase": "1/11988", - "VideoRange": "SDR", - "DisplayTitle": "720p H264 SDR", - "NalLengthSize": "0", - "BitRate": 2032876, - "BitDepth": 8, - "RefFrames": 1, - "IsDefault": true, - "Height": 720, - "Width": 1280, - "AverageFrameRate": 23.976, - "RealFrameRate": 23.976, - "Profile": "High", - "Type": 1, - "AspectRatio": "16:9", - "PixelFormat": "yuv420p", - "Level": 41 - }, - { - "Codec": "aac", - "CodecTag": "mp4a", - "Language": "eng", - "TimeBase": "1/48000", - "DisplayTitle": "En - AAC - Stereo - Default", - "ChannelLayout": "stereo", - "BitRate": 164741, - "Channels": 2, - "SampleRate": 48000, - "IsDefault": true, - "Profile": "LC", - "Index": 1, - "Score": 203 - }, - { - "Codec": "webvtt", - "Language": "eng", - "TimeBase": "1/1000000", - "localizedUndefined": "Undefined", - "localizedDefault": "Default", - "localizedForced": "Forced", - "DisplayTitle": "En - Default", - "BitRate": 92, - "IsDefault": true, - "Type": 2, - "Index": 2, - "Score": 6421, - "IsExternal": true, - "IsTextSubtitleStream": true, - "SupportsExternalStream": true - } - ], - "Bitrate": 2590008, - "DefaultAudioStreamIndex": 1, - "DefaultSubtitleStreamIndex": 2 -} diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aac-srt-2600k.json b/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aac-srt-2600k.json deleted file mode 100644 index 70bbb9d0d1..0000000000 --- a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aac-srt-2600k.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "Id": "a766d122b58e45d9492d17af77748bf5", - "Path": "/Media/MyVideo-720p.mp4", - "Container": "mov,mp4,m4a,3gp,3g2,mj2", - "Size": 835317696, - "Name": "MyVideo-720p", - "ETag": "579a34c6d5dfb21d81539a51220b6a23", - "RunTimeTicks": 25801230336, - "SupportsTranscoding": true, - "SupportsDirectStream": true, - "SupportsDirectPlay": true, - "SupportsProbing": true, - "MediaStreams": [ - { - "Codec": "h264", - "CodecTag": "avc1", - "Language": "eng", - "TimeBase": "1/11988", - "VideoRange": "SDR", - "DisplayTitle": "720p H264 SDR", - "NalLengthSize": "0", - "BitRate": 2032876, - "BitDepth": 8, - "RefFrames": 1, - "IsDefault": true, - "Height": 720, - "Width": 1280, - "AverageFrameRate": 23.976, - "RealFrameRate": 23.976, - "Profile": "High", - "Type": 1, - "AspectRatio": "16:9", - "PixelFormat": "yuv420p", - "Level": 41 - }, - { - "Codec": "ac3", - "CodecTag": "ac-3", - "Language": "eng", - "TimeBase": "1/48000", - "DisplayTitle": "En - Dolby Digital - 5.1 - Default", - "ChannelLayout": "5.1", - "BitRate": 384000, - "Channels": 6, - "SampleRate": 48000, - "IsDefault": true, - "Index": 1, - "Score": 202 - }, - { - "Codec": "aac", - "CodecTag": "mp4a", - "Language": "eng", - "TimeBase": "1/48000", - "DisplayTitle": "En - AAC - Stereo - Default", - "ChannelLayout": "stereo", - "BitRate": 164741, - "Channels": 2, - "SampleRate": 48000, - "IsDefault": true, - "Profile": "LC", - "Index": 2, - "Score": 203 - }, - { - "Codec": "srt", - "Language": "eng", - "TimeBase": "1/1000000", - "localizedUndefined": "Undefined", - "localizedDefault": "Default", - "localizedForced": "Forced", - "DisplayTitle": "En - Default", - "BitRate": 92, - "IsDefault": true, - "Type": 2, - "Index": 3, - "Score": 6421, - "IsExternal": true, - "IsTextSubtitleStream": true, - "SupportsExternalStream": true, - "Path": "/Media/MyVideo-WEBDL-2160p.default.eng.srt" - } - ], - "Bitrate": 2590008, - "DefaultAudioStreamIndex": 1, - "DefaultSubtitleStreamIndex": 3 -} diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aacDef-srt-2600k.json b/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aacDef-srt-2600k.json deleted file mode 100644 index 036e41f077..0000000000 --- a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aacDef-srt-2600k.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "Id": "a766d122b58e45d9492d17af77748bf5", - "Path": "/Media/MyVideo-720p.mp4", - "Container": "mov,mp4,m4a,3gp,3g2,mj2", - "Size": 835317696, - "Name": "MyVideo-720p", - "ETag": "579a34c6d5dfb21d81539a51220b6a23", - "RunTimeTicks": 25801230336, - "SupportsTranscoding": true, - "SupportsDirectStream": true, - "SupportsDirectPlay": true, - "SupportsProbing": true, - "MediaStreams": [ - { - "Codec": "h264", - "CodecTag": "avc1", - "Language": "eng", - "TimeBase": "1/11988", - "VideoRange": "SDR", - "DisplayTitle": "720p H264 SDR", - "NalLengthSize": "0", - "BitRate": 2032876, - "BitDepth": 8, - "RefFrames": 1, - "IsDefault": true, - "Height": 720, - "Width": 1280, - "AverageFrameRate": 23.976, - "RealFrameRate": 23.976, - "Profile": "High", - "Type": 1, - "AspectRatio": "16:9", - "PixelFormat": "yuv420p", - "Level": 41 - }, - { - "Codec": "ac3", - "CodecTag": "ac-3", - "Language": "eng", - "TimeBase": "1/48000", - "DisplayTitle": "En - Dolby Digital - 5.1 - Default", - "ChannelLayout": "5.1", - "BitRate": 384000, - "Channels": 6, - "SampleRate": 48000, - "IsDefault": true, - "Index": 1, - "Score": 202 - }, - { - "Codec": "aac", - "CodecTag": "mp4a", - "Language": "eng", - "TimeBase": "1/48000", - "DisplayTitle": "En - AAC - Stereo - Default", - "ChannelLayout": "stereo", - "BitRate": 164741, - "Channels": 2, - "SampleRate": 48000, - "IsDefault": true, - "Profile": "LC", - "Index": 2, - "Score": 203 - }, - { - "Codec": "srt", - "Language": "eng", - "TimeBase": "1/1000000", - "localizedUndefined": "Undefined", - "localizedDefault": "Default", - "localizedForced": "Forced", - "DisplayTitle": "En - Default", - "BitRate": 92, - "IsDefault": true, - "Type": 2, - "Index": 3, - "Score": 6421, - "IsExternal": true, - "IsTextSubtitleStream": true, - "SupportsExternalStream": true, - "Path": "/Media/MyVideo-WEBDL-2160p.default.eng.srt" - } - ], - "Bitrate": 2590008, - "DefaultAudioStreamIndex": 2, - "DefaultSubtitleStreamIndex": 3 -} diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aacExt-srt-2600k.json b/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aacExt-srt-2600k.json deleted file mode 100644 index b81c4597f6..0000000000 --- a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aacExt-srt-2600k.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "Id": "a766d122b58e45d9492d17af77748bf5", - "Path": "/Media/MyVideo-720p.mp4", - "Container": "mov,mp4,m4a,3gp,3g2,mj2", - "Size": 835317696, - "Name": "MyVideo-720p", - "ETag": "579a34c6d5dfb21d81539a51220b6a23", - "RunTimeTicks": 25801230336, - "SupportsTranscoding": true, - "SupportsDirectStream": true, - "SupportsDirectPlay": true, - "SupportsProbing": true, - "MediaStreams": [ - { - "Codec": "h264", - "CodecTag": "avc1", - "Language": "eng", - "TimeBase": "1/11988", - "VideoRange": "SDR", - "DisplayTitle": "720p H264 SDR", - "NalLengthSize": "0", - "BitRate": 2032876, - "BitDepth": 8, - "RefFrames": 1, - "IsDefault": true, - "Height": 720, - "Width": 1280, - "AverageFrameRate": 23.976, - "RealFrameRate": 23.976, - "Profile": "High", - "Type": 1, - "AspectRatio": "16:9", - "PixelFormat": "yuv420p", - "Level": 41 - }, - { - "Codec": "ac3", - "CodecTag": "ac-3", - "Language": "eng", - "TimeBase": "1/48000", - "DisplayTitle": "En - Dolby Digital - 5.1 - Default", - "ChannelLayout": "5.1", - "BitRate": 384000, - "Channels": 6, - "SampleRate": 48000, - "IsDefault": true, - "Index": 1, - "Score": 202 - }, - { - "Codec": "aac", - "CodecTag": "mp4a", - "Language": "eng", - "TimeBase": "1/48000", - "DisplayTitle": "En - AAC - Stereo - Default", - "ChannelLayout": "stereo", - "BitRate": 164741, - "Channels": 2, - "SampleRate": 48000, - "IsDefault": true, - "IsExternal": true, - "Profile": "LC", - "Index": 2, - "Score": 203, - "Path": "/Media/MyVideo-WEBDL-2160p.default.eng.srt" - }, - { - "Codec": "srt", - "Language": "eng", - "TimeBase": "1/1000000", - "localizedUndefined": "Undefined", - "localizedDefault": "Default", - "localizedForced": "Forced", - "DisplayTitle": "En - Default", - "BitRate": 92, - "IsDefault": true, - "Type": 2, - "Index": 3, - "Score": 6421, - "IsExternal": true, - "IsTextSubtitleStream": true, - "SupportsExternalStream": true, - "Path": "/Media/MyVideo-WEBDL-2160p.default.eng.srt" - } - ], - "Bitrate": 2590008, - "DefaultAudioStreamIndex": 1, - "DefaultSubtitleStreamIndex": 3 -} diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-srt-2600k.json b/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-srt-2600k.json deleted file mode 100644 index b71fd4a6a2..0000000000 --- a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-srt-2600k.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "Id": "a766d122b58e45d9492d17af77748bf5", - "Path": "/Media/MyVideo-720p.mp4", - "Container": "mov,mp4,m4a,3gp,3g2,mj2", - "Size": 835317696, - "Name": "MyVideo-720p", - "ETag": "579a34c6d5dfb21d81539a51220b6a23", - "RunTimeTicks": 25801230336, - "SupportsTranscoding": true, - "SupportsDirectStream": true, - "SupportsDirectPlay": true, - "SupportsProbing": true, - "MediaStreams": [ - { - "Codec": "h264", - "CodecTag": "avc1", - "Language": "eng", - "TimeBase": "1/11988", - "VideoRange": "SDR", - "DisplayTitle": "720p H264 SDR", - "NalLengthSize": "0", - "BitRate": 2032876, - "BitDepth": 8, - "RefFrames": 1, - "IsDefault": true, - "Height": 720, - "Width": 1280, - "AverageFrameRate": 23.976, - "RealFrameRate": 23.976, - "Profile": "High", - "Type": 1, - "AspectRatio": "16:9", - "PixelFormat": "yuv420p", - "Level": 41 - }, - { - "Codec": "ac3", - "CodecTag": "ac-3", - "Language": "eng", - "TimeBase": "1/48000", - "DisplayTitle": "En - Dolby Digital - 5.1 - Default", - "ChannelLayout": "5.1", - "BitRate": 384000, - "Channels": 6, - "SampleRate": 48000, - "IsDefault": true, - "Index": 1, - "Score": 202 - }, - { - "Codec": "srt", - "Language": "eng", - "TimeBase": "1/1000000", - "localizedUndefined": "Undefined", - "localizedDefault": "Default", - "localizedForced": "Forced", - "DisplayTitle": "En - Default", - "BitRate": 92, - "IsDefault": true, - "Type": 2, - "Index": 2, - "Score": 6421, - "IsExternal": true, - "IsTextSubtitleStream": true, - "SupportsExternalStream": true - } - ], - "Bitrate": 2590008, - "DefaultAudioStreamIndex": 1, - "DefaultSubtitleStreamIndex": 2 -} diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-hevc-aac-srt-15200k.json b/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-hevc-aac-srt-15200k.json deleted file mode 100644 index 4c6409e7b0..0000000000 --- a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-hevc-aac-srt-15200k.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "Id": "f6eab7118618ab26e61e495a1853481a", - "Path": "/Media/MyVideo-WEBDL-2160p.mp4", - "Container": "mov,mp4,m4a,3gp,3g2,mj2", - "Size": 6521110016, - "Name": "MyVideo WEBDL-2160p", - "ETag": "a2fb84b618ba2467fe377543f879e9bf", - "RunTimeTicks": 34318510080, - "SupportsTranscoding": true, - "SupportsDirectStream": true, - "SupportsDirectPlay": true, - "SupportsProbing": true, - "MediaStreams": [ - { - "Codec": "hevc", - "CodecTag": "hev1", - "Language": "eng", - "ColorSpace": "bt2020nc", - "ColorTransfer": "smpte2084", - "ColorPrimaries": "bt2020", - "TimeBase": "1/16000", - "VideoRange": "HDR", - "DisplayTitle": "4K HEVC HDR", - "BitRate": 14715079, - "BitDepth": 8, - "RefFrames": 1, - "IsDefault": true, - "Height": 2160, - "Width": 3840, - "AverageFrameRate": 23.976, - "RealFrameRate": 23.976, - "Profile": "Main 10", - "Type": 1, - "AspectRatio": "16:9", - "PixelFormat": "yuv420p10le", - "Level": 150 - }, - { - "Codec": "aac", - "CodecTag": "mp4a", - "Language": "eng", - "TimeBase": "1/48000", - "DisplayTitle": "En - AAC - Stereo - Default", - "ChannelLayout": "stereo", - "BitRate": 164741, - "Channels": 2, - "SampleRate": 48000, - "IsDefault": true, - "Profile": "LC", - "Index": 1, - "Score": 203 - }, - { - "Codec": "srt", - "Language": "eng", - "TimeBase": "1/1000000", - "localizedUndefined": "Undefined", - "localizedDefault": "Default", - "localizedForced": "Forced", - "DisplayTitle": "En - Default", - "BitRate": 92, - "IsDefault": true, - "Type": 2, - "Index": 2, - "Score": 6421, - "IsExternal": true, - "IsTextSubtitleStream": true, - "SupportsExternalStream": true, - "Path": "/Media/MyVideo-WEBDL-2160p.default.eng.srt" - } - ], - "Bitrate": 15201382, - "DefaultAudioStreamIndex": 1, - "DefaultSubtitleStreamIndex": 2 -} diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-aac-srt-15200k.json b/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-aac-srt-15200k.json deleted file mode 100644 index 385bb72602..0000000000 --- a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-aac-srt-15200k.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "Id": "f6eab7118618ab26e61e495a1853481a", - "Path": "/Media/MyVideo-WEBDL-2160p.mp4", - "Container": "mov,mp4,m4a,3gp,3g2,mj2", - "Size": 6521110016, - "Name": "MyVideo WEBDL-2160p", - "ETag": "a2fb84b618ba2467fe377543f879e9bf", - "RunTimeTicks": 34318510080, - "SupportsTranscoding": true, - "SupportsDirectStream": true, - "SupportsDirectPlay": true, - "SupportsProbing": true, - "MediaStreams": [ - { - "Codec": "hevc", - "CodecTag": "hev1", - "Language": "eng", - "ColorSpace": "bt2020nc", - "ColorTransfer": "smpte2084", - "ColorPrimaries": "bt2020", - "TimeBase": "1/16000", - "VideoRange": "HDR", - "DisplayTitle": "4K HEVC HDR", - "BitRate": 14715079, - "BitDepth": 8, - "RefFrames": 1, - "IsDefault": true, - "Height": 2160, - "Width": 3840, - "AverageFrameRate": 23.976, - "RealFrameRate": 23.976, - "Profile": "Main 10", - "Type": 1, - "AspectRatio": "16:9", - "PixelFormat": "yuv420p10le", - "Level": 150 - }, - { - "Codec": "ac3", - "CodecTag": "ac-3", - "Language": "eng", - "TimeBase": "1/48000", - "DisplayTitle": "En - Dolby Digital - 5.1 - Default", - "ChannelLayout": "5.1", - "BitRate": 384000, - "Channels": 6, - "SampleRate": 48000, - "IsDefault": true, - "Index": 1, - "Score": 202 - }, - { - "Codec": "aac", - "CodecTag": "mp4a", - "Language": "eng", - "TimeBase": "1/48000", - "DisplayTitle": "En - AAC - Stereo - Default", - "ChannelLayout": "stereo", - "BitRate": 164741, - "Channels": 2, - "SampleRate": 48000, - "IsDefault": true, - "Profile": "LC", - "Index": 2, - "Score": 203 - }, - { - "Codec": "srt", - "Language": "eng", - "TimeBase": "1/1000000", - "localizedUndefined": "Undefined", - "localizedDefault": "Default", - "localizedForced": "Forced", - "DisplayTitle": "En - Default", - "BitRate": 92, - "IsDefault": true, - "Type": 2, - "Index": 3, - "Score": 6421, - "IsExternal": true, - "IsTextSubtitleStream": true, - "SupportsExternalStream": true, - "Path": "/Media/MyVideo-WEBDL-2160p.default.eng.srt" - } - ], - "Bitrate": 15201382, - "DefaultAudioStreamIndex": 1, - "DefaultSubtitleStreamIndex": 3 -} diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-aacExt-srt-15200k.json b/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-aacExt-srt-15200k.json deleted file mode 100644 index fd1950bde1..0000000000 --- a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-aacExt-srt-15200k.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "Id": "f6eab7118618ab26e61e495a1853481a", - "Path": "/Media/MyVideo-WEBDL-2160p.mp4", - "Container": "mov,mp4,m4a,3gp,3g2,mj2", - "Size": 6521110016, - "Name": "MyVideo WEBDL-2160p", - "ETag": "a2fb84b618ba2467fe377543f879e9bf", - "RunTimeTicks": 34318510080, - "SupportsTranscoding": true, - "SupportsDirectStream": true, - "SupportsDirectPlay": true, - "SupportsProbing": true, - "MediaStreams": [ - { - "Codec": "hevc", - "CodecTag": "hev1", - "Language": "eng", - "ColorSpace": "bt2020nc", - "ColorTransfer": "smpte2084", - "ColorPrimaries": "bt2020", - "TimeBase": "1/16000", - "VideoRange": "HDR", - "DisplayTitle": "4K HEVC HDR", - "BitRate": 14715079, - "BitDepth": 8, - "RefFrames": 1, - "IsDefault": true, - "Height": 2160, - "Width": 3840, - "AverageFrameRate": 23.976, - "RealFrameRate": 23.976, - "Profile": "Main 10", - "Type": 1, - "AspectRatio": "16:9", - "PixelFormat": "yuv420p10le", - "Level": 150 - }, - { - "Codec": "ac3", - "CodecTag": "ac-3", - "Language": "eng", - "TimeBase": "1/48000", - "DisplayTitle": "En - Dolby Digital - 5.1 - Default", - "ChannelLayout": "5.1", - "BitRate": 384000, - "Channels": 6, - "SampleRate": 48000, - "IsDefault": true, - "Index": 1, - "Score": 202 - }, - { - "Codec": "aac", - "CodecTag": "mp4a", - "Language": "eng", - "TimeBase": "1/48000", - "DisplayTitle": "En - AAC - Stereo - Default", - "ChannelLayout": "stereo", - "BitRate": 164741, - "Channels": 2, - "SampleRate": 48000, - "IsDefault": true, - "IsExternal": true, - "Profile": "LC", - "Index": 2, - "Score": 203, - "Path": "/Media/MyVideo-WEBDL-2160p.eng.m4a" - }, - { - "Codec": "srt", - "Language": "eng", - "TimeBase": "1/1000000", - "localizedUndefined": "Undefined", - "localizedDefault": "Default", - "localizedForced": "Forced", - "DisplayTitle": "En - Default", - "BitRate": 92, - "IsDefault": true, - "Type": 2, - "Index": 3, - "Score": 6421, - "IsExternal": true, - "IsTextSubtitleStream": true, - "SupportsExternalStream": true, - "Path": "/Media/MyVideo-WEBDL-2160p.default.eng.srt" - } - ], - "Bitrate": 15201382, - "DefaultAudioStreamIndex": 1, - "DefaultSubtitleStreamIndex": 3 -} diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-srt-15200k.json b/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-srt-15200k.json deleted file mode 100644 index dde7c15ea0..0000000000 --- a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-srt-15200k.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "Id": "f6eab7118618ab26e61e495a1853481a", - "Path": "/Media/MyVideo-WEBDL-2160p.mp4", - "Container": "mov,mp4,m4a,3gp,3g2,mj2", - "Size": 6521110016, - "Name": "MyVideo WEBDL-2160p", - "ETag": "a2fb84b618ba2467fe377543f879e9bf", - "RunTimeTicks": 34318510080, - "SupportsTranscoding": true, - "SupportsDirectStream": true, - "SupportsDirectPlay": true, - "SupportsProbing": true, - "MediaStreams": [ - { - "Codec": "hevc", - "CodecTag": "hev1", - "Language": "eng", - "ColorSpace": "bt2020nc", - "ColorTransfer": "smpte2084", - "ColorPrimaries": "bt2020", - "TimeBase": "1/16000", - "VideoRange": "HDR", - "DisplayTitle": "4K HEVC HDR", - "BitRate": 14715079, - "BitDepth": 8, - "RefFrames": 1, - "IsDefault": true, - "Height": 2160, - "Width": 3840, - "AverageFrameRate": 23.976, - "RealFrameRate": 23.976, - "Profile": "Main 10", - "Type": 1, - "AspectRatio": "16:9", - "PixelFormat": "yuv420p10le", - "Level": 150 - }, - { - "Codec": "ac3", - "CodecTag": "ac-3", - "Language": "eng", - "TimeBase": "1/48000", - "DisplayTitle": "En - Dolby Digital - 5.1 - Default", - "ChannelLayout": "5.1", - "BitRate": 384000, - "Channels": 6, - "SampleRate": 48000, - "IsDefault": true, - "Index": 1, - "Score": 202 - }, - { - "Codec": "srt", - "Language": "eng", - "TimeBase": "1/1000000", - "localizedUndefined": "Undefined", - "localizedDefault": "Default", - "localizedForced": "Forced", - "DisplayTitle": "En - Default", - "BitRate": 92, - "IsDefault": true, - "Type": 2, - "Index": 2, - "Score": 6421, - "IsExternal": true, - "IsTextSubtitleStream": true, - "SupportsExternalStream": true, - "Path": "/Media/MyVideo-WEBDL-2160p.default.eng.srt" - } - ], - "Bitrate": 15201382, - "DefaultAudioStreamIndex": 1, - "DefaultSubtitleStreamIndex": 2 -} diff --git a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-raw.json b/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-raw.json deleted file mode 100644 index 9ea55b805d..0000000000 --- a/tests/Jellyfin.Dlna.Tests/Test Data/MediaSourceInfo-raw.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "Id": "a766d122b58e45d9492d17af77748bf5", - "Path": "/Media/MyVideo-720p.mp4", - "Container": "mov,mp4,m4a,3gp,3g2,mj2", - "Size": 835317696, - "Name": "MyVideo-720p", - "ETag": "579a34c6d5dfb21d81539a51220b6a23", - "RunTimeTicks": 25801230336, - "SupportsTranscoding": true, - "SupportsDirectStream": true, - "SupportsDirectPlay": true, - "SupportsProbing": true, - "MediaStreams": [ - { - "Codec": "h264", - "CodecTag": "avc1", - "Language": "eng", - "TimeBase": "1/11988", - "VideoRange": "SDR", - "DisplayTitle": "720p H264 SDR", - "NalLengthSize": "0", - "BitRate": 2032876, - "BitDepth": 8, - "RefFrames": 1, - "IsDefault": true, - "Height": 720, - "Width": 1280, - "AverageFrameRate": 23.976, - "RealFrameRate": 23.976, - "Profile": "High", - "Type": 1, - "AspectRatio": "16:9", - "PixelFormat": "yuv420p", - "Level": 41 - }, - { - "Codec": "ac3", - "CodecTag": "ac-3", - "Language": "eng", - "TimeBase": "1/48000", - "DisplayTitle": "En - Dolby Digital - 5.1 - Default", - "ChannelLayout": "5.1", - "BitRate": 384000, - "Channels": 6, - "SampleRate": 48000, - "IsDefault": true, - "Index": 1, - "Score": 202 - }, - { - "Codec": "aac", - "CodecTag": "mp4a", - "Language": "eng", - "TimeBase": "1/48000", - "DisplayTitle": "En - AAC - Stereo - Default", - "ChannelLayout": "stereo", - "BitRate": 164741, - "Channels": 2, - "SampleRate": 48000, - "IsDefault": true, - "Profile": "LC", - "Index": 2, - "Score": 203 - }, - { - "Codec": "mov_text", - "CodecTag": "tx3g", - "Language": "eng", - "TimeBase": "1/1000000", - "localizedUndefined": "Undefined", - "localizedDefault": "Default", - "localizedForced": "Forced", - "DisplayTitle": "En - Default", - "BitRate": 92, - "IsDefault": true, - "Type": 2, - "Index": 3, - "Score": 6421, - "IsTextSubtitleStream": true, - "SupportsExternalStream": true - }, - { - "Codec": "srt", - "Language": "eng", - "localizedUndefined": "Undefined", - "localizedDefault": "Default", - "localizedForced": "Forced", - "DisplayTitle": "En - Default", - "IsDefault": true, - "Type": 2, - "Index": 4, - "Score": 6422, - "IsExternal": true, - "IsTextSubtitleStream": true, - "SupportsExternalStream": true, - "Path": "/Media/MyVideo-WEBDL-2160p.default.eng.srt" - } - ], - "Bitrate": 2590008, - "RequiredHttpHeaders": {}, - "DefaultSubtitleStreamIndex": 1 -} diff --git a/tests/Jellyfin.Model.Tests/Dlna/StreamBuilderTests.cs b/tests/Jellyfin.Model.Tests/Dlna/StreamBuilderTests.cs new file mode 100644 index 0000000000..4748f34977 --- /dev/null +++ b/tests/Jellyfin.Model.Tests/Dlna/StreamBuilderTests.cs @@ -0,0 +1,466 @@ +using System; +using System.Collections.Specialized; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text.Json; +using System.Threading.Tasks; +using Jellyfin.Extensions.Json; +using MediaBrowser.Model.Dlna; +using MediaBrowser.Model.Dto; +using MediaBrowser.Model.Entities; +using MediaBrowser.Model.Session; +using Microsoft.Extensions.Logging.Abstractions; +using Moq; +using Xunit; + +namespace Jellyfin.Model.Tests +{ + public class StreamBuilderTests + { + [Theory] + // Chrome + [InlineData("Chrome", "mp4-h264-aac-vtt-2600k", PlayMethod.DirectPlay)] // #6450 + [InlineData("Chrome", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectPlay)] // #6450 + [InlineData("Chrome", "mp4-h264-ac3-aacDef-srt-2600k", PlayMethod.DirectPlay)] // #6450 + [InlineData("Chrome", "mp4-h264-ac3-aacExt-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioIsExternal)] // #6450 + [InlineData("Chrome", "mp4-h264-ac3-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 + [InlineData("Chrome", "mp4-hevc-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Transcode")] + [InlineData("Chrome", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Transcode")] + [InlineData("Chrome", "mkv-vp9-aac-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 + [InlineData("Chrome", "mkv-vp9-ac3-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 + [InlineData("Chrome", "mkv-vp9-vorbis-vtt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 + // Firefox + [InlineData("Firefox", "mp4-h264-aac-vtt-2600k", PlayMethod.DirectPlay)] // #6450 + [InlineData("Firefox", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectPlay)] // #6450 + [InlineData("Firefox", "mp4-h264-ac3-aacDef-srt-2600k", PlayMethod.DirectPlay)] // #6450 + [InlineData("Firefox", "mp4-h264-ac3-aacExt-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioIsExternal)] // #6450 + [InlineData("Firefox", "mp4-h264-ac3-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 + [InlineData("Firefox", "mp4-hevc-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Transcode")] + [InlineData("Firefox", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Transcode")] + [InlineData("Firefox", "mkv-vp9-aac-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 + [InlineData("Firefox", "mkv-vp9-ac3-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 + [InlineData("Firefox", "mkv-vp9-vorbis-vtt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 + // Safari + [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-aacDef-srt-2600k", PlayMethod.DirectPlay)] // #6450 + [InlineData("SafariNext", "mp4-h264-ac3-aacExt-srt-2600k", PlayMethod.DirectPlay)] // #6450 + [InlineData("SafariNext", "mp4-h264-ac3-srt-2600k", PlayMethod.DirectPlay)] // #6450 + [InlineData("SafariNext", "mp4-hevc-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Remux", "HLS.mp4")] // #6450 + [InlineData("SafariNext", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Remux", "HLS.mp4")] // #6450 + [InlineData("SafariNext", "mp4-hevc-ac3-aacExt-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Remux", "HLS.mp4")] // #6450 + // AndroidPixel + [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-aacDef-srt-2600k", PlayMethod.DirectPlay)] // #6450 + [InlineData("AndroidPixel", "mp4-h264-ac3-srt-2600k", PlayMethod.DirectPlay)] // #6450 + [InlineData("AndroidPixel", "mp4-hevc-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.ContainerBitrateExceedsLimit, "Transcode")] + [InlineData("AndroidPixel", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.ContainerBitrateExceedsLimit, "Transcode")] + // Yatse + [InlineData("Yatse", "mp4-h264-aac-srt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 + [InlineData("Yatse", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 + [InlineData("Yatse", "mp4-h264-ac3-aacDef-srt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 + [InlineData("Yatse", "mp4-h264-ac3-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] + [InlineData("Yatse", "mp4-hevc-aac-srt-15200k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 + [InlineData("Yatse", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 + // RokuSSPlus + [InlineData("RokuSSPlus", "mp4-h264-aac-srt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 + [InlineData("RokuSSPlus", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 should be DirectPlay + [InlineData("RokuSSPlus", "mp4-h264-ac3-aacDef-srt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 + [InlineData("RokuSSPlus", "mp4-h264-ac3-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 + [InlineData("RokuSSPlus", "mp4-hevc-aac-srt-15200k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 + [InlineData("RokuSSPlus", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 + [InlineData("RokuSSPlus", "mp4-hevc-ac3-srt-15200k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 + // JellyfinMediaPlayer + [InlineData("JellyfinMediaPlayer", "mp4-h264-aac-vtt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 + [InlineData("JellyfinMediaPlayer", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 + [InlineData("JellyfinMediaPlayer", "mp4-h264-ac3-srt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 + [InlineData("JellyfinMediaPlayer", "mp4-hevc-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.ContainerBitrateExceedsLimit, "Transcode")] + [InlineData("JellyfinMediaPlayer", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.ContainerBitrateExceedsLimit, "Transcode")] + [InlineData("JellyfinMediaPlayer", "mkv-vp9-aac-srt-2600k", PlayMethod.DirectPlay)] // #6450 + [InlineData("JellyfinMediaPlayer", "mkv-vp9-ac3-srt-2600k", PlayMethod.DirectPlay)] // #6450 + [InlineData("JellyfinMediaPlayer", "mkv-vp9-vorbis-vtt-2600k", PlayMethod.DirectPlay)] // #6450 + // Chrome-NoHLS + [InlineData("Chrome-NoHLS", "mp4-h264-aac-vtt-2600k", PlayMethod.DirectPlay)] // #6450 + [InlineData("Chrome-NoHLS", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectPlay)] // #6450 + [InlineData("Chrome-NoHLS", "mp4-h264-ac3-aacDef-srt-2600k", PlayMethod.DirectPlay)] // #6450 + [InlineData("Chrome-NoHLS", "mp4-h264-ac3-aacExt-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioIsExternal)] // #6450 + [InlineData("Chrome-NoHLS", "mp4-h264-ac3-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 + [InlineData("Chrome-NoHLS", "mp4-hevc-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Transcode", "http")] + [InlineData("Chrome-NoHLS", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Transcode", "http")] + [InlineData("Chrome-NoHLS", "mkv-vp9-aac-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 + [InlineData("Chrome-NoHLS", "mkv-vp9-ac3-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 + [InlineData("Chrome-NoHLS", "mkv-vp9-vorbis-vtt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 + // TranscodeMedia + [InlineData("TranscodeMedia", "mp4-h264-aac-vtt-2600k", PlayMethod.Transcode, TranscodeReason.DirectPlayError, "Remux", "HLS.mp4")] + [InlineData("TranscodeMedia", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.Transcode, TranscodeReason.DirectPlayError, "Remux", "HLS.mp4")] + [InlineData("TranscodeMedia", "mp4-h264-ac3-srt-2600k", PlayMethod.Transcode, TranscodeReason.DirectPlayError, "DirectStream", "HLS.mp4")] + [InlineData("TranscodeMedia", "mp4-hevc-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.DirectPlayError, "Remux", "HLS.mp4")] + [InlineData("TranscodeMedia", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.DirectPlayError, "Remux", "HLS.mp4")] + [InlineData("TranscodeMedia", "mkv-av1-aac-srt-2600k", PlayMethod.Transcode, TranscodeReason.DirectPlayError, "DirectStream", "http")] + [InlineData("TranscodeMedia", "mkv-av1-vorbis-srt-2600k", PlayMethod.Transcode, TranscodeReason.DirectPlayError, "Remux", "http")] + [InlineData("TranscodeMedia", "mkv-vp9-aac-srt-2600k", PlayMethod.Transcode, TranscodeReason.DirectPlayError, "DirectStream", "http")] + [InlineData("TranscodeMedia", "mkv-vp9-ac3-srt-2600k", PlayMethod.Transcode, TranscodeReason.DirectPlayError, "DirectStream", "http")] + [InlineData("TranscodeMedia", "mkv-vp9-vorbis-vtt-2600k", PlayMethod.Transcode, TranscodeReason.DirectPlayError, "Remux", "http")] + // DirectMedia + [InlineData("DirectMedia", "mp4-h264-aac-vtt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] + [InlineData("DirectMedia", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] + [InlineData("DirectMedia", "mp4-h264-ac3-aacDef-srt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] + [InlineData("DirectMedia", "mp4-h264-ac3-srt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] + [InlineData("DirectMedia", "mp4-hevc-aac-srt-15200k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] + [InlineData("DirectMedia", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] + [InlineData("DirectMedia", "mkv-vp9-aac-srt-2600k", PlayMethod.DirectPlay)] + [InlineData("DirectMedia", "mkv-vp9-ac3-srt-2600k", PlayMethod.DirectPlay)] + [InlineData("DirectMedia", "mkv-vp9-vorbis-vtt-2600k", PlayMethod.DirectPlay)] + // LowBandwidth + [InlineData("LowBandwidth", "mp4-h264-aac-vtt-2600k", PlayMethod.Transcode, TranscodeReason.ContainerBitrateExceedsLimit, "Transcode")] + [InlineData("LowBandwidth", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.Transcode, TranscodeReason.ContainerBitrateExceedsLimit, "Transcode")] + [InlineData("LowBandwidth", "mp4-h264-ac3-srt-2600k", PlayMethod.Transcode, TranscodeReason.ContainerBitrateExceedsLimit, "Transcode")] + [InlineData("LowBandwidth", "mp4-hevc-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.ContainerBitrateExceedsLimit, "Transcode")] + [InlineData("LowBandwidth", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.ContainerBitrateExceedsLimit, "Transcode")] + [InlineData("LowBandwidth", "mkv-vp9-aac-srt-2600k", PlayMethod.Transcode, TranscodeReason.ContainerBitrateExceedsLimit, "Transcode")] + [InlineData("LowBandwidth", "mkv-vp9-ac3-srt-2600k", PlayMethod.Transcode, TranscodeReason.ContainerBitrateExceedsLimit, "Transcode")] + [InlineData("LowBandwidth", "mkv-vp9-vorbis-vtt-2600k", PlayMethod.Transcode, TranscodeReason.ContainerBitrateExceedsLimit, "Transcode")] + // Null + [InlineData("Null", "mp4-h264-aac-vtt-2600k", null, TranscodeReason.ContainerBitrateExceedsLimit)] + [InlineData("Null", "mp4-h264-ac3-aac-srt-2600k", null, TranscodeReason.ContainerBitrateExceedsLimit)] + [InlineData("Null", "mp4-h264-ac3-srt-2600k", null, TranscodeReason.ContainerBitrateExceedsLimit)] + [InlineData("Null", "mp4-hevc-aac-srt-15200k", null, TranscodeReason.ContainerBitrateExceedsLimit)] + [InlineData("Null", "mp4-hevc-ac3-aac-srt-15200k", null, TranscodeReason.ContainerBitrateExceedsLimit)] + [InlineData("Null", "mkv-vp9-aac-srt-2600k", null, TranscodeReason.ContainerBitrateExceedsLimit)] + [InlineData("Null", "mkv-vp9-ac3-srt-2600k", null, TranscodeReason.ContainerBitrateExceedsLimit)] + [InlineData("Null", "mkv-vp9-vorbis-vtt-2600k", null, TranscodeReason.ContainerBitrateExceedsLimit)] + public async Task BuildVideoItemSimple(string deviceName, string mediaSource, PlayMethod? playMethod, TranscodeReason why = (TranscodeReason)0, string transcodeMode = "DirectStream", string transcodeProtocol = "") + { + var options = await GetVideoOptions(deviceName, mediaSource); + BuildVideoItemSimpleTest(options, playMethod, why, transcodeMode, transcodeProtocol); + } + + [Theory] + // Chrome + [InlineData("Chrome", "mp4-h264-aac-vtt-2600k", PlayMethod.DirectPlay)] // #6450 + [InlineData("Chrome", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 + [InlineData("Chrome", "mp4-h264-ac3-aacDef-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 + [InlineData("Chrome", "mp4-h264-ac3-aacExt-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 + [InlineData("Chrome", "mp4-h264-ac3-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 + [InlineData("Chrome", "mp4-hevc-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Transcode")] + [InlineData("Chrome", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Transcode")] + [InlineData("Chrome", "mkv-vp9-aac-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 + [InlineData("Chrome", "mkv-vp9-ac3-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 + [InlineData("Chrome", "mkv-vp9-vorbis-vtt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 + // Firefox + [InlineData("Firefox", "mp4-h264-aac-vtt-2600k", PlayMethod.DirectPlay)] // #6450 + [InlineData("Firefox", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 + [InlineData("Firefox", "mp4-h264-ac3-aacDef-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 + [InlineData("Firefox", "mp4-h264-ac3-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 + [InlineData("Firefox", "mp4-hevc-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Transcode")] + [InlineData("Firefox", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Transcode")] + [InlineData("Firefox", "mkv-vp9-aac-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 + [InlineData("Firefox", "mkv-vp9-ac3-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 + [InlineData("Firefox", "mkv-vp9-vorbis-vtt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 + // Safari + [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-aacDef-srt-2600k", PlayMethod.DirectPlay)] // #6450 + [InlineData("SafariNext", "mp4-h264-ac3-aacExt-srt-2600k", PlayMethod.DirectPlay)] // #6450 + [InlineData("SafariNext", "mp4-h264-ac3-srt-2600k", PlayMethod.DirectPlay)] // #6450 + [InlineData("SafariNext", "mp4-hevc-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Remux", "HLS.mp4")] // #6450 + [InlineData("SafariNext", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Remux", "HLS.mp4")] // #6450 + [InlineData("SafariNext", "mp4-hevc-ac3-aacExt-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Remux", "HLS.mp4")] // #6450 + // AndroidPixel + [InlineData("AndroidPixel", "mp4-h264-aac-srt-2600k", PlayMethod.DirectPlay)] // #6450 + [InlineData("AndroidPixel", "mp4-h264-ac3-aacDef-srt-2600k", PlayMethod.DirectPlay)] // #6450 + [InlineData("AndroidPixel", "mp4-h264-ac3-srt-2600k", PlayMethod.DirectPlay)] // #6450 + [InlineData("AndroidPixel", "mp4-hevc-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.ContainerBitrateExceedsLimit, "Transcode")] + [InlineData("AndroidPixel", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.ContainerBitrateExceedsLimit, "Transcode")] + // Yatse + [InlineData("Yatse", "mp4-h264-aac-srt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 + [InlineData("Yatse", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 + [InlineData("Yatse", "mp4-h264-ac3-aacDef-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 + [InlineData("Yatse", "mp4-h264-ac3-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] + [InlineData("Yatse", "mp4-hevc-aac-srt-15200k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 + [InlineData("Yatse", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 + // RokuSSPlus + [InlineData("RokuSSPlus", "mp4-h264-aac-srt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 + [InlineData("RokuSSPlus", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 should be DirectPlay + [InlineData("RokuSSPlus", "mp4-h264-ac3-aacDef-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 + [InlineData("RokuSSPlus", "mp4-h264-ac3-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 + [InlineData("RokuSSPlus", "mp4-hevc-aac-srt-15200k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 + [InlineData("RokuSSPlus", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 + [InlineData("RokuSSPlus", "mp4-hevc-ac3-srt-15200k", PlayMethod.DirectStream, TranscodeReason.AudioCodecNotSupported)] // #6450 + // JellyfinMediaPlayer + [InlineData("JellyfinMediaPlayer", "mp4-h264-aac-vtt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 + [InlineData("JellyfinMediaPlayer", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 + [InlineData("JellyfinMediaPlayer", "mp4-h264-ac3-srt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 + [InlineData("JellyfinMediaPlayer", "mp4-hevc-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.ContainerBitrateExceedsLimit, "Transcode")] // #6450 + [InlineData("JellyfinMediaPlayer", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.ContainerBitrateExceedsLimit, "Transcode")] // #6450 + [InlineData("JellyfinMediaPlayer", "mkv-vp9-aac-srt-2600k", PlayMethod.DirectPlay)] // #6450 + [InlineData("JellyfinMediaPlayer", "mkv-vp9-ac3-srt-2600k", PlayMethod.DirectPlay)] // #6450 + [InlineData("JellyfinMediaPlayer", "mkv-vp9-vorbis-vtt-2600k", PlayMethod.DirectPlay)] // #6450 + public async Task BuildVideoItemWithFirstExplicitStream(string deviceName, string mediaSource, PlayMethod? playMethod, TranscodeReason why = (TranscodeReason)0, string transcodeMode = "DirectStream", string transcodeProtocol = "") + { + var options = await GetVideoOptions(deviceName, mediaSource); + options.AudioStreamIndex = 1; + options.SubtitleStreamIndex = options.MediaSources[0].MediaStreams.Count - 1; + + var streamInfo = BuildVideoItemSimpleTest(options, playMethod, why, transcodeMode, transcodeProtocol); + Assert.Equal(streamInfo?.AudioStreamIndex, options.AudioStreamIndex); + Assert.Equal(streamInfo?.SubtitleStreamIndex, options.SubtitleStreamIndex); + } + + [Theory] + // Chrome + [InlineData("Chrome", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectPlay)] // #6450 + [InlineData("Chrome", "mp4-h264-ac3-aacExt-srt-2600k", PlayMethod.DirectStream, TranscodeReason.AudioIsExternal)] // #6450 + [InlineData("Chrome", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Transcode")] + // Firefox + [InlineData("Firefox", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectPlay)] // #6450 + [InlineData("Firefox", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.Transcode, TranscodeReason.VideoCodecNotSupported, "Transcode")] + // Yatse + [InlineData("Yatse", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 + [InlineData("Yatse", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 + // RokuSSPlus + [InlineData("RokuSSPlus", "mp4-h264-ac3-aac-srt-2600k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 + [InlineData("RokuSSPlus", "mp4-hevc-ac3-aac-srt-15200k", PlayMethod.DirectPlay, (TranscodeReason)0, "Remux")] // #6450 + public async Task BuildVideoItemWithDirectPlayExplicitStreams(string deviceName, string mediaSource, PlayMethod? playMethod, TranscodeReason why = (TranscodeReason)0, string transcodeMode = "DirectStream", string transcodeProtocol = "") + { + var options = await GetVideoOptions(deviceName, mediaSource); + var streamCount = options.MediaSources[0].MediaStreams.Count; + options.AudioStreamIndex = streamCount - 2; + options.SubtitleStreamIndex = streamCount - 1; + + var streamInfo = BuildVideoItemSimpleTest(options, playMethod, why, transcodeMode, transcodeProtocol); + Assert.Equal(streamInfo?.AudioStreamIndex, options.AudioStreamIndex); + Assert.Equal(streamInfo?.SubtitleStreamIndex, options.SubtitleStreamIndex); + } + + private StreamInfo? BuildVideoItemSimpleTest(VideoOptions options, PlayMethod? playMethod, TranscodeReason why, string transcodeMode, string transcodeProtocol) + { + if (string.IsNullOrEmpty(transcodeProtocol)) + { + transcodeProtocol = playMethod == PlayMethod.DirectStream ? "http" : "HLS.ts"; + } + + var builder = GetStreamBuilder(); + + var val = builder.BuildVideoItem(options); + Assert.NotNull(val); + + if (playMethod != null) + { + Assert.Equal(playMethod, val.PlayMethod); + } + + Assert.Equal(why, val.TranscodeReasons); + + var audioStreamIndexInput = options.AudioStreamIndex; + var targetVideoStream = val.TargetVideoStream; + var targetAudioStream = val.TargetAudioStream; + + var mediaSource = options.MediaSources.First(source => source.Id == val.MediaSourceId); + Assert.NotNull(mediaSource); + var videoStreams = mediaSource.MediaStreams.Where(stream => stream.Type == MediaStreamType.Video); + var audioStreams = mediaSource.MediaStreams.Where(stream => stream.Type == MediaStreamType.Audio); + // TODO: check AudioStreamIndex vs options.AudioStreamIndex + var inputAudioStream = mediaSource.GetDefaultAudioStream(audioStreamIndexInput ?? mediaSource.DefaultAudioStreamIndex); + + var uri = ParseUri(val); + + if (playMethod == PlayMethod.DirectPlay) + { + // check expected container + var containers = ContainerProfile.SplitValue(mediaSource.Container); + // TODO: test transcode too + // Assert.Contains(uri.Extension, containers); + + // check expected video codec (1) + Assert.Contains(targetVideoStream.Codec, val.TargetVideoCodec); + Assert.Single(val.TargetVideoCodec); + + // check expected audio codecs (1) + Assert.Contains(targetAudioStream.Codec, val.TargetAudioCodec); + Assert.Single(val.TargetAudioCodec); + // Assert.Single(val.AudioCodecs); + + if (transcodeMode == "DirectStream") + { + Assert.Equal(val.Container, uri.Extension); + } + } + else if (playMethod == PlayMethod.DirectStream || playMethod == PlayMethod.Transcode) + { + Assert.NotNull(val.Container); + Assert.NotEmpty(val.VideoCodecs); + Assert.NotEmpty(val.AudioCodecs); + + // check expected container (todo: this could be a test param) + if (transcodeProtocol == "http") + { + // Assert.Equal("webm", val.Container); + Assert.Equal(val.Container, uri.Extension); + Assert.Equal("stream", uri.Filename); + Assert.Equal("http", val.SubProtocol); + } + else if (transcodeProtocol == "HLS.mp4") + { + Assert.Equal("mp4", val.Container); + Assert.Equal("m3u8", uri.Extension); + Assert.Equal("master", uri.Filename); + Assert.Equal("hls", val.SubProtocol); + } + else + { + Assert.Equal("ts", val.Container); + Assert.Equal("m3u8", uri.Extension); + Assert.Equal("master", uri.Filename); + Assert.Equal("hls", val.SubProtocol); + } + + // Full transcode + if (transcodeMode == "Transcode") + { + if ((val.TranscodeReasons & (StreamBuilder.ContainerReasons | TranscodeReason.DirectPlayError)) == 0) + { + Assert.All( + videoStreams, + stream => Assert.DoesNotContain(stream.Codec, val.VideoCodecs)); + } + + // todo: fill out tests here + } + + // DirectStream and Remux + else + { + // check expected video codec (1) + Assert.Contains(targetVideoStream.Codec, val.TargetVideoCodec); + Assert.Single(val.TargetVideoCodec); + + if (transcodeMode == "DirectStream") + { + if (!targetAudioStream.IsExternal) + { + // check expected audio codecs (1) + Assert.DoesNotContain(targetAudioStream.Codec, val.AudioCodecs); + } + } + else if (transcodeMode == "Remux") + { + // check expected audio codecs (1) + Assert.Contains(targetAudioStream.Codec, val.AudioCodecs); + Assert.Single(val.AudioCodecs); + } + + // video details + var videoStream = targetVideoStream; + Assert.False(val.EstimateContentLength); + Assert.Equal(TranscodeSeekInfo.Auto, val.TranscodeSeekInfo); + Assert.Contains(videoStream.Profile?.ToLowerInvariant() ?? string.Empty, val.TargetVideoProfile?.Split(",").Select(s => s.ToLowerInvariant()) ?? Array.Empty()); + Assert.Equal(videoStream.Level, val.TargetVideoLevel); + Assert.Equal(videoStream.BitDepth, val.TargetVideoBitDepth); + Assert.InRange(val.VideoBitrate.GetValueOrDefault(), videoStream.BitRate.GetValueOrDefault(), int.MaxValue); + + // audio codec not supported + if ((why & TranscodeReason.AudioCodecNotSupported) != 0) + { + // audio stream specified + if (options.AudioStreamIndex >= 0) + { + // TODO:fixme + if (!targetAudioStream.IsExternal) + { + Assert.DoesNotContain(targetAudioStream.Codec, val.AudioCodecs); + } + } + + // audio stream not specified + else + { + // TODO:fixme + Assert.All(audioStreams, stream => + { + if (!stream.IsExternal) + { + Assert.DoesNotContain(stream.Codec, val.AudioCodecs); + } + }); + } + } + } + } + else if (playMethod == null) + { + Assert.Null(val.SubProtocol); + Assert.Equal("stream", uri.Filename); + + Assert.False(val.EstimateContentLength); + Assert.Equal(TranscodeSeekInfo.Auto, val.TranscodeSeekInfo); + } + + return val; + } + + private static async ValueTask TestData(string name) + { + var path = Path.Join("Test Data", typeof(T).Name + "-" + name + ".json"); + using (var stream = File.OpenRead(path)) + { + var value = await JsonSerializer.DeserializeAsync(stream, JsonDefaults.Options); + if (value != null) + { + return value; + } + + throw new SerializationException("Invalid test data: " + name); + } + } + + private StreamBuilder GetStreamBuilder() + { + var transcodeSupport = new Mock(); + var logger = new NullLogger(); + + return new StreamBuilder(transcodeSupport.Object, logger); + } + + private static async ValueTask GetVideoOptions(string deviceProfile, params string[] sources) + { + var mediaSources = sources.Select(src => TestData(src)) + .Select(val => val.Result) + .ToArray(); + var mediaSourceId = mediaSources[0]?.Id; + + var dp = await TestData(deviceProfile); + + return new VideoOptions() + { + ItemId = new Guid("11D229B7-2D48-4B95-9F9B-49F6AB75E613"), + MediaSourceId = mediaSourceId, + MediaSources = mediaSources, + DeviceId = "test-deviceId", + Profile = dp, + AllowAudioStreamCopy = true, + AllowVideoStreamCopy = true, + }; + } + + private static (string Path, NameValueCollection Query, string Filename, string Extension) ParseUri(StreamInfo val) + { + var href = val.ToUrl("media:", "ACCESSTOKEN").Split("?", 2); + var path = href[0]; + + var queryString = href.ElementAtOrDefault(1); + var query = string.IsNullOrEmpty(queryString) ? System.Web.HttpUtility.ParseQueryString(queryString ?? string.Empty) : new NameValueCollection(); + + var filename = Path.GetFileNameWithoutExtension(path); + var extension = Path.GetExtension(path); + if (extension.Length > 0) + { + extension = extension.Substring(1); + } + + return (path, query, filename, extension); + } + } +} diff --git a/tests/Jellyfin.Model.Tests/Jellyfin.Model.Tests.csproj b/tests/Jellyfin.Model.Tests/Jellyfin.Model.Tests.csproj index 9da80c3125..d2304d0d00 100644 --- a/tests/Jellyfin.Model.Tests/Jellyfin.Model.Tests.csproj +++ b/tests/Jellyfin.Model.Tests/Jellyfin.Model.Tests.csproj @@ -8,12 +8,19 @@ + + + + PreserveNewest + + + diff --git a/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-AndroidPixel.json b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-AndroidPixel.json new file mode 100644 index 0000000000..68ce3ea4ab --- /dev/null +++ b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-AndroidPixel.json @@ -0,0 +1,332 @@ +{ + "Name": "Jellyfin Android", + "EnableAlbumArtInDidl": false, + "EnableSingleAlbumArtLimit": false, + "EnableSingleSubtitleLimit": false, + "SupportedMediaTypes": "Audio,Photo,Video", + "MaxAlbumArtWidth": 2147483647, + "MaxAlbumArtHeight": 2147483647, + "MaxStreamingBitrate": 8000000, + "MaxStaticBitrate": 8000000, + "MusicStreamingTranscodingBitrate": 128000, + "TimelineOffsetSeconds": 0, + "RequiresPlainVideoItems": false, + "RequiresPlainFolders": false, + "EnableMSMediaReceiverRegistrar": false, + "IgnoreTranscodeByteRangeRequests": false, + "DirectPlayProfiles": [ + { + "Container": "mp4", + "AudioCodec": "mp3,aac,alac,ac3", + "VideoCodec": "h263,mpeg4,h264,hevc,av1", + "Type": "Video", + "$type": "DirectPlayProfile" + }, + { + "Container": "mp4", + "AudioCodec": "mp3,aac,alac,ac3", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "fmp4", + "AudioCodec": "mp3,aac,ac3,eac3", + "VideoCodec": "h263,mpeg4,h264,hevc,av1", + "Type": "Video", + "$type": "DirectPlayProfile" + }, + { + "Container": "fmp4", + "AudioCodec": "mp3,aac,ac3,eac3", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "webm", + "AudioCodec": "vorbis,opus", + "VideoCodec": "vp8,vp9,av1", + "Type": "Video", + "$type": "DirectPlayProfile" + }, + { + "Container": "webm", + "AudioCodec": "vorbis,opus", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "mkv", + "AudioCodec": "pcm_s8,pcm_s16be,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,pcm_alaw,pcm_mulaw,mp3,aac,vorbis,opus,flac,alac,ac3,eac3,dts,mlp,truehd", + "VideoCodec": "h263,mpeg4,h264,hevc,av1,vp8,vp9,av1", + "Type": "Video", + "$type": "DirectPlayProfile" + }, + { + "Container": "mkv", + "AudioCodec": "pcm_s8,pcm_s16be,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,pcm_alaw,pcm_mulaw,mp3,aac,vorbis,opus,flac,alac,ac3,eac3,dts,mlp,truehd", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "mp3", + "AudioCodec": "mp3", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "ogg", + "AudioCodec": "vorbis,opus,flac", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "wav", + "AudioCodec": "pcm_s8,pcm_s16be,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,pcm_alaw,pcm_mulaw", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "mpegts", + "AudioCodec": "pcm_s8,pcm_s16be,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,pcm_alaw,pcm_mulaw,mp3,aac,ac3,eac3,dts,mlp,truehd", + "VideoCodec": "mpeg4,h264,hevc", + "Type": "Video", + "$type": "DirectPlayProfile" + }, + { + "Container": "mpegts", + "AudioCodec": "pcm_s8,pcm_s16be,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,pcm_alaw,pcm_mulaw,mp3,aac,ac3,eac3,dts,mlp,truehd", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "flv", + "AudioCodec": "mp3,aac", + "VideoCodec": "mpeg4,h264", + "Type": "Video", + "$type": "DirectPlayProfile" + }, + { + "Container": "flv", + "AudioCodec": "mp3,aac", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "aac", + "AudioCodec": "aac", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "flac", + "AudioCodec": "flac", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "3gp", + "AudioCodec": "3gpp,aac,flac", + "VideoCodec": "h263,mpeg4,h264,hevc", + "Type": "Video", + "$type": "DirectPlayProfile" + }, + { + "Container": "3gp", + "AudioCodec": "3gpp,aac,flac", + "Type": "Audio", + "$type": "DirectPlayProfile" + } + ], + "TranscodingProfiles": [ + { + "Container": "ts", + "Type": "Video", + "VideoCodec": "h264", + "AudioCodec": "mp1,mp2,mp3,aac,ac3,eac3,dts,mlp,truehd", + "Protocol": "hls", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "mkv", + "Type": "Video", + "VideoCodec": "h264", + "AudioCodec": "pcm_s8,pcm_s16be,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,pcm_alaw,pcm_mulaw,mp1,mp2,mp3,aac,vorbis,opus,flac,alac,ac3,eac3,dts,mlp,truehd", + "Protocol": "hls", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "mp3", + "Type": "Audio", + "AudioCodec": "mp3", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + } + ], + "ContainerProfiles": [ + { + "Type": "Video", + "Container": "mp4", + "$type": "ContainerProfile" + }, + { + "Type": "Audio", + "Container": "mp4", + "$type": "ContainerProfile" + }, + { + "Type": "Video", + "Container": "fmp4", + "$type": "ContainerProfile" + }, + { + "Type": "Audio", + "Container": "fmp4", + "$type": "ContainerProfile" + }, + { + "Type": "Video", + "Container": "webm", + "$type": "ContainerProfile" + }, + { + "Type": "Audio", + "Container": "webm", + "$type": "ContainerProfile" + }, + { + "Type": "Video", + "Container": "mkv", + "$type": "ContainerProfile" + }, + { + "Type": "Audio", + "Container": "mkv", + "$type": "ContainerProfile" + }, + { + "Type": "Audio", + "Container": "mp3", + "$type": "ContainerProfile" + }, + { + "Type": "Audio", + "Container": "ogg", + "$type": "ContainerProfile" + }, + { + "Type": "Audio", + "Container": "wav", + "$type": "ContainerProfile" + }, + { + "Type": "Video", + "Container": "mpegts", + "$type": "ContainerProfile" + }, + { + "Type": "Audio", + "Container": "mpegts", + "$type": "ContainerProfile" + }, + { + "Type": "Video", + "Container": "flv", + "$type": "ContainerProfile" + }, + { + "Type": "Audio", + "Container": "flv", + "$type": "ContainerProfile" + }, + { + "Type": "Audio", + "Container": "aac", + "$type": "ContainerProfile" + }, + { + "Type": "Audio", + "Container": "flac", + "$type": "ContainerProfile" + }, + { + "Type": "Video", + "Container": "3gp", + "$type": "ContainerProfile" + }, + { + "Type": "Audio", + "Container": "3gp", + "$type": "ContainerProfile" + } + ], + "SubtitleProfiles": [ + { + "Format": "srt", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "subrip", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "ttml", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "srt", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "subrip", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "ttml", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "vtt", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "webvtt", + "Method": "External", + "$type": "SubtitleProfile" + } + ], + "$type": "DeviceProfile" +} diff --git a/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Chrome-NoHLS.json b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Chrome-NoHLS.json new file mode 100644 index 0000000000..5d1f5f1620 --- /dev/null +++ b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Chrome-NoHLS.json @@ -0,0 +1,430 @@ +{ + "EnableAlbumArtInDidl": false, + "EnableSingleAlbumArtLimit": false, + "EnableSingleSubtitleLimit": false, + "SupportedMediaTypes": "Audio,Photo,Video", + "MaxAlbumArtWidth": 0, + "MaxAlbumArtHeight": 0, + "MaxStreamingBitrate": 120000000, + "MaxStaticBitrate": 100000000, + "MusicStreamingTranscodingBitrate": 384000, + "TimelineOffsetSeconds": 0, + "RequiresPlainVideoItems": false, + "RequiresPlainFolders": false, + "EnableMSMediaReceiverRegistrar": false, + "IgnoreTranscodeByteRangeRequests": false, + "DirectPlayProfiles": [ + { + "Container": "webm", + "AudioCodec": "vorbis,opus", + "VideoCodec": "vp8,vp9,av1", + "Type": "Video", + "$type": "DirectPlayProfile" + }, + { + "Container": "mp4,m4v", + "AudioCodec": "aac,mp3,opus,flac,alac,vorbis", + "VideoCodec": "h264,vp8,vp9,av1", + "Type": "Video", + "$type": "DirectPlayProfile" + }, + { + "Container": "mov", + "AudioCodec": "aac,mp3,opus,flac,alac,vorbis", + "VideoCodec": "h264", + "Type": "Video", + "$type": "DirectPlayProfile" + }, + { + "Container": "opus", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "webm", + "AudioCodec": "opus", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "mp3", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "aac", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "m4a", + "AudioCodec": "aac", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "m4b", + "AudioCodec": "aac", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "flac", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "alac", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "m4a", + "AudioCodec": "alac", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "m4b", + "AudioCodec": "alac", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "webma", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "webm", + "AudioCodec": "webma", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "wav", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "ogg", + "Type": "Audio", + "$type": "DirectPlayProfile" + } + ], + "TranscodingProfiles": [ + { + "Container": "aac", + "Type": "Audio", + "AudioCodec": "aac", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "mp3", + "Type": "Audio", + "AudioCodec": "mp3", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "opus", + "Type": "Audio", + "AudioCodec": "opus", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "wav", + "Type": "Audio", + "AudioCodec": "wav", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "opus", + "Type": "Audio", + "AudioCodec": "opus", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Static", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "mp3", + "Type": "Audio", + "AudioCodec": "mp3", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Static", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "aac", + "Type": "Audio", + "AudioCodec": "aac", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Static", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "wav", + "Type": "Audio", + "AudioCodec": "wav", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Static", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "mp4", + "Type": "Video", + "VideoCodec": "h264", + "AudioCodec": "aac,mp3,opus,flac,alac,vorbis", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "webm", + "Type": "Video", + "VideoCodec": "vp8,vp9,av1,vpx", + "AudioCodec": "vorbis,opus", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "mp4", + "Type": "Video", + "VideoCodec": "h264", + "AudioCodec": "aac,mp3,opus,flac,alac,vorbis", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Static", + "EnableSubtitlesInManifest": false, + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + } + ], + "CodecProfiles": [ + { + "Type": "VideoAudio", + "Conditions": [ + { + "Condition": "Equals", + "Property": "IsSecondaryAudio", + "Value": "false", + "IsRequired": false, + "$type": "ProfileCondition" + } + ], + "Codec": "aac", + "$type": "CodecProfile" + }, + { + "Type": "VideoAudio", + "Conditions": [ + { + "Condition": "Equals", + "Property": "IsSecondaryAudio", + "Value": "false", + "IsRequired": false, + "$type": "ProfileCondition" + } + ], + "$type": "CodecProfile" + }, + { + "Type": "Video", + "Conditions": [ + { + "Condition": "NotEquals", + "Property": "IsAnamorphic", + "Value": "true", + "IsRequired": false, + "$type": "ProfileCondition" + }, + { + "Condition": "EqualsAny", + "Property": "VideoProfile", + "Value": "high|main|baseline|constrained baseline|high 10", + "IsRequired": false, + "$type": "ProfileCondition" + }, + { + "Condition": "LessThanEqual", + "Property": "VideoLevel", + "Value": "52", + "IsRequired": false, + "$type": "ProfileCondition" + }, + { + "Condition": "NotEquals", + "Property": "IsInterlaced", + "Value": "true", + "IsRequired": false, + "$type": "ProfileCondition" + } + ], + "Codec": "h264", + "$type": "CodecProfile" + }, + { + "Type": "Video", + "Conditions": [ + { + "Condition": "NotEquals", + "Property": "IsAnamorphic", + "Value": "true", + "IsRequired": false, + "$type": "ProfileCondition" + }, + { + "Condition": "EqualsAny", + "Property": "VideoProfile", + "Value": "main", + "IsRequired": false, + "$type": "ProfileCondition" + }, + { + "Condition": "LessThanEqual", + "Property": "VideoLevel", + "Value": "120", + "IsRequired": false, + "$type": "ProfileCondition" + }, + { + "Condition": "NotEquals", + "Property": "IsInterlaced", + "Value": "true", + "IsRequired": false, + "$type": "ProfileCondition" + } + ], + "Codec": "hevc", + "$type": "CodecProfile" + } + ], + "ResponseProfiles": [ + { + "Container": "m4v", + "Type": "Video", + "MimeType": "video/mp4", + "$type": "ResponseProfile" + } + ], + "SubtitleProfiles": [ + { + "Format": "vtt", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "ass", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "ssa", + "Method": "External", + "$type": "SubtitleProfile" + } + ], + "$type": "DeviceProfile" +} diff --git a/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Chrome.json b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Chrome.json new file mode 100644 index 0000000000..81bb97ac82 --- /dev/null +++ b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Chrome.json @@ -0,0 +1,448 @@ +{ + "EnableAlbumArtInDidl": false, + "EnableSingleAlbumArtLimit": false, + "EnableSingleSubtitleLimit": false, + "SupportedMediaTypes": "Audio,Photo,Video", + "MaxAlbumArtWidth": 0, + "MaxAlbumArtHeight": 0, + "MaxStreamingBitrate": 120000000, + "MaxStaticBitrate": 100000000, + "MusicStreamingTranscodingBitrate": 384000, + "TimelineOffsetSeconds": 0, + "RequiresPlainVideoItems": false, + "RequiresPlainFolders": false, + "EnableMSMediaReceiverRegistrar": false, + "IgnoreTranscodeByteRangeRequests": false, + "DirectPlayProfiles": [ + { + "Container": "webm", + "AudioCodec": "vorbis,opus", + "VideoCodec": "vp8,vp9,av1", + "Type": "Video", + "$type": "DirectPlayProfile" + }, + { + "Container": "mp4,m4v", + "AudioCodec": "aac,mp3,opus,flac,alac,vorbis", + "VideoCodec": "h264,vp8,vp9,av1", + "Type": "Video", + "$type": "DirectPlayProfile" + }, + { + "Container": "mov", + "AudioCodec": "aac,mp3,opus,flac,alac,vorbis", + "VideoCodec": "h264", + "Type": "Video", + "$type": "DirectPlayProfile" + }, + { + "Container": "opus", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "webm", + "AudioCodec": "opus", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "mp3", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "aac", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "m4a", + "AudioCodec": "aac", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "m4b", + "AudioCodec": "aac", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "flac", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "alac", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "m4a", + "AudioCodec": "alac", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "m4b", + "AudioCodec": "alac", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "webma", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "webm", + "AudioCodec": "webma", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "wav", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "ogg", + "Type": "Audio", + "$type": "DirectPlayProfile" + } + ], + "TranscodingProfiles": [ + { + "Container": "ts", + "Type": "Audio", + "AudioCodec": "aac", + "Protocol": "hls", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 2, + "SegmentLength": 0, + "BreakOnNonKeyFrames": true, + "$type": "TranscodingProfile" + }, + { + "Container": "aac", + "Type": "Audio", + "AudioCodec": "aac", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "mp3", + "Type": "Audio", + "AudioCodec": "mp3", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "opus", + "Type": "Audio", + "AudioCodec": "opus", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "wav", + "Type": "Audio", + "AudioCodec": "wav", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "opus", + "Type": "Audio", + "AudioCodec": "opus", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Static", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "mp3", + "Type": "Audio", + "AudioCodec": "mp3", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Static", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "aac", + "Type": "Audio", + "AudioCodec": "aac", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Static", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "wav", + "Type": "Audio", + "AudioCodec": "wav", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Static", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "ts", + "Type": "Video", + "VideoCodec": "h264", + "AudioCodec": "aac,mp3", + "Protocol": "hls", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 2, + "SegmentLength": 0, + "BreakOnNonKeyFrames": true, + "$type": "TranscodingProfile" + }, + { + "Container": "webm", + "Type": "Video", + "VideoCodec": "vp8,vp9,av1,vpx", + "AudioCodec": "vorbis,opus", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "mp4", + "Type": "Video", + "VideoCodec": "h264", + "AudioCodec": "aac,mp3,opus,flac,alac,vorbis", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Static", + "EnableSubtitlesInManifest": false, + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + } + ], + "CodecProfiles": [ + { + "Type": "VideoAudio", + "Conditions": [ + { + "Condition": "Equals", + "Property": "IsSecondaryAudio", + "Value": "false", + "IsRequired": false, + "$type": "ProfileCondition" + } + ], + "Codec": "aac", + "$type": "CodecProfile" + }, + { + "Type": "VideoAudio", + "Conditions": [ + { + "Condition": "Equals", + "Property": "IsSecondaryAudio", + "Value": "false", + "IsRequired": false, + "$type": "ProfileCondition" + } + ], + "$type": "CodecProfile" + }, + { + "Type": "Video", + "Conditions": [ + { + "Condition": "NotEquals", + "Property": "IsAnamorphic", + "Value": "true", + "IsRequired": false, + "$type": "ProfileCondition" + }, + { + "Condition": "EqualsAny", + "Property": "VideoProfile", + "Value": "high|main|baseline|constrained baseline|high 10", + "IsRequired": false, + "$type": "ProfileCondition" + }, + { + "Condition": "LessThanEqual", + "Property": "VideoLevel", + "Value": "52", + "IsRequired": false, + "$type": "ProfileCondition" + }, + { + "Condition": "NotEquals", + "Property": "IsInterlaced", + "Value": "true", + "IsRequired": false, + "$type": "ProfileCondition" + } + ], + "Codec": "h264", + "$type": "CodecProfile" + }, + { + "Type": "Video", + "Conditions": [ + { + "Condition": "NotEquals", + "Property": "IsAnamorphic", + "Value": "true", + "IsRequired": false, + "$type": "ProfileCondition" + }, + { + "Condition": "EqualsAny", + "Property": "VideoProfile", + "Value": "main", + "IsRequired": false, + "$type": "ProfileCondition" + }, + { + "Condition": "LessThanEqual", + "Property": "VideoLevel", + "Value": "120", + "IsRequired": false, + "$type": "ProfileCondition" + }, + { + "Condition": "NotEquals", + "Property": "IsInterlaced", + "Value": "true", + "IsRequired": false, + "$type": "ProfileCondition" + } + ], + "Codec": "hevc", + "$type": "CodecProfile" + } + ], + "ResponseProfiles": [ + { + "Container": "m4v", + "Type": "Video", + "MimeType": "video/mp4", + "$type": "ResponseProfile" + } + ], + "SubtitleProfiles": [ + { + "Format": "vtt", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "ass", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "ssa", + "Method": "External", + "$type": "SubtitleProfile" + } + ], + "$type": "DeviceProfile" +} diff --git a/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-DirectMedia.json b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-DirectMedia.json new file mode 100644 index 0000000000..d1df7341e1 --- /dev/null +++ b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-DirectMedia.json @@ -0,0 +1,90 @@ +{ + "Name": "Jellyfin Media Player", + "SupportedMediaTypes": "Audio,Photo,Video", + "MaxStreamingBitrate": 20000000, + "MaxStaticBitrate": 20000000, + "MusicStreamingTranscodingBitrate": 1280000, + "TimelineOffsetSeconds": 5, + "DirectPlayProfiles": [ + { + "Type": "Video", + "$type": "DirectPlayProfile" + }, + { + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Type": "Photo", + "$type": "DirectPlayProfile" + } + ], + "SubtitleProfiles": [ + { + "Format": "srt", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "srt", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "ass", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "ass", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "sub", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "sub", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "ssa", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "ssa", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "smi", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "smi", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "pgssub", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "dvdsub", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "pgs", + "Method": "Embed", + "$type": "SubtitleProfile" + } + ], + "$type": "DeviceProfile" +} diff --git a/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Firefox.json b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Firefox.json new file mode 100644 index 0000000000..9874793d37 --- /dev/null +++ b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Firefox.json @@ -0,0 +1,441 @@ +{ + "EnableAlbumArtInDidl": false, + "EnableSingleAlbumArtLimit": false, + "EnableSingleSubtitleLimit": false, + "SupportedMediaTypes": "Audio,Photo,Video", + "MaxAlbumArtWidth": 0, + "MaxAlbumArtHeight": 0, + "MaxStreamingBitrate": 120000000, + "MaxStaticBitrate": 100000000, + "MusicStreamingTranscodingBitrate": 384000, + "TimelineOffsetSeconds": 0, + "RequiresPlainVideoItems": false, + "RequiresPlainFolders": false, + "EnableMSMediaReceiverRegistrar": false, + "IgnoreTranscodeByteRangeRequests": false, + "DirectPlayProfiles": [ + { + "Container": "webm", + "AudioCodec": "vorbis,opus", + "VideoCodec": "vp8,vp9,av1", + "Type": "Video", + "$type": "DirectPlayProfile" + }, + { + "Container": "mp4,m4v", + "AudioCodec": "aac,mp3,opus,flac,alac,vorbis", + "VideoCodec": "h264,vp8,vp9,av1", + "Type": "Video", + "$type": "DirectPlayProfile" + }, + { + "Container": "opus", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "webm", + "AudioCodec": "opus", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "mp3", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "aac", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "m4a", + "AudioCodec": "aac", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "m4b", + "AudioCodec": "aac", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "flac", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "alac", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "m4a", + "AudioCodec": "alac", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "m4b", + "AudioCodec": "alac", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "webma", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "webm", + "AudioCodec": "webma", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "wav", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "ogg", + "Type": "Audio", + "$type": "DirectPlayProfile" + } + ], + "TranscodingProfiles": [ + { + "Container": "ts", + "Type": "Audio", + "AudioCodec": "aac", + "Protocol": "hls", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 2, + "SegmentLength": 0, + "BreakOnNonKeyFrames": true, + "$type": "TranscodingProfile" + }, + { + "Container": "aac", + "Type": "Audio", + "AudioCodec": "aac", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "mp3", + "Type": "Audio", + "AudioCodec": "mp3", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "opus", + "Type": "Audio", + "AudioCodec": "opus", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "wav", + "Type": "Audio", + "AudioCodec": "wav", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "opus", + "Type": "Audio", + "AudioCodec": "opus", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Static", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "mp3", + "Type": "Audio", + "AudioCodec": "mp3", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Static", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "aac", + "Type": "Audio", + "AudioCodec": "aac", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Static", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "wav", + "Type": "Audio", + "AudioCodec": "wav", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Static", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "ts", + "Type": "Video", + "VideoCodec": "h264", + "AudioCodec": "aac,mp3", + "Protocol": "hls", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 2, + "SegmentLength": 0, + "BreakOnNonKeyFrames": true, + "$type": "TranscodingProfile" + }, + { + "Container": "webm", + "Type": "Video", + "VideoCodec": "vp8,vp9,av1,vpx", + "AudioCodec": "vorbis,opus", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "mp4", + "Type": "Video", + "VideoCodec": "h264", + "AudioCodec": "aac,mp3,opus,flac,alac,vorbis", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Static", + "EnableSubtitlesInManifest": false, + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + } + ], + "CodecProfiles": [ + { + "Type": "VideoAudio", + "Conditions": [ + { + "Condition": "Equals", + "Property": "IsSecondaryAudio", + "Value": "false", + "IsRequired": false, + "$type": "ProfileCondition" + } + ], + "Codec": "aac", + "$type": "CodecProfile" + }, + { + "Type": "VideoAudio", + "Conditions": [ + { + "Condition": "Equals", + "Property": "IsSecondaryAudio", + "Value": "false", + "IsRequired": false, + "$type": "ProfileCondition" + } + ], + "$type": "CodecProfile" + }, + { + "Type": "Video", + "Conditions": [ + { + "Condition": "NotEquals", + "Property": "IsAnamorphic", + "Value": "true", + "IsRequired": false, + "$type": "ProfileCondition" + }, + { + "Condition": "EqualsAny", + "Property": "VideoProfile", + "Value": "high|main|baseline|constrained baseline", + "IsRequired": false, + "$type": "ProfileCondition" + }, + { + "Condition": "LessThanEqual", + "Property": "VideoLevel", + "Value": "52", + "IsRequired": false, + "$type": "ProfileCondition" + }, + { + "Condition": "NotEquals", + "Property": "IsInterlaced", + "Value": "true", + "IsRequired": false, + "$type": "ProfileCondition" + } + ], + "Codec": "h264", + "$type": "CodecProfile" + }, + { + "Type": "Video", + "Conditions": [ + { + "Condition": "NotEquals", + "Property": "IsAnamorphic", + "Value": "true", + "IsRequired": false, + "$type": "ProfileCondition" + }, + { + "Condition": "EqualsAny", + "Property": "VideoProfile", + "Value": "main", + "IsRequired": false, + "$type": "ProfileCondition" + }, + { + "Condition": "LessThanEqual", + "Property": "VideoLevel", + "Value": "120", + "IsRequired": false, + "$type": "ProfileCondition" + }, + { + "Condition": "NotEquals", + "Property": "IsInterlaced", + "Value": "true", + "IsRequired": false, + "$type": "ProfileCondition" + } + ], + "Codec": "hevc", + "$type": "CodecProfile" + } + ], + "ResponseProfiles": [ + { + "Container": "m4v", + "Type": "Video", + "MimeType": "video/mp4", + "$type": "ResponseProfile" + } + ], + "SubtitleProfiles": [ + { + "Format": "vtt", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "ass", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "ssa", + "Method": "External", + "$type": "SubtitleProfile" + } + ], + "$type": "DeviceProfile" +} diff --git a/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-JellyfinMediaPlayer.json b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-JellyfinMediaPlayer.json new file mode 100644 index 0000000000..da9a1a4ada --- /dev/null +++ b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-JellyfinMediaPlayer.json @@ -0,0 +1,137 @@ +{ + "Name": "Jellyfin Media Player", + "SupportedMediaTypes": "Audio,Photo,Video", + "MaxStreamingBitrate": 8000000, + "MaxStaticBitrate": 8000000, + "MusicStreamingTranscodingBitrate": 1280000, + "TimelineOffsetSeconds": 5, + "DirectPlayProfiles": [ + { + "Type": "Video", + "$type": "DirectPlayProfile" + }, + { + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Type": "Photo", + "$type": "DirectPlayProfile" + } + ], + "TranscodingProfiles": [ + { + "Type": "Audio", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "ts", + "Type": "Video", + "VideoCodec": "h264,h265,hevc,mpeg4,mpeg2video", + "AudioCodec": "aac,mp3,ac3,opus,flac,vorbis", + "Protocol": "hls", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "jpeg", + "Type": "Photo", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + } + ], + "SubtitleProfiles": [ + { + "Format": "srt", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "srt", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "ass", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "ass", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "sub", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "sub", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "ssa", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "ssa", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "smi", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "smi", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "pgssub", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "dvdsub", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "pgs", + "Method": "Embed", + "$type": "SubtitleProfile" + } + ], + "$type": "DeviceProfile" +} diff --git a/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-LowBandwidth.json b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-LowBandwidth.json new file mode 100644 index 0000000000..82b73fb0f8 --- /dev/null +++ b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-LowBandwidth.json @@ -0,0 +1,137 @@ +{ + "Name": "Jellyfin Media Player", + "SupportedMediaTypes": "Audio,Photo,Video", + "MaxStreamingBitrate": 120000, + "MaxStaticBitrate": 100000, + "MusicStreamingTranscodingBitrate": 3840, + "TimelineOffsetSeconds": 5, + "DirectPlayProfiles": [ + { + "Type": "Video", + "$type": "DirectPlayProfile" + }, + { + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Type": "Photo", + "$type": "DirectPlayProfile" + } + ], + "TranscodingProfiles": [ + { + "Type": "Audio", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "ts", + "Type": "Video", + "VideoCodec": "h264,h265,hevc,mpeg4,mpeg2video", + "AudioCodec": "aac,mp3,ac3,opus,flac,vorbis", + "Protocol": "hls", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "jpeg", + "Type": "Photo", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + } + ], + "SubtitleProfiles": [ + { + "Format": "srt", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "srt", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "ass", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "ass", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "sub", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "sub", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "ssa", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "ssa", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "smi", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "smi", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "pgssub", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "dvdsub", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "pgs", + "Method": "Embed", + "$type": "SubtitleProfile" + } + ], + "$type": "DeviceProfile" +} diff --git a/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Null.json b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Null.json new file mode 100644 index 0000000000..d463bd896f --- /dev/null +++ b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Null.json @@ -0,0 +1,9 @@ +{ + "Name": "Jellyfin Media Player", + "SupportedMediaTypes": "Audio,Photo,Video", + "MaxStreamingBitrate": 120000, + "MaxStaticBitrate": 100000, + "MusicStreamingTranscodingBitrate": 3840, + "TimelineOffsetSeconds": 5, + "$type": "DeviceProfile" +} diff --git a/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-RokuSSPlus.json b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-RokuSSPlus.json new file mode 100644 index 0000000000..37b923558b --- /dev/null +++ b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-RokuSSPlus.json @@ -0,0 +1,211 @@ +{ + "EnableAlbumArtInDidl": false, + "EnableSingleAlbumArtLimit": false, + "EnableSingleSubtitleLimit": false, + "SupportedMediaTypes": "Audio,Photo,Video", + "MaxAlbumArtWidth": 0, + "MaxAlbumArtHeight": 0, + "MaxStreamingBitrate": 120000000, + "MaxStaticBitrate": 100000000, + "MusicStreamingTranscodingBitrate": 192000, + "TimelineOffsetSeconds": 0, + "RequiresPlainVideoItems": false, + "RequiresPlainFolders": false, + "EnableMSMediaReceiverRegistrar": false, + "IgnoreTranscodeByteRangeRequests": false, + "DirectPlayProfiles": [ + { + "Container": "mp4,m4v,mov", + "AudioCodec": "mp3,pcm,lpcm,wav,alac,aac", + "VideoCodec": "h264,h265,hevc,mpeg2video", + "Type": "Video", + "$type": "DirectPlayProfile" + }, + { + "Container": "mkv,webm", + "AudioCodec": "mp3,pcm,lpcm,wav,flac,alac,aac,opus,vorbis", + "VideoCodec": "h264,vp8,h265,hevc,vp9,mpeg2video", + "Type": "Video", + "$type": "DirectPlayProfile" + }, + { + "Container": "mp3,pcm,lpcm,wav,wma,flac,alac,aac,wmapro", + "Type": "Audio", + "$type": "DirectPlayProfile" + } + ], + "TranscodingProfiles": [ + { + "Container": "aac", + "Type": "Audio", + "AudioCodec": "aac", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": " 2", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "mp3", + "Type": "Audio", + "AudioCodec": "mp3", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "2", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "mp3", + "Type": "Audio", + "AudioCodec": "mp3", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Static", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "2", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "aac", + "Type": "Audio", + "AudioCodec": "aac", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Static", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": " 2", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "ts", + "Type": "Video", + "VideoCodec": "h264,mpeg2video", + "AudioCodec": "aac", + "Protocol": "hls", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": " 2", + "MinSegments": 1, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "mp4", + "Type": "Video", + "VideoCodec": "h264,h265,hevc,mpeg2video", + "AudioCodec": "mp3,pcm,lpcm,wav,alac,aac", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Static", + "EnableSubtitlesInManifest": false, + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + } + ], + "CodecProfiles": [ + { + "Type": "Video", + "Conditions": [ + { + "Condition": "EqualsAny", + "Property": "VideoProfile", + "Value": "high|main|baseline|constrained baseline", + "IsRequired": false, + "$type": "ProfileCondition" + }, + { + "Condition": "LessThanEqual", + "Property": "VideoLevel", + "Value": "51", + "IsRequired": false, + "$type": "ProfileCondition" + } + ], + "Codec": "h264", + "$type": "CodecProfile" + }, + { + "Type": "Video", + "Conditions": [ + { + "Condition": "NotEquals", + "Property": "IsAnamorphic", + "Value": "true", + "IsRequired": false, + "$type": "ProfileCondition" + }, + { + "Condition": "EqualsAny", + "Property": "VideoProfile", + "Value": "main|main 10", + "IsRequired": false, + "$type": "ProfileCondition" + }, + { + "Condition": "NotEquals", + "Property": "IsInterlaced", + "Value": "true", + "IsRequired": false, + "$type": "ProfileCondition" + } + ], + "Codec": "hevc", + "$type": "CodecProfile" + } + ], + "SubtitleProfiles": [ + { + "Format": "vtt", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "srt", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "ttml", + "Method": "External", + "$type": "SubtitleProfile" + } + ], + "$type": "DeviceProfile" +} diff --git a/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-RokuSSPlusNext.json b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-RokuSSPlusNext.json new file mode 100644 index 0000000000..542bf6370a --- /dev/null +++ b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-RokuSSPlusNext.json @@ -0,0 +1,211 @@ +{ + "EnableAlbumArtInDidl": false, + "EnableSingleAlbumArtLimit": false, + "EnableSingleSubtitleLimit": false, + "SupportedMediaTypes": "Audio,Photo,Video", + "MaxAlbumArtWidth": 0, + "MaxAlbumArtHeight": 0, + "MaxStreamingBitrate": 120000000, + "MaxStaticBitrate": 100000000, + "MusicStreamingTranscodingBitrate": 192000, + "TimelineOffsetSeconds": 0, + "RequiresPlainVideoItems": false, + "RequiresPlainFolders": false, + "EnableMSMediaReceiverRegistrar": false, + "IgnoreTranscodeByteRangeRequests": false, + "DirectPlayProfiles": [ + { + "Container": "mp4,m4v,mov", + "AudioCodec": "mp3,pcm,lpcm,wav,alac,aac", + "VideoCodec": "h264,h265,hevc,mpeg2video", + "Type": "Video", + "$type": "DirectPlayProfile" + }, + { + "Container": "mkv,webm", + "AudioCodec": "mp3,pcm,lpcm,wav,flac,alac,aac,opus,vorbis", + "VideoCodec": "h264,vp8,h265,hevc,vp9,mpeg2video", + "Type": "Video", + "$type": "DirectPlayProfile" + }, + { + "Container": "mp3,pcm,lpcm,wav,wma,flac,alac,aac,wmapro", + "Type": "Audio", + "$type": "DirectPlayProfile" + } + ], + "TranscodingProfiles": [ + { + "Container": "aac", + "Type": "Audio", + "AudioCodec": "aac", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": " 2", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "mp3", + "Type": "Audio", + "AudioCodec": "mp3", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "2", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "mp3", + "Type": "Audio", + "AudioCodec": "mp3", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Static", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "2", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "aac", + "Type": "Audio", + "AudioCodec": "aac", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Static", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": " 2", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "ts", + "Type": "Video", + "VideoCodec": "h264,h265,hevc,mpeg2video", + "AudioCodec": "aac", + "Protocol": "hls", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": " 2", + "MinSegments": 1, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "mp4", + "Type": "Video", + "VideoCodec": "h264,h265,hevc,mpeg2video", + "AudioCodec": "mp3,pcm,lpcm,wav,alac,aac", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Static", + "EnableSubtitlesInManifest": false, + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + } + ], + "CodecProfiles": [ + { + "Type": "Video", + "Conditions": [ + { + "Condition": "EqualsAny", + "Property": "VideoProfile", + "Value": "high|main|baseline|constrained baseline", + "IsRequired": false, + "$type": "ProfileCondition" + }, + { + "Condition": "LessThanEqual", + "Property": "VideoLevel", + "Value": "51", + "IsRequired": false, + "$type": "ProfileCondition" + } + ], + "Codec": "h264", + "$type": "CodecProfile" + }, + { + "Type": "Video", + "Conditions": [ + { + "Condition": "NotEquals", + "Property": "IsAnamorphic", + "Value": "true", + "IsRequired": false, + "$type": "ProfileCondition" + }, + { + "Condition": "EqualsAny", + "Property": "VideoProfile", + "Value": "main|main 10", + "IsRequired": false, + "$type": "ProfileCondition" + }, + { + "Condition": "NotEquals", + "Property": "IsInterlaced", + "Value": "true", + "IsRequired": false, + "$type": "ProfileCondition" + } + ], + "Codec": "hevc", + "$type": "CodecProfile" + } + ], + "SubtitleProfiles": [ + { + "Format": "vtt", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "srt", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "ttml", + "Method": "External", + "$type": "SubtitleProfile" + } + ], + "$type": "DeviceProfile" +} diff --git a/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-SafariNext.json b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-SafariNext.json new file mode 100644 index 0000000000..3b5a0c2549 --- /dev/null +++ b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-SafariNext.json @@ -0,0 +1,357 @@ +{ + "EnableAlbumArtInDidl": false, + "EnableSingleAlbumArtLimit": false, + "EnableSingleSubtitleLimit": false, + "SupportedMediaTypes": "Audio,Photo,Video", + "MaxAlbumArtWidth": 0, + "MaxAlbumArtHeight": 0, + "MaxStreamingBitrate": 120000000, + "MaxStaticBitrate": 100000000, + "MusicStreamingTranscodingBitrate": 384000, + "TimelineOffsetSeconds": 0, + "RequiresPlainVideoItems": false, + "RequiresPlainFolders": false, + "EnableMSMediaReceiverRegistrar": false, + "IgnoreTranscodeByteRangeRequests": false, + "DirectPlayProfiles": [ + { + "Container": "webm", + "AudioCodec": "vorbis", + "VideoCodec": "vp8,vp9", + "Type": "Video", + "$type": "DirectPlayProfile" + }, + { + "Container": "mp4,m4v", + "AudioCodec": "aac,mp3,ac3,eac3,flac,alac,vorbis", + "VideoCodec": "h264,vp8,vp9", + "Type": "Video", + "$type": "DirectPlayProfile" + }, + { + "Container": "mov", + "AudioCodec": "aac,mp3,ac3,eac3,flac,alac,vorbis", + "VideoCodec": "h264", + "Type": "Video", + "$type": "DirectPlayProfile" + }, + { + "Container": "mp3", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "aac", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "m4a", + "AudioCodec": "aac", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "m4b", + "AudioCodec": "aac", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "flac", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "alac", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "m4a", + "AudioCodec": "alac", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "m4b", + "AudioCodec": "alac", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "webma", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "webm", + "AudioCodec": "webma", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "wav", + "Type": "Audio", + "$type": "DirectPlayProfile" + } + ], + "TranscodingProfiles": [ + { + "Container": "aac", + "Type": "Audio", + "AudioCodec": "aac", + "Protocol": "hls", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 2, + "SegmentLength": 0, + "BreakOnNonKeyFrames": true, + "$type": "TranscodingProfile" + }, + { + "Container": "aac", + "Type": "Audio", + "AudioCodec": "aac", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "mp3", + "Type": "Audio", + "AudioCodec": "mp3", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "wav", + "Type": "Audio", + "AudioCodec": "wav", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "mp3", + "Type": "Audio", + "AudioCodec": "mp3", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Static", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "aac", + "Type": "Audio", + "AudioCodec": "aac", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Static", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "wav", + "Type": "Audio", + "AudioCodec": "wav", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Static", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "mp4", + "Type": "Video", + "AudioCodec": "aac,ac3,eac3,flac,alac", + "VideoCodec": "hevc,h264", + "Context": "Streaming", + "Protocol": "hls", + "MaxAudioChannels": "2", + "MinSegments": "2", + "BreakOnNonKeyFrames": true + }, + { + "Container": "ts", + "Type": "Video", + "AudioCodec": "aac,mp3,ac3,eac3", + "VideoCodec": "h264", + "Context": "Streaming", + "Protocol": "hls", + "MaxAudioChannels": "2", + "MinSegments": "2", + "BreakOnNonKeyFrames": true + }, + { + "Container": "webm", + "Type": "Video", + "AudioCodec": "vorbis", + "VideoCodec": "vp8,vpx", + "Context": "Streaming", + "Protocol": "http", + "MaxAudioChannels": "2" + }, + { + "Container": "mp4", + "Type": "Video", + "AudioCodec": "aac,mp3,ac3,eac3,flac,alac,vorbis", + "VideoCodec": "h264", + "Context": "Static", + "Protocol": "http" + } + ], + "CodecProfiles": [ + { + "Type": "Video", + "Conditions": [ + { + "Condition": "NotEquals", + "Property": "IsAnamorphic", + "Value": "true", + "IsRequired": false, + "$type": "ProfileCondition" + }, + { + "Condition": "EqualsAny", + "Property": "VideoProfile", + "Value": "high|main|baseline|constrained baseline", + "IsRequired": false, + "$type": "ProfileCondition" + }, + { + "Condition": "LessThanEqual", + "Property": "VideoLevel", + "Value": "52", + "IsRequired": false, + "$type": "ProfileCondition" + }, + { + "Condition": "NotEquals", + "Property": "IsInterlaced", + "Value": "true", + "IsRequired": false, + "$type": "ProfileCondition" + } + ], + "Codec": "h264", + "$type": "CodecProfile" + }, + { + "Type": "Video", + "Conditions": [ + { + "Condition": "NotEquals", + "Property": "IsAnamorphic", + "Value": "true", + "IsRequired": false, + "$type": "ProfileCondition" + }, + { + "Condition": "EqualsAny", + "Property": "VideoProfile", + "Value": "main|main 10", + "IsRequired": false, + "$type": "ProfileCondition" + }, + { + "Condition": "LessThanEqual", + "Property": "VideoLevel", + "Value": "183", + "IsRequired": false, + "$type": "ProfileCondition" + }, + { + "Condition": "NotEquals", + "Property": "IsInterlaced", + "Value": "true", + "IsRequired": false, + "$type": "ProfileCondition" + } + ], + "Codec": "hevc", + "$type": "CodecProfile" + } + ], + "ResponseProfiles": [ + { + "Container": "m4v", + "Type": "Video", + "MimeType": "video/mp4", + "$type": "ResponseProfile" + } + ], + "SubtitleProfiles": [ + { + "Format": "vtt", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "ass", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "ssa", + "Method": "External", + "$type": "SubtitleProfile" + } + ], + "$type": "DeviceProfile" +} diff --git a/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-TranscodeMedia.json b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-TranscodeMedia.json new file mode 100644 index 0000000000..9fc1ae6bb2 --- /dev/null +++ b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-TranscodeMedia.json @@ -0,0 +1,139 @@ +{ + "Name": "Jellyfin Media Player", + "SupportedMediaTypes": "Audio,Photo,Video", + "MaxStreamingBitrate": 20000000, + "MaxStaticBitrate": 20000000, + "MusicStreamingTranscodingBitrate": 1280000, + "TimelineOffsetSeconds": 5, + "TranscodingProfiles": [ + { + "Type": "Audio", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "mp4", + "Type": "Video", + "AudioCodec": "aac,flac,alac", + "VideoCodec": "hevc,h264", + "Context": "Streaming", + "Protocol": "hls", + "MaxAudioChannels": "2", + "MinSegments": "2", + "BreakOnNonKeyFrames": true, + "$type": "TranscodingProfile" + }, + { + "Container": "ts", + "Type": "Video", + "AudioCodec": "aac,mp3", + "VideoCodec": "h264", + "Context": "Streaming", + "Protocol": "hls", + "MaxAudioChannels": "2", + "MinSegments": "2", + "BreakOnNonKeyFrames": true, + "$type": "TranscodingProfile" + }, + { + "Container": "webm", + "Type": "Video", + "AudioCodec": "vorbis", + "VideoCodec": "vp9,vp8,vpx,av1", + "Context": "Streaming", + "Protocol": "http", + "MaxAudioChannels": "2", + "$type": "TranscodingProfile" + }, + { + "Container": "jpeg", + "Type": "Photo", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + } + ], + "SubtitleProfiles": [ + { + "Format": "srt", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "srt", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "ass", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "ass", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "sub", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "sub", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "ssa", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "ssa", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "smi", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "smi", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "pgssub", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "dvdsub", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "pgs", + "Method": "Embed", + "$type": "SubtitleProfile" + } + ], + "$type": "DeviceProfile" +} diff --git a/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Yatse.json b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Yatse.json new file mode 100644 index 0000000000..256c8dc2f0 --- /dev/null +++ b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Yatse.json @@ -0,0 +1,189 @@ +{ + "EnableAlbumArtInDidl": false, + "EnableSingleAlbumArtLimit": false, + "EnableSingleSubtitleLimit": false, + "SupportedMediaTypes": "Audio,Photo,Video", + "MaxAlbumArtWidth": 0, + "MaxAlbumArtHeight": 0, + "MaxStreamingBitrate": 120000000, + "MaxStaticBitrate": 100000000, + "MusicStreamingTranscodingBitrate": 192000, + "TimelineOffsetSeconds": 0, + "RequiresPlainVideoItems": false, + "RequiresPlainFolders": false, + "EnableMSMediaReceiverRegistrar": false, + "IgnoreTranscodeByteRangeRequests": false, + "DirectPlayProfiles": [ + { + "Container": "", + "AudioCodec": "aac", + "VideoCodec": "", + "Type": "Video", + "$type": "DirectPlayProfile" + }, + { + "Container": "ts,mp4,mka,m4a,mp3,mp2,wav,flac,ogg", + "AudioCodec": "", + "VideoCodec": "", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "", + "AudioCodec": "", + "VideoCodec": "", + "Type": "Photo", + "$type": "DirectPlayProfile" + } + ], + "TranscodingProfiles": [ + { + "Container": "ts", + "Type": "Video", + "VideoCodec": "h264", + "AudioCodec": "aac", + "Protocol": "hls", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": true, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "mp3", + "Type": "Audio", + "VideoCodec": "", + "AudioCodec": "mp3", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Static", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "mp3", + "Type": "Audio", + "VideoCodec": "", + "AudioCodec": "mp3", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + } + ], + "CodecProfiles": [ + { + "Type": "VideoAudio", + "Conditions": [ + { + "Condition": "Equals", + "Property": "IsSecondaryAudio", + "Value": "false", + "IsRequired": false, + "$type": "ProfileCondition" + } + ], + "Codec": "", + "Container": "", + "$type": "CodecProfile" + } + ], + "ResponseProfiles": [ + { + "Container": "m4v", + "Type": "Video", + "MimeType": "video/mp4", + "$type": "ResponseProfile" + }, + { + "Container": "mov", + "Type": "Video", + "MimeType": "video/webm", + "$type": "ResponseProfile" + } + ], + "SubtitleProfiles": [ + { + "Format": "vtt", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "srt", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "ass", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "ssa", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "smi", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "subrip", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "sub", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "dvdsub", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "pgs", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "pgssub", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "srt", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "sub", + "Method": "External", + "$type": "SubtitleProfile" + } + ], + "$type": "DeviceProfile" +} diff --git a/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Yatse2.json b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Yatse2.json new file mode 100644 index 0000000000..256c8dc2f0 --- /dev/null +++ b/tests/Jellyfin.Model.Tests/Test Data/DeviceProfile-Yatse2.json @@ -0,0 +1,189 @@ +{ + "EnableAlbumArtInDidl": false, + "EnableSingleAlbumArtLimit": false, + "EnableSingleSubtitleLimit": false, + "SupportedMediaTypes": "Audio,Photo,Video", + "MaxAlbumArtWidth": 0, + "MaxAlbumArtHeight": 0, + "MaxStreamingBitrate": 120000000, + "MaxStaticBitrate": 100000000, + "MusicStreamingTranscodingBitrate": 192000, + "TimelineOffsetSeconds": 0, + "RequiresPlainVideoItems": false, + "RequiresPlainFolders": false, + "EnableMSMediaReceiverRegistrar": false, + "IgnoreTranscodeByteRangeRequests": false, + "DirectPlayProfiles": [ + { + "Container": "", + "AudioCodec": "aac", + "VideoCodec": "", + "Type": "Video", + "$type": "DirectPlayProfile" + }, + { + "Container": "ts,mp4,mka,m4a,mp3,mp2,wav,flac,ogg", + "AudioCodec": "", + "VideoCodec": "", + "Type": "Audio", + "$type": "DirectPlayProfile" + }, + { + "Container": "", + "AudioCodec": "", + "VideoCodec": "", + "Type": "Photo", + "$type": "DirectPlayProfile" + } + ], + "TranscodingProfiles": [ + { + "Container": "ts", + "Type": "Video", + "VideoCodec": "h264", + "AudioCodec": "aac", + "Protocol": "hls", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": true, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "mp3", + "Type": "Audio", + "VideoCodec": "", + "AudioCodec": "mp3", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Static", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + }, + { + "Container": "mp3", + "Type": "Audio", + "VideoCodec": "", + "AudioCodec": "mp3", + "Protocol": "http", + "EstimateContentLength": false, + "EnableMpegtsM2TsMode": false, + "TranscodeSeekInfo": "Auto", + "CopyTimestamps": false, + "Context": "Streaming", + "EnableSubtitlesInManifest": false, + "MaxAudioChannels": "6", + "MinSegments": 0, + "SegmentLength": 0, + "BreakOnNonKeyFrames": false, + "$type": "TranscodingProfile" + } + ], + "CodecProfiles": [ + { + "Type": "VideoAudio", + "Conditions": [ + { + "Condition": "Equals", + "Property": "IsSecondaryAudio", + "Value": "false", + "IsRequired": false, + "$type": "ProfileCondition" + } + ], + "Codec": "", + "Container": "", + "$type": "CodecProfile" + } + ], + "ResponseProfiles": [ + { + "Container": "m4v", + "Type": "Video", + "MimeType": "video/mp4", + "$type": "ResponseProfile" + }, + { + "Container": "mov", + "Type": "Video", + "MimeType": "video/webm", + "$type": "ResponseProfile" + } + ], + "SubtitleProfiles": [ + { + "Format": "vtt", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "srt", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "ass", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "ssa", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "smi", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "subrip", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "sub", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "dvdsub", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "pgs", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "pgssub", + "Method": "Embed", + "$type": "SubtitleProfile" + }, + { + "Format": "srt", + "Method": "External", + "$type": "SubtitleProfile" + }, + { + "Format": "sub", + "Method": "External", + "$type": "SubtitleProfile" + } + ], + "$type": "DeviceProfile" +} diff --git a/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-av1-aac-srt-2600k.json b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-av1-aac-srt-2600k.json new file mode 100644 index 0000000000..da185aacfb --- /dev/null +++ b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-av1-aac-srt-2600k.json @@ -0,0 +1,73 @@ +{ + "Id": "a766d122b58e45d9492d17af66748bf5", + "Path": "/Media/MyVideo-720p.mkv", + "Container": "mkv,webm", + "Size": 835317696, + "Name": "MyVideo-1080p", + "ETag": "579a34c6d5dfb23f61539a51220b6a23", + "RunTimeTicks": 25801230336, + "SupportsTranscoding": true, + "SupportsDirectStream": true, + "SupportsDirectPlay": true, + "SupportsProbing": true, + "MediaStreams": [ + { + "Codec": "av1", + "Language": "eng", + "ColorTransfer": "bt709", + "ColorPrimaries": "bt709", + "TimeBase": "1/11988", + "VideoRange": "SDR", + "DisplayTitle": "1080p AV1 SDR", + "NalLengthSize": "0", + "BitRate": 2032876, + "BitDepth": 8, + "RefFrames": 1, + "IsDefault": true, + "Height": 720, + "Width": 1280, + "AverageFrameRate": 23.976, + "RealFrameRate": 23.976, + "Profile": "Main", + "Type": 1, + "AspectRatio": "16:9", + "PixelFormat": "yuv420p", + "Level": -99 + }, + { + "Codec": "aac", + "CodecTag": "mp4a", + "Language": "eng", + "TimeBase": "1/48000", + "DisplayTitle": "En - AAC - Stereo - Default", + "ChannelLayout": "stereo", + "BitRate": 164741, + "Channels": 2, + "SampleRate": 48000, + "IsDefault": true, + "Profile": "LC", + "Index": 1, + "Score": 203 + }, + { + "Codec": "srt", + "Language": "eng", + "TimeBase": "1/1000000", + "localizedUndefined": "Undefined", + "localizedDefault": "Default", + "localizedForced": "Forced", + "DisplayTitle": "En - Default", + "BitRate": 92, + "IsDefault": true, + "Type": 2, + "Index": 2, + "Score": 6421, + "IsExternal": true, + "IsTextSubtitleStream": true, + "SupportsExternalStream": true + } + ], + "Bitrate": 2590008, + "DefaultAudioStreamIndex": 1, + "DefaultSubtitleStreamIndex": 2 +} diff --git a/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-av1-vorbis-srt-2600k.json b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-av1-vorbis-srt-2600k.json new file mode 100644 index 0000000000..774dba32ae --- /dev/null +++ b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-av1-vorbis-srt-2600k.json @@ -0,0 +1,72 @@ +{ + "Id": "a766d122b58e45d9492d17af66748bf5", + "Path": "/Media/MyVideo-720p.mkv", + "Container": "mkv,webm", + "Size": 835317696, + "Name": "MyVideo-1080p", + "ETag": "579a34c6d5dfb23f61539a51220b6a23", + "RunTimeTicks": 25801230336, + "SupportsTranscoding": true, + "SupportsDirectStream": true, + "SupportsDirectPlay": true, + "SupportsProbing": true, + "MediaStreams": [ + { + "Codec": "av1", + "Language": "eng", + "ColorTransfer": "bt709", + "ColorPrimaries": "bt709", + "TimeBase": "1/11988", + "VideoRange": "SDR", + "DisplayTitle": "1080p AV1 SDR", + "NalLengthSize": "0", + "BitRate": 2032876, + "BitDepth": 8, + "RefFrames": 1, + "IsDefault": true, + "Height": 720, + "Width": 1280, + "AverageFrameRate": 23.976, + "RealFrameRate": 23.976, + "Profile": "Main", + "Type": 1, + "AspectRatio": "16:9", + "PixelFormat": "yuv420p", + "Level": -99 + }, + { + "Codec": "vorbis", + "CodecTag": "ogg", + "Language": "eng", + "TimeBase": "1/48000", + "DisplayTitle": "En - Vorbis - Stereo - Default", + "ChannelLayout": "stereo", + "BitRate": 164741, + "Channels": 2, + "SampleRate": 48000, + "IsDefault": true, + "Index": 1, + "Score": 203 + }, + { + "Codec": "srt", + "Language": "eng", + "TimeBase": "1/1000000", + "localizedUndefined": "Undefined", + "localizedDefault": "Default", + "localizedForced": "Forced", + "DisplayTitle": "En - Default", + "BitRate": 92, + "IsDefault": true, + "Type": 2, + "Index": 2, + "Score": 6421, + "IsExternal": true, + "IsTextSubtitleStream": true, + "SupportsExternalStream": true + } + ], + "Bitrate": 2590008, + "DefaultAudioStreamIndex": 1, + "DefaultSubtitleStreamIndex": 2 +} diff --git a/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-vp9-aac-srt-2600k.json b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-vp9-aac-srt-2600k.json new file mode 100644 index 0000000000..0a85a13533 --- /dev/null +++ b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-vp9-aac-srt-2600k.json @@ -0,0 +1,73 @@ +{ + "Id": "a766d122b58e45d9492d17af66748bf5", + "Path": "/Media/MyVideo-720p.mkv", + "Container": "mkv,webm", + "Size": 835317696, + "Name": "MyVideo-1080p", + "ETag": "579a34c6d5dfb23f61539a51220b6a23", + "RunTimeTicks": 25801230336, + "SupportsTranscoding": true, + "SupportsDirectStream": true, + "SupportsDirectPlay": true, + "SupportsProbing": true, + "MediaStreams": [ + { + "Codec": "vp9", + "Language": "eng", + "ColorTransfer": "bt709", + "ColorPrimaries": "bt709", + "TimeBase": "1/11988", + "VideoRange": "SDR", + "DisplayTitle": "1080p VP9 SDR", + "NalLengthSize": "0", + "BitRate": 2032876, + "BitDepth": 8, + "RefFrames": 1, + "IsDefault": true, + "Height": 720, + "Width": 1280, + "AverageFrameRate": 23.976, + "RealFrameRate": 23.976, + "Profile": "Profile 0", + "Type": 1, + "AspectRatio": "16:9", + "PixelFormat": "yuv420p", + "Level": -99 + }, + { + "Codec": "aac", + "CodecTag": "mp4a", + "Language": "eng", + "TimeBase": "1/48000", + "DisplayTitle": "En - AAC - Stereo - Default", + "ChannelLayout": "stereo", + "BitRate": 164741, + "Channels": 2, + "SampleRate": 48000, + "IsDefault": true, + "Profile": "LC", + "Index": 1, + "Score": 203 + }, + { + "Codec": "srt", + "Language": "eng", + "TimeBase": "1/1000000", + "localizedUndefined": "Undefined", + "localizedDefault": "Default", + "localizedForced": "Forced", + "DisplayTitle": "En - Default", + "BitRate": 92, + "IsDefault": true, + "Type": 2, + "Index": 2, + "Score": 6421, + "IsExternal": true, + "IsTextSubtitleStream": true, + "SupportsExternalStream": true + } + ], + "Bitrate": 2590008, + "DefaultAudioStreamIndex": 1, + "DefaultSubtitleStreamIndex": 2 +} diff --git a/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-vp9-ac3-srt-2600k.json b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-vp9-ac3-srt-2600k.json new file mode 100644 index 0000000000..2b932ff52a --- /dev/null +++ b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-vp9-ac3-srt-2600k.json @@ -0,0 +1,72 @@ +{ + "Id": "a766d122b58e45d9492d17af66748bf5", + "Path": "/Media/MyVideo-720p.mkv", + "Container": "mkv,webm", + "Size": 835317696, + "Name": "MyVideo-1080p", + "ETag": "579a34c6d5dfb23f61539a51220b6a23", + "RunTimeTicks": 25801230336, + "SupportsTranscoding": true, + "SupportsDirectStream": true, + "SupportsDirectPlay": true, + "SupportsProbing": true, + "MediaStreams": [ + { + "Codec": "vp9", + "Language": "eng", + "ColorTransfer": "bt709", + "ColorPrimaries": "bt709", + "TimeBase": "1/11988", + "VideoRange": "SDR", + "DisplayTitle": "1080p VP9 SDR", + "NalLengthSize": "0", + "BitRate": 2032876, + "BitDepth": 8, + "RefFrames": 1, + "IsDefault": true, + "Height": 720, + "Width": 1280, + "AverageFrameRate": 23.976, + "RealFrameRate": 23.976, + "Profile": "Profile 0", + "Type": 1, + "AspectRatio": "16:9", + "PixelFormat": "yuv420p", + "Level": -99 + }, + { + "Codec": "ac3", + "CodecTag": "ac-3", + "Language": "eng", + "TimeBase": "1/48000", + "DisplayTitle": "En - Dolby Digital - 5.1 - Default", + "ChannelLayout": "5.1", + "BitRate": 384000, + "Channels": 6, + "SampleRate": 48000, + "IsDefault": true, + "Index": 1, + "Score": 202 + }, + { + "Codec": "srt", + "Language": "eng", + "TimeBase": "1/1000000", + "localizedUndefined": "Undefined", + "localizedDefault": "Default", + "localizedForced": "Forced", + "DisplayTitle": "En - Default", + "BitRate": 92, + "IsDefault": true, + "Type": 2, + "Index": 2, + "Score": 6421, + "IsExternal": true, + "IsTextSubtitleStream": true, + "SupportsExternalStream": true + } + ], + "Bitrate": 2590008, + "DefaultAudioStreamIndex": 1, + "DefaultSubtitleStreamIndex": 2 +} diff --git a/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-vp9-vorbis-srt-2600k.json b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-vp9-vorbis-srt-2600k.json new file mode 100644 index 0000000000..56b04b7898 --- /dev/null +++ b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-vp9-vorbis-srt-2600k.json @@ -0,0 +1,73 @@ +{ + "Id": "a766d122b58e45d9492d17af66748bf5", + "Path": "/Media/MyVideo-720p.mkv", + "Container": "mkv,webm", + "Size": 835317696, + "Name": "MyVideo-1080p", + "ETag": "579a34c6d5dfb23f61539a51220b6a23", + "RunTimeTicks": 25801230336, + "SupportsTranscoding": true, + "SupportsDirectStream": true, + "SupportsDirectPlay": true, + "SupportsProbing": true, + "MediaStreams": [ + { + "Codec": "vp9", + "Language": "eng", + "ColorTransfer": "bt709", + "ColorPrimaries": "bt709", + "TimeBase": "1/11988", + "VideoRange": "SDR", + "DisplayTitle": "1080p VP9 SDR", + "NalLengthSize": "0", + "BitRate": 2032876, + "BitDepth": 8, + "RefFrames": 1, + "IsDefault": true, + "Height": 720, + "Width": 1280, + "AverageFrameRate": 23.976, + "RealFrameRate": 23.976, + "Profile": "Profile 0", + "Type": 1, + "AspectRatio": "16:9", + "PixelFormat": "yuv420p", + "Level": -99 + }, + { + "Codec": "vorbis", + "Language": "eng", + "TimeBase": "1/48000", + "DisplayTitle": "En - Vorbis - Stereo - Default", + "ChannelLayout": "stereo", + "BitRate": 164741, + "Channels": 2, + "SampleRate": 48000, + "IsDefault": true, + "Profile": "LC", + "Index": 1, + "Score": 203 + }, + { + "Codec": "srt", + "Language": "eng", + "TimeBase": "1/1000000", + "localizedUndefined": "Undefined", + "localizedDefault": "Default", + "localizedForced": "Forced", + "DisplayTitle": "En - Default", + "BitRate": 92, + "IsDefault": true, + "Type": 2, + "Index": 2, + "Score": 6421, + "IsExternal": true, + "IsTextSubtitleStream": true, + "SupportsExternalStream": true + } + ], + "Bitrate": 2590008, + "RequiredHttpHeaders": {}, + "DefaultAudioStreamIndex": 1, + "DefaultSubtitleStreamIndex": 2 +} diff --git a/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-vp9-vorbis-vtt-2600k.json b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-vp9-vorbis-vtt-2600k.json new file mode 100644 index 0000000000..1ee7eade98 --- /dev/null +++ b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mkv-vp9-vorbis-vtt-2600k.json @@ -0,0 +1,72 @@ +{ + "Id": "a766d122b58e45d9492d17af66748bf5", + "Path": "/Media/MyVideo-720p.mkv", + "Container": "mkv,webm", + "Size": 835317696, + "Name": "MyVideo-1080p", + "ETag": "579a34c6d5dfb23f61539a51220b6a23", + "RunTimeTicks": 25801230336, + "SupportsTranscoding": true, + "SupportsDirectStream": true, + "SupportsDirectPlay": true, + "SupportsProbing": true, + "MediaStreams": [ + { + "Codec": "vp9", + "Language": "eng", + "ColorTransfer": "bt709", + "ColorPrimaries": "bt709", + "TimeBase": "1/11988", + "VideoRange": "SDR", + "DisplayTitle": "1080p VP9 SDR", + "NalLengthSize": "0", + "BitRate": 2032876, + "BitDepth": 8, + "RefFrames": 1, + "IsDefault": true, + "Height": 720, + "Width": 1280, + "AverageFrameRate": 23.976, + "RealFrameRate": 23.976, + "Profile": "Profile 0", + "Type": 1, + "AspectRatio": "16:9", + "PixelFormat": "yuv420p", + "Level": -99 + }, + { + "Codec": "vorbis", + "Language": "eng", + "TimeBase": "1/48000", + "DisplayTitle": "En - Vorbis - Stereo - Default", + "ChannelLayout": "stereo", + "BitRate": 164741, + "Channels": 2, + "SampleRate": 48000, + "IsDefault": true, + "Profile": "LC", + "Index": 1, + "Score": 203 + }, + { + "Codec": "webvtt", + "Language": "eng", + "TimeBase": "1/1000000", + "localizedUndefined": "Undefined", + "localizedDefault": "Default", + "localizedForced": "Forced", + "DisplayTitle": "En - Default", + "BitRate": 92, + "IsDefault": true, + "Type": 2, + "Index": 2, + "Score": 6421, + "IsExternal": true, + "IsTextSubtitleStream": true, + "SupportsExternalStream": true + } + ], + "Bitrate": 2590008, + "DefaultAudioStreamIndex": 1, + "DefaultSubtitleStreamIndex": 2 +} diff --git a/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-aac-srt-2600k.json b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-aac-srt-2600k.json new file mode 100644 index 0000000000..21911843d1 --- /dev/null +++ b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-aac-srt-2600k.json @@ -0,0 +1,72 @@ +{ + "Id": "a766d122b58e45d9492d17af77748bf5", + "Path": "/Media/MyVideo-720p.mp4", + "Container": "mov,mp4,m4a,3gp,3g2,mj2", + "Size": 835317696, + "Name": "MyVideo-720p", + "ETag": "579a34c6d5dfb21d81539a51220b6a23", + "RunTimeTicks": 25801230336, + "SupportsTranscoding": true, + "SupportsDirectStream": true, + "SupportsDirectPlay": true, + "SupportsProbing": true, + "MediaStreams": [ + { + "Codec": "h264", + "CodecTag": "avc1", + "Language": "eng", + "TimeBase": "1/11988", + "VideoRange": "SDR", + "DisplayTitle": "720p H264 SDR", + "NalLengthSize": "0", + "BitRate": 2032876, + "BitDepth": 8, + "RefFrames": 1, + "IsDefault": true, + "Height": 720, + "Width": 1280, + "AverageFrameRate": 23.976, + "RealFrameRate": 23.976, + "Profile": "High", + "Type": 1, + "AspectRatio": "16:9", + "PixelFormat": "yuv420p", + "Level": 41 + }, + { + "Codec": "aac", + "CodecTag": "mp4a", + "Language": "eng", + "TimeBase": "1/48000", + "DisplayTitle": "En - AAC - Stereo - Default", + "ChannelLayout": "stereo", + "BitRate": 164741, + "Channels": 2, + "SampleRate": 48000, + "IsDefault": true, + "Profile": "LC", + "Index": 1, + "Score": 203 + }, + { + "Codec": "srt", + "Language": "eng", + "TimeBase": "1/1000000", + "localizedUndefined": "Undefined", + "localizedDefault": "Default", + "localizedForced": "Forced", + "DisplayTitle": "En - Default", + "BitRate": 92, + "IsDefault": true, + "Type": 2, + "Index": 2, + "Score": 6421, + "IsExternal": true, + "IsTextSubtitleStream": true, + "SupportsExternalStream": true + } + ], + "Bitrate": 2590008, + "DefaultAudioStreamIndex": 1, + "DefaultSubtitleStreamIndex": 2 +} diff --git a/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-aac-vtt-2600k.json b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-aac-vtt-2600k.json new file mode 100644 index 0000000000..77954a31a2 --- /dev/null +++ b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-aac-vtt-2600k.json @@ -0,0 +1,72 @@ +{ + "Id": "a766d122b58e45d9492d17af77748bf5", + "Path": "/Media/MyVideo-720p.mp4", + "Container": "mov,mp4,m4a,3gp,3g2,mj2", + "Size": 835317696, + "Name": "MyVideo-720p", + "ETag": "579a34c6d5dfb21d81539a51220b6a23", + "RunTimeTicks": 25801230336, + "SupportsTranscoding": true, + "SupportsDirectStream": true, + "SupportsDirectPlay": true, + "SupportsProbing": true, + "MediaStreams": [ + { + "Codec": "h264", + "CodecTag": "avc1", + "Language": "eng", + "TimeBase": "1/11988", + "VideoRange": "SDR", + "DisplayTitle": "720p H264 SDR", + "NalLengthSize": "0", + "BitRate": 2032876, + "BitDepth": 8, + "RefFrames": 1, + "IsDefault": true, + "Height": 720, + "Width": 1280, + "AverageFrameRate": 23.976, + "RealFrameRate": 23.976, + "Profile": "High", + "Type": 1, + "AspectRatio": "16:9", + "PixelFormat": "yuv420p", + "Level": 41 + }, + { + "Codec": "aac", + "CodecTag": "mp4a", + "Language": "eng", + "TimeBase": "1/48000", + "DisplayTitle": "En - AAC - Stereo - Default", + "ChannelLayout": "stereo", + "BitRate": 164741, + "Channels": 2, + "SampleRate": 48000, + "IsDefault": true, + "Profile": "LC", + "Index": 1, + "Score": 203 + }, + { + "Codec": "webvtt", + "Language": "eng", + "TimeBase": "1/1000000", + "localizedUndefined": "Undefined", + "localizedDefault": "Default", + "localizedForced": "Forced", + "DisplayTitle": "En - Default", + "BitRate": 92, + "IsDefault": true, + "Type": 2, + "Index": 2, + "Score": 6421, + "IsExternal": true, + "IsTextSubtitleStream": true, + "SupportsExternalStream": true + } + ], + "Bitrate": 2590008, + "DefaultAudioStreamIndex": 1, + "DefaultSubtitleStreamIndex": 2 +} diff --git a/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aac-srt-2600k.json b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aac-srt-2600k.json new file mode 100644 index 0000000000..70bbb9d0d1 --- /dev/null +++ b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aac-srt-2600k.json @@ -0,0 +1,87 @@ +{ + "Id": "a766d122b58e45d9492d17af77748bf5", + "Path": "/Media/MyVideo-720p.mp4", + "Container": "mov,mp4,m4a,3gp,3g2,mj2", + "Size": 835317696, + "Name": "MyVideo-720p", + "ETag": "579a34c6d5dfb21d81539a51220b6a23", + "RunTimeTicks": 25801230336, + "SupportsTranscoding": true, + "SupportsDirectStream": true, + "SupportsDirectPlay": true, + "SupportsProbing": true, + "MediaStreams": [ + { + "Codec": "h264", + "CodecTag": "avc1", + "Language": "eng", + "TimeBase": "1/11988", + "VideoRange": "SDR", + "DisplayTitle": "720p H264 SDR", + "NalLengthSize": "0", + "BitRate": 2032876, + "BitDepth": 8, + "RefFrames": 1, + "IsDefault": true, + "Height": 720, + "Width": 1280, + "AverageFrameRate": 23.976, + "RealFrameRate": 23.976, + "Profile": "High", + "Type": 1, + "AspectRatio": "16:9", + "PixelFormat": "yuv420p", + "Level": 41 + }, + { + "Codec": "ac3", + "CodecTag": "ac-3", + "Language": "eng", + "TimeBase": "1/48000", + "DisplayTitle": "En - Dolby Digital - 5.1 - Default", + "ChannelLayout": "5.1", + "BitRate": 384000, + "Channels": 6, + "SampleRate": 48000, + "IsDefault": true, + "Index": 1, + "Score": 202 + }, + { + "Codec": "aac", + "CodecTag": "mp4a", + "Language": "eng", + "TimeBase": "1/48000", + "DisplayTitle": "En - AAC - Stereo - Default", + "ChannelLayout": "stereo", + "BitRate": 164741, + "Channels": 2, + "SampleRate": 48000, + "IsDefault": true, + "Profile": "LC", + "Index": 2, + "Score": 203 + }, + { + "Codec": "srt", + "Language": "eng", + "TimeBase": "1/1000000", + "localizedUndefined": "Undefined", + "localizedDefault": "Default", + "localizedForced": "Forced", + "DisplayTitle": "En - Default", + "BitRate": 92, + "IsDefault": true, + "Type": 2, + "Index": 3, + "Score": 6421, + "IsExternal": true, + "IsTextSubtitleStream": true, + "SupportsExternalStream": true, + "Path": "/Media/MyVideo-WEBDL-2160p.default.eng.srt" + } + ], + "Bitrate": 2590008, + "DefaultAudioStreamIndex": 1, + "DefaultSubtitleStreamIndex": 3 +} diff --git a/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aacDef-srt-2600k.json b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aacDef-srt-2600k.json new file mode 100644 index 0000000000..036e41f077 --- /dev/null +++ b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aacDef-srt-2600k.json @@ -0,0 +1,87 @@ +{ + "Id": "a766d122b58e45d9492d17af77748bf5", + "Path": "/Media/MyVideo-720p.mp4", + "Container": "mov,mp4,m4a,3gp,3g2,mj2", + "Size": 835317696, + "Name": "MyVideo-720p", + "ETag": "579a34c6d5dfb21d81539a51220b6a23", + "RunTimeTicks": 25801230336, + "SupportsTranscoding": true, + "SupportsDirectStream": true, + "SupportsDirectPlay": true, + "SupportsProbing": true, + "MediaStreams": [ + { + "Codec": "h264", + "CodecTag": "avc1", + "Language": "eng", + "TimeBase": "1/11988", + "VideoRange": "SDR", + "DisplayTitle": "720p H264 SDR", + "NalLengthSize": "0", + "BitRate": 2032876, + "BitDepth": 8, + "RefFrames": 1, + "IsDefault": true, + "Height": 720, + "Width": 1280, + "AverageFrameRate": 23.976, + "RealFrameRate": 23.976, + "Profile": "High", + "Type": 1, + "AspectRatio": "16:9", + "PixelFormat": "yuv420p", + "Level": 41 + }, + { + "Codec": "ac3", + "CodecTag": "ac-3", + "Language": "eng", + "TimeBase": "1/48000", + "DisplayTitle": "En - Dolby Digital - 5.1 - Default", + "ChannelLayout": "5.1", + "BitRate": 384000, + "Channels": 6, + "SampleRate": 48000, + "IsDefault": true, + "Index": 1, + "Score": 202 + }, + { + "Codec": "aac", + "CodecTag": "mp4a", + "Language": "eng", + "TimeBase": "1/48000", + "DisplayTitle": "En - AAC - Stereo - Default", + "ChannelLayout": "stereo", + "BitRate": 164741, + "Channels": 2, + "SampleRate": 48000, + "IsDefault": true, + "Profile": "LC", + "Index": 2, + "Score": 203 + }, + { + "Codec": "srt", + "Language": "eng", + "TimeBase": "1/1000000", + "localizedUndefined": "Undefined", + "localizedDefault": "Default", + "localizedForced": "Forced", + "DisplayTitle": "En - Default", + "BitRate": 92, + "IsDefault": true, + "Type": 2, + "Index": 3, + "Score": 6421, + "IsExternal": true, + "IsTextSubtitleStream": true, + "SupportsExternalStream": true, + "Path": "/Media/MyVideo-WEBDL-2160p.default.eng.srt" + } + ], + "Bitrate": 2590008, + "DefaultAudioStreamIndex": 2, + "DefaultSubtitleStreamIndex": 3 +} diff --git a/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aacExt-srt-2600k.json b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aacExt-srt-2600k.json new file mode 100644 index 0000000000..b81c4597f6 --- /dev/null +++ b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-aacExt-srt-2600k.json @@ -0,0 +1,89 @@ +{ + "Id": "a766d122b58e45d9492d17af77748bf5", + "Path": "/Media/MyVideo-720p.mp4", + "Container": "mov,mp4,m4a,3gp,3g2,mj2", + "Size": 835317696, + "Name": "MyVideo-720p", + "ETag": "579a34c6d5dfb21d81539a51220b6a23", + "RunTimeTicks": 25801230336, + "SupportsTranscoding": true, + "SupportsDirectStream": true, + "SupportsDirectPlay": true, + "SupportsProbing": true, + "MediaStreams": [ + { + "Codec": "h264", + "CodecTag": "avc1", + "Language": "eng", + "TimeBase": "1/11988", + "VideoRange": "SDR", + "DisplayTitle": "720p H264 SDR", + "NalLengthSize": "0", + "BitRate": 2032876, + "BitDepth": 8, + "RefFrames": 1, + "IsDefault": true, + "Height": 720, + "Width": 1280, + "AverageFrameRate": 23.976, + "RealFrameRate": 23.976, + "Profile": "High", + "Type": 1, + "AspectRatio": "16:9", + "PixelFormat": "yuv420p", + "Level": 41 + }, + { + "Codec": "ac3", + "CodecTag": "ac-3", + "Language": "eng", + "TimeBase": "1/48000", + "DisplayTitle": "En - Dolby Digital - 5.1 - Default", + "ChannelLayout": "5.1", + "BitRate": 384000, + "Channels": 6, + "SampleRate": 48000, + "IsDefault": true, + "Index": 1, + "Score": 202 + }, + { + "Codec": "aac", + "CodecTag": "mp4a", + "Language": "eng", + "TimeBase": "1/48000", + "DisplayTitle": "En - AAC - Stereo - Default", + "ChannelLayout": "stereo", + "BitRate": 164741, + "Channels": 2, + "SampleRate": 48000, + "IsDefault": true, + "IsExternal": true, + "Profile": "LC", + "Index": 2, + "Score": 203, + "Path": "/Media/MyVideo-WEBDL-2160p.default.eng.srt" + }, + { + "Codec": "srt", + "Language": "eng", + "TimeBase": "1/1000000", + "localizedUndefined": "Undefined", + "localizedDefault": "Default", + "localizedForced": "Forced", + "DisplayTitle": "En - Default", + "BitRate": 92, + "IsDefault": true, + "Type": 2, + "Index": 3, + "Score": 6421, + "IsExternal": true, + "IsTextSubtitleStream": true, + "SupportsExternalStream": true, + "Path": "/Media/MyVideo-WEBDL-2160p.default.eng.srt" + } + ], + "Bitrate": 2590008, + "DefaultAudioStreamIndex": 1, + "DefaultSubtitleStreamIndex": 3 +} diff --git a/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-srt-2600k.json b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-srt-2600k.json new file mode 100644 index 0000000000..b71fd4a6a2 --- /dev/null +++ b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-h264-ac3-srt-2600k.json @@ -0,0 +1,71 @@ +{ + "Id": "a766d122b58e45d9492d17af77748bf5", + "Path": "/Media/MyVideo-720p.mp4", + "Container": "mov,mp4,m4a,3gp,3g2,mj2", + "Size": 835317696, + "Name": "MyVideo-720p", + "ETag": "579a34c6d5dfb21d81539a51220b6a23", + "RunTimeTicks": 25801230336, + "SupportsTranscoding": true, + "SupportsDirectStream": true, + "SupportsDirectPlay": true, + "SupportsProbing": true, + "MediaStreams": [ + { + "Codec": "h264", + "CodecTag": "avc1", + "Language": "eng", + "TimeBase": "1/11988", + "VideoRange": "SDR", + "DisplayTitle": "720p H264 SDR", + "NalLengthSize": "0", + "BitRate": 2032876, + "BitDepth": 8, + "RefFrames": 1, + "IsDefault": true, + "Height": 720, + "Width": 1280, + "AverageFrameRate": 23.976, + "RealFrameRate": 23.976, + "Profile": "High", + "Type": 1, + "AspectRatio": "16:9", + "PixelFormat": "yuv420p", + "Level": 41 + }, + { + "Codec": "ac3", + "CodecTag": "ac-3", + "Language": "eng", + "TimeBase": "1/48000", + "DisplayTitle": "En - Dolby Digital - 5.1 - Default", + "ChannelLayout": "5.1", + "BitRate": 384000, + "Channels": 6, + "SampleRate": 48000, + "IsDefault": true, + "Index": 1, + "Score": 202 + }, + { + "Codec": "srt", + "Language": "eng", + "TimeBase": "1/1000000", + "localizedUndefined": "Undefined", + "localizedDefault": "Default", + "localizedForced": "Forced", + "DisplayTitle": "En - Default", + "BitRate": 92, + "IsDefault": true, + "Type": 2, + "Index": 2, + "Score": 6421, + "IsExternal": true, + "IsTextSubtitleStream": true, + "SupportsExternalStream": true + } + ], + "Bitrate": 2590008, + "DefaultAudioStreamIndex": 1, + "DefaultSubtitleStreamIndex": 2 +} diff --git a/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-hevc-aac-srt-15200k.json b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-hevc-aac-srt-15200k.json new file mode 100644 index 0000000000..4c6409e7b0 --- /dev/null +++ b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-hevc-aac-srt-15200k.json @@ -0,0 +1,75 @@ +{ + "Id": "f6eab7118618ab26e61e495a1853481a", + "Path": "/Media/MyVideo-WEBDL-2160p.mp4", + "Container": "mov,mp4,m4a,3gp,3g2,mj2", + "Size": 6521110016, + "Name": "MyVideo WEBDL-2160p", + "ETag": "a2fb84b618ba2467fe377543f879e9bf", + "RunTimeTicks": 34318510080, + "SupportsTranscoding": true, + "SupportsDirectStream": true, + "SupportsDirectPlay": true, + "SupportsProbing": true, + "MediaStreams": [ + { + "Codec": "hevc", + "CodecTag": "hev1", + "Language": "eng", + "ColorSpace": "bt2020nc", + "ColorTransfer": "smpte2084", + "ColorPrimaries": "bt2020", + "TimeBase": "1/16000", + "VideoRange": "HDR", + "DisplayTitle": "4K HEVC HDR", + "BitRate": 14715079, + "BitDepth": 8, + "RefFrames": 1, + "IsDefault": true, + "Height": 2160, + "Width": 3840, + "AverageFrameRate": 23.976, + "RealFrameRate": 23.976, + "Profile": "Main 10", + "Type": 1, + "AspectRatio": "16:9", + "PixelFormat": "yuv420p10le", + "Level": 150 + }, + { + "Codec": "aac", + "CodecTag": "mp4a", + "Language": "eng", + "TimeBase": "1/48000", + "DisplayTitle": "En - AAC - Stereo - Default", + "ChannelLayout": "stereo", + "BitRate": 164741, + "Channels": 2, + "SampleRate": 48000, + "IsDefault": true, + "Profile": "LC", + "Index": 1, + "Score": 203 + }, + { + "Codec": "srt", + "Language": "eng", + "TimeBase": "1/1000000", + "localizedUndefined": "Undefined", + "localizedDefault": "Default", + "localizedForced": "Forced", + "DisplayTitle": "En - Default", + "BitRate": 92, + "IsDefault": true, + "Type": 2, + "Index": 2, + "Score": 6421, + "IsExternal": true, + "IsTextSubtitleStream": true, + "SupportsExternalStream": true, + "Path": "/Media/MyVideo-WEBDL-2160p.default.eng.srt" + } + ], + "Bitrate": 15201382, + "DefaultAudioStreamIndex": 1, + "DefaultSubtitleStreamIndex": 2 +} diff --git a/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-aac-srt-15200k.json b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-aac-srt-15200k.json new file mode 100644 index 0000000000..385bb72602 --- /dev/null +++ b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-aac-srt-15200k.json @@ -0,0 +1,89 @@ +{ + "Id": "f6eab7118618ab26e61e495a1853481a", + "Path": "/Media/MyVideo-WEBDL-2160p.mp4", + "Container": "mov,mp4,m4a,3gp,3g2,mj2", + "Size": 6521110016, + "Name": "MyVideo WEBDL-2160p", + "ETag": "a2fb84b618ba2467fe377543f879e9bf", + "RunTimeTicks": 34318510080, + "SupportsTranscoding": true, + "SupportsDirectStream": true, + "SupportsDirectPlay": true, + "SupportsProbing": true, + "MediaStreams": [ + { + "Codec": "hevc", + "CodecTag": "hev1", + "Language": "eng", + "ColorSpace": "bt2020nc", + "ColorTransfer": "smpte2084", + "ColorPrimaries": "bt2020", + "TimeBase": "1/16000", + "VideoRange": "HDR", + "DisplayTitle": "4K HEVC HDR", + "BitRate": 14715079, + "BitDepth": 8, + "RefFrames": 1, + "IsDefault": true, + "Height": 2160, + "Width": 3840, + "AverageFrameRate": 23.976, + "RealFrameRate": 23.976, + "Profile": "Main 10", + "Type": 1, + "AspectRatio": "16:9", + "PixelFormat": "yuv420p10le", + "Level": 150 + }, + { + "Codec": "ac3", + "CodecTag": "ac-3", + "Language": "eng", + "TimeBase": "1/48000", + "DisplayTitle": "En - Dolby Digital - 5.1 - Default", + "ChannelLayout": "5.1", + "BitRate": 384000, + "Channels": 6, + "SampleRate": 48000, + "IsDefault": true, + "Index": 1, + "Score": 202 + }, + { + "Codec": "aac", + "CodecTag": "mp4a", + "Language": "eng", + "TimeBase": "1/48000", + "DisplayTitle": "En - AAC - Stereo - Default", + "ChannelLayout": "stereo", + "BitRate": 164741, + "Channels": 2, + "SampleRate": 48000, + "IsDefault": true, + "Profile": "LC", + "Index": 2, + "Score": 203 + }, + { + "Codec": "srt", + "Language": "eng", + "TimeBase": "1/1000000", + "localizedUndefined": "Undefined", + "localizedDefault": "Default", + "localizedForced": "Forced", + "DisplayTitle": "En - Default", + "BitRate": 92, + "IsDefault": true, + "Type": 2, + "Index": 3, + "Score": 6421, + "IsExternal": true, + "IsTextSubtitleStream": true, + "SupportsExternalStream": true, + "Path": "/Media/MyVideo-WEBDL-2160p.default.eng.srt" + } + ], + "Bitrate": 15201382, + "DefaultAudioStreamIndex": 1, + "DefaultSubtitleStreamIndex": 3 +} diff --git a/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-aacExt-srt-15200k.json b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-aacExt-srt-15200k.json new file mode 100644 index 0000000000..fd1950bde1 --- /dev/null +++ b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-aacExt-srt-15200k.json @@ -0,0 +1,91 @@ +{ + "Id": "f6eab7118618ab26e61e495a1853481a", + "Path": "/Media/MyVideo-WEBDL-2160p.mp4", + "Container": "mov,mp4,m4a,3gp,3g2,mj2", + "Size": 6521110016, + "Name": "MyVideo WEBDL-2160p", + "ETag": "a2fb84b618ba2467fe377543f879e9bf", + "RunTimeTicks": 34318510080, + "SupportsTranscoding": true, + "SupportsDirectStream": true, + "SupportsDirectPlay": true, + "SupportsProbing": true, + "MediaStreams": [ + { + "Codec": "hevc", + "CodecTag": "hev1", + "Language": "eng", + "ColorSpace": "bt2020nc", + "ColorTransfer": "smpte2084", + "ColorPrimaries": "bt2020", + "TimeBase": "1/16000", + "VideoRange": "HDR", + "DisplayTitle": "4K HEVC HDR", + "BitRate": 14715079, + "BitDepth": 8, + "RefFrames": 1, + "IsDefault": true, + "Height": 2160, + "Width": 3840, + "AverageFrameRate": 23.976, + "RealFrameRate": 23.976, + "Profile": "Main 10", + "Type": 1, + "AspectRatio": "16:9", + "PixelFormat": "yuv420p10le", + "Level": 150 + }, + { + "Codec": "ac3", + "CodecTag": "ac-3", + "Language": "eng", + "TimeBase": "1/48000", + "DisplayTitle": "En - Dolby Digital - 5.1 - Default", + "ChannelLayout": "5.1", + "BitRate": 384000, + "Channels": 6, + "SampleRate": 48000, + "IsDefault": true, + "Index": 1, + "Score": 202 + }, + { + "Codec": "aac", + "CodecTag": "mp4a", + "Language": "eng", + "TimeBase": "1/48000", + "DisplayTitle": "En - AAC - Stereo - Default", + "ChannelLayout": "stereo", + "BitRate": 164741, + "Channels": 2, + "SampleRate": 48000, + "IsDefault": true, + "IsExternal": true, + "Profile": "LC", + "Index": 2, + "Score": 203, + "Path": "/Media/MyVideo-WEBDL-2160p.eng.m4a" + }, + { + "Codec": "srt", + "Language": "eng", + "TimeBase": "1/1000000", + "localizedUndefined": "Undefined", + "localizedDefault": "Default", + "localizedForced": "Forced", + "DisplayTitle": "En - Default", + "BitRate": 92, + "IsDefault": true, + "Type": 2, + "Index": 3, + "Score": 6421, + "IsExternal": true, + "IsTextSubtitleStream": true, + "SupportsExternalStream": true, + "Path": "/Media/MyVideo-WEBDL-2160p.default.eng.srt" + } + ], + "Bitrate": 15201382, + "DefaultAudioStreamIndex": 1, + "DefaultSubtitleStreamIndex": 3 +} diff --git a/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-srt-15200k.json b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-srt-15200k.json new file mode 100644 index 0000000000..dde7c15ea0 --- /dev/null +++ b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-mp4-hevc-ac3-srt-15200k.json @@ -0,0 +1,74 @@ +{ + "Id": "f6eab7118618ab26e61e495a1853481a", + "Path": "/Media/MyVideo-WEBDL-2160p.mp4", + "Container": "mov,mp4,m4a,3gp,3g2,mj2", + "Size": 6521110016, + "Name": "MyVideo WEBDL-2160p", + "ETag": "a2fb84b618ba2467fe377543f879e9bf", + "RunTimeTicks": 34318510080, + "SupportsTranscoding": true, + "SupportsDirectStream": true, + "SupportsDirectPlay": true, + "SupportsProbing": true, + "MediaStreams": [ + { + "Codec": "hevc", + "CodecTag": "hev1", + "Language": "eng", + "ColorSpace": "bt2020nc", + "ColorTransfer": "smpte2084", + "ColorPrimaries": "bt2020", + "TimeBase": "1/16000", + "VideoRange": "HDR", + "DisplayTitle": "4K HEVC HDR", + "BitRate": 14715079, + "BitDepth": 8, + "RefFrames": 1, + "IsDefault": true, + "Height": 2160, + "Width": 3840, + "AverageFrameRate": 23.976, + "RealFrameRate": 23.976, + "Profile": "Main 10", + "Type": 1, + "AspectRatio": "16:9", + "PixelFormat": "yuv420p10le", + "Level": 150 + }, + { + "Codec": "ac3", + "CodecTag": "ac-3", + "Language": "eng", + "TimeBase": "1/48000", + "DisplayTitle": "En - Dolby Digital - 5.1 - Default", + "ChannelLayout": "5.1", + "BitRate": 384000, + "Channels": 6, + "SampleRate": 48000, + "IsDefault": true, + "Index": 1, + "Score": 202 + }, + { + "Codec": "srt", + "Language": "eng", + "TimeBase": "1/1000000", + "localizedUndefined": "Undefined", + "localizedDefault": "Default", + "localizedForced": "Forced", + "DisplayTitle": "En - Default", + "BitRate": 92, + "IsDefault": true, + "Type": 2, + "Index": 2, + "Score": 6421, + "IsExternal": true, + "IsTextSubtitleStream": true, + "SupportsExternalStream": true, + "Path": "/Media/MyVideo-WEBDL-2160p.default.eng.srt" + } + ], + "Bitrate": 15201382, + "DefaultAudioStreamIndex": 1, + "DefaultSubtitleStreamIndex": 2 +} diff --git a/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-raw.json b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-raw.json new file mode 100644 index 0000000000..9ea55b805d --- /dev/null +++ b/tests/Jellyfin.Model.Tests/Test Data/MediaSourceInfo-raw.json @@ -0,0 +1,102 @@ +{ + "Id": "a766d122b58e45d9492d17af77748bf5", + "Path": "/Media/MyVideo-720p.mp4", + "Container": "mov,mp4,m4a,3gp,3g2,mj2", + "Size": 835317696, + "Name": "MyVideo-720p", + "ETag": "579a34c6d5dfb21d81539a51220b6a23", + "RunTimeTicks": 25801230336, + "SupportsTranscoding": true, + "SupportsDirectStream": true, + "SupportsDirectPlay": true, + "SupportsProbing": true, + "MediaStreams": [ + { + "Codec": "h264", + "CodecTag": "avc1", + "Language": "eng", + "TimeBase": "1/11988", + "VideoRange": "SDR", + "DisplayTitle": "720p H264 SDR", + "NalLengthSize": "0", + "BitRate": 2032876, + "BitDepth": 8, + "RefFrames": 1, + "IsDefault": true, + "Height": 720, + "Width": 1280, + "AverageFrameRate": 23.976, + "RealFrameRate": 23.976, + "Profile": "High", + "Type": 1, + "AspectRatio": "16:9", + "PixelFormat": "yuv420p", + "Level": 41 + }, + { + "Codec": "ac3", + "CodecTag": "ac-3", + "Language": "eng", + "TimeBase": "1/48000", + "DisplayTitle": "En - Dolby Digital - 5.1 - Default", + "ChannelLayout": "5.1", + "BitRate": 384000, + "Channels": 6, + "SampleRate": 48000, + "IsDefault": true, + "Index": 1, + "Score": 202 + }, + { + "Codec": "aac", + "CodecTag": "mp4a", + "Language": "eng", + "TimeBase": "1/48000", + "DisplayTitle": "En - AAC - Stereo - Default", + "ChannelLayout": "stereo", + "BitRate": 164741, + "Channels": 2, + "SampleRate": 48000, + "IsDefault": true, + "Profile": "LC", + "Index": 2, + "Score": 203 + }, + { + "Codec": "mov_text", + "CodecTag": "tx3g", + "Language": "eng", + "TimeBase": "1/1000000", + "localizedUndefined": "Undefined", + "localizedDefault": "Default", + "localizedForced": "Forced", + "DisplayTitle": "En - Default", + "BitRate": 92, + "IsDefault": true, + "Type": 2, + "Index": 3, + "Score": 6421, + "IsTextSubtitleStream": true, + "SupportsExternalStream": true + }, + { + "Codec": "srt", + "Language": "eng", + "localizedUndefined": "Undefined", + "localizedDefault": "Default", + "localizedForced": "Forced", + "DisplayTitle": "En - Default", + "IsDefault": true, + "Type": 2, + "Index": 4, + "Score": 6422, + "IsExternal": true, + "IsTextSubtitleStream": true, + "SupportsExternalStream": true, + "Path": "/Media/MyVideo-WEBDL-2160p.default.eng.srt" + } + ], + "Bitrate": 2590008, + "RequiredHttpHeaders": {}, + "DefaultSubtitleStreamIndex": 1 +} -- cgit v1.2.3