From 08f8b2d2f73c8e86a3c97439f65bb9f00959159d Mon Sep 17 00:00:00 2001 From: Martin Kinkelin Date: Mon, 10 Nov 2025 16:29:31 +0100 Subject: [PATCH] Tizen: Enable direct-play of anamorphic videos Anamorphic videos currently require a remux, which apparently breaks the aspect ratio: https://github.com/jellyfin/jellyfin-tizen/issues/376 On my Tizen v9 TV, the web player handles the aspect ratio just fine directly, correctly stretching the 720x472 pixels of some DVD source to a 873x472 view. Tested with HEVC and H264 media. Also got successful test reports on Tizen 6.0 and 6.5 TVs. --- src/scripts/browserDeviceProfile.js | 46 ++++++++++++++++++----------- 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/src/scripts/browserDeviceProfile.js b/src/scripts/browserDeviceProfile.js index 80bf0f33e3..f7aad7bc0e 100644 --- a/src/scripts/browserDeviceProfile.js +++ b/src/scripts/browserDeviceProfile.js @@ -297,6 +297,11 @@ function supportedDolbyVisionProfileAv1(videoTestElement) { return videoTestElement.canPlayType?.('video/mp4; codecs="dav1.10.06"').replace(/no/, ''); } +function supportsAnamorphicVideo() { + // Tizen applies the aspect ratio correctly + return browser.tizenVersion >= 6; +} + function getDirectPlayProfileForVideoContainer(container, videoAudioCodecs, videoTestElement, options) { let supported = false; let profileContainer = container; @@ -1218,12 +1223,6 @@ export default function (options) { } const h264CodecProfileConditions = [ - { - Condition: 'NotEquals', - Property: 'IsAnamorphic', - Value: 'true', - IsRequired: false - }, { Condition: 'EqualsAny', Property: 'VideoProfile', @@ -1245,12 +1244,6 @@ export default function (options) { ]; const hevcCodecProfileConditions = [ - { - Condition: 'NotEquals', - Property: 'IsAnamorphic', - Value: 'true', - IsRequired: false - }, { Condition: 'EqualsAny', Property: 'VideoProfile', @@ -1281,12 +1274,6 @@ export default function (options) { ]; const av1CodecProfileConditions = [ - { - Condition: 'NotEquals', - Property: 'IsAnamorphic', - Value: 'true', - IsRequired: false - }, { Condition: 'EqualsAny', Property: 'VideoProfile', @@ -1307,6 +1294,29 @@ export default function (options) { } ]; + if (!supportsAnamorphicVideo()) { + h264CodecProfileConditions.push({ + Condition: 'NotEquals', + Property: 'IsAnamorphic', + Value: 'true', + IsRequired: false + }); + + hevcCodecProfileConditions.push({ + Condition: 'NotEquals', + Property: 'IsAnamorphic', + Value: 'true', + IsRequired: false + }); + + av1CodecProfileConditions.push({ + Condition: 'NotEquals', + Property: 'IsAnamorphic', + Value: 'true', + IsRequired: false + }); + } + if (!browser.edgeUwp && !browser.tizen && !browser.web0s) { h264CodecProfileConditions.push({ Condition: 'NotEquals',