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.
This commit is contained in:
Martin Kinkelin
2025-11-10 16:29:31 +01:00
parent 1295d5592e
commit 08f8b2d2f7

View File

@@ -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',