mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add h264 codec profile for TS container
This commit is contained in:
parent
6bcb01d477
commit
fbe81273e8
1 changed files with 50 additions and 27 deletions
|
@ -707,10 +707,7 @@ define(['browser'], function (browser) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
profile.CodecProfiles.push({
|
const h264CodecProfileConditions = [
|
||||||
Type: 'Video',
|
|
||||||
Codec: 'h264',
|
|
||||||
Conditions: [
|
|
||||||
{
|
{
|
||||||
Condition: 'NotEquals',
|
Condition: 'NotEquals',
|
||||||
Property: 'IsAnamorphic',
|
Property: 'IsAnamorphic',
|
||||||
|
@ -729,11 +726,10 @@ define(['browser'], function (browser) {
|
||||||
Value: maxH264Level.toString(),
|
Value: maxH264Level.toString(),
|
||||||
IsRequired: false
|
IsRequired: false
|
||||||
}
|
}
|
||||||
]
|
];
|
||||||
});
|
|
||||||
|
|
||||||
if (!browser.edgeUwp && !browser.tizen && !browser.web0s) {
|
if (!browser.edgeUwp && !browser.tizen && !browser.web0s) {
|
||||||
profile.CodecProfiles[profile.CodecProfiles.length - 1].Conditions.push({
|
h264CodecProfileConditions.push({
|
||||||
Condition: 'NotEquals',
|
Condition: 'NotEquals',
|
||||||
Property: 'IsInterlaced',
|
Property: 'IsInterlaced',
|
||||||
Value: 'true',
|
Value: 'true',
|
||||||
|
@ -742,7 +738,7 @@ define(['browser'], function (browser) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (maxVideoWidth) {
|
if (maxVideoWidth) {
|
||||||
profile.CodecProfiles[profile.CodecProfiles.length - 1].Conditions.push({
|
h264CodecProfileConditions.push({
|
||||||
Condition: 'LessThanEqual',
|
Condition: 'LessThanEqual',
|
||||||
Property: 'Width',
|
Property: 'Width',
|
||||||
Value: maxVideoWidth.toString(),
|
Value: maxVideoWidth.toString(),
|
||||||
|
@ -755,7 +751,7 @@ define(['browser'], function (browser) {
|
||||||
var h264MaxVideoBitrate = globalMaxVideoBitrate;
|
var h264MaxVideoBitrate = globalMaxVideoBitrate;
|
||||||
|
|
||||||
if (h264MaxVideoBitrate) {
|
if (h264MaxVideoBitrate) {
|
||||||
profile.CodecProfiles[profile.CodecProfiles.length - 1].Conditions.push({
|
h264CodecProfileConditions.push({
|
||||||
Condition: 'LessThanEqual',
|
Condition: 'LessThanEqual',
|
||||||
Property: 'VideoBitrate',
|
Property: 'VideoBitrate',
|
||||||
Value: h264MaxVideoBitrate,
|
Value: h264MaxVideoBitrate,
|
||||||
|
@ -763,6 +759,33 @@ define(['browser'], function (browser) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// On iOS 12.x, for TS container max h264 level is 4.2
|
||||||
|
if (browser.iOS && browser.iOSVersion < 13) {
|
||||||
|
const codecProfile = {
|
||||||
|
Type: 'Video',
|
||||||
|
Codec: 'h264',
|
||||||
|
Container: 'ts',
|
||||||
|
Conditions: h264CodecProfileConditions.filter((condition) => {
|
||||||
|
return condition.Property !== 'VideoLevel';
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
codecProfile.Conditions.push({
|
||||||
|
Condition: 'LessThanEqual',
|
||||||
|
Property: 'VideoLevel',
|
||||||
|
Value: '42',
|
||||||
|
IsRequired: false
|
||||||
|
});
|
||||||
|
|
||||||
|
profile.CodecProfiles.push(codecProfile);
|
||||||
|
}
|
||||||
|
|
||||||
|
profile.CodecProfiles.push({
|
||||||
|
Type: 'Video',
|
||||||
|
Codec: 'h264',
|
||||||
|
Conditions: h264CodecProfileConditions
|
||||||
|
});
|
||||||
|
|
||||||
var globalVideoConditions = [];
|
var globalVideoConditions = [];
|
||||||
|
|
||||||
if (globalMaxVideoBitrate) {
|
if (globalMaxVideoBitrate) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue