mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Backport pull request #5452 from jellyfin-web/release-10.9.z
Limit maximum FLAC audio channels in video to 2 on webOS
Original-merge: 9d9b69edd5
Merged-by: thornbill <thornbill@users.noreply.github.com>
Backported-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
parent
d324461250
commit
6e32ea052d
1 changed files with 42 additions and 0 deletions
|
@ -883,6 +883,48 @@ export default function (options) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (browser.web0s) {
|
||||||
|
const flacConditions = [
|
||||||
|
// webOS doesn't seem to support FLAC with more than 2 channels
|
||||||
|
{
|
||||||
|
Condition: 'LessThanEqual',
|
||||||
|
Property: 'AudioChannels',
|
||||||
|
Value: '2',
|
||||||
|
IsRequired: false
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
profile.CodecProfiles.push({
|
||||||
|
Type: 'VideoAudio',
|
||||||
|
Codec: 'flac',
|
||||||
|
Conditions: flacConditions
|
||||||
|
});
|
||||||
|
|
||||||
|
const flacTranscodingProfiles = [];
|
||||||
|
|
||||||
|
// Split each video transcoding profile with FLAC so that the containing FLAC is only applied to 2 channels audio
|
||||||
|
profile.TranscodingProfiles.forEach(transcodingProfile => {
|
||||||
|
if (transcodingProfile.Type !== 'Video') return;
|
||||||
|
|
||||||
|
const audioCodecs = transcodingProfile.AudioCodec.split(',');
|
||||||
|
|
||||||
|
if (!audioCodecs.includes('flac')) return;
|
||||||
|
|
||||||
|
const flacTranscodingProfile = { ...transcodingProfile };
|
||||||
|
flacTranscodingProfile.AudioCodec = 'flac';
|
||||||
|
flacTranscodingProfile.ApplyConditions = [
|
||||||
|
...flacTranscodingProfile.ApplyConditions || [],
|
||||||
|
...flacConditions
|
||||||
|
];
|
||||||
|
|
||||||
|
flacTranscodingProfiles.push(flacTranscodingProfile);
|
||||||
|
|
||||||
|
transcodingProfile.AudioCodec = audioCodecs.filter(codec => codec != 'flac').join(',');
|
||||||
|
});
|
||||||
|
|
||||||
|
profile.TranscodingProfiles.push(...flacTranscodingProfiles);
|
||||||
|
}
|
||||||
|
|
||||||
let maxH264Level = 42;
|
let maxH264Level = 42;
|
||||||
let h264Profiles = 'high|main|baseline|constrained baseline';
|
let h264Profiles = 'high|main|baseline|constrained baseline';
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue