mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #5625 from FintasticMan/add_prefer_transcode_video
Add setting for preferred video codec
This commit is contained in:
commit
e0be16b272
5 changed files with 41 additions and 0 deletions
|
@ -70,6 +70,21 @@ function getDeviceProfile(item) {
|
|||
});
|
||||
}
|
||||
|
||||
const preferredTranscodeVideoCodec = appSettings.preferredTranscodeVideoCodec();
|
||||
if (preferredTranscodeVideoCodec) {
|
||||
profile.TranscodingProfiles.forEach((transcodingProfile) => {
|
||||
if (transcodingProfile.Type === 'Video') {
|
||||
const videoCodecs = transcodingProfile.VideoCodec.split(',');
|
||||
const index = videoCodecs.indexOf(preferredTranscodeVideoCodec);
|
||||
if (index !== -1) {
|
||||
videoCodecs.splice(index, 1);
|
||||
videoCodecs.unshift(preferredTranscodeVideoCodec);
|
||||
transcodingProfile.VideoCodec = videoCodecs.join(',');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const preferredTranscodeVideoAudioCodec = appSettings.preferredTranscodeVideoAudioCodec();
|
||||
if (preferredTranscodeVideoAudioCodec) {
|
||||
profile.TranscodingProfiles.forEach((transcodingProfile) => {
|
||||
|
|
|
@ -182,6 +182,7 @@ function loadForm(context, user, userSettings, systemInfo, apiClient) {
|
|||
context.querySelector('.chkRememberSubtitleSelections').checked = user.Configuration.RememberSubtitleSelections || false;
|
||||
context.querySelector('.chkExternalVideoPlayer').checked = appSettings.enableSystemExternalPlayers();
|
||||
context.querySelector('.chkLimitSupportedVideoResolution').checked = appSettings.limitSupportedVideoResolution();
|
||||
context.querySelector('#selectPreferredTranscodeVideoCodec').value = appSettings.preferredTranscodeVideoCodec();
|
||||
context.querySelector('#selectPreferredTranscodeVideoAudioCodec').value = appSettings.preferredTranscodeVideoAudioCodec();
|
||||
|
||||
setMaxBitrateIntoField(context.querySelector('.selectVideoInNetworkQuality'), true, 'Video');
|
||||
|
@ -218,6 +219,7 @@ function saveUser(context, user, userSettingsInstance, apiClient) {
|
|||
appSettings.maxChromecastBitrate(context.querySelector('.selectChromecastVideoQuality').value);
|
||||
appSettings.maxVideoWidth(context.querySelector('.selectMaxVideoWidth').value);
|
||||
appSettings.limitSupportedVideoResolution(context.querySelector('.chkLimitSupportedVideoResolution').checked);
|
||||
appSettings.preferredTranscodeVideoCodec(context.querySelector('#selectPreferredTranscodeVideoCodec').value);
|
||||
appSettings.preferredTranscodeVideoAudioCodec(context.querySelector('#selectPreferredTranscodeVideoAudioCodec').value);
|
||||
|
||||
appSettings.enableDts(context.querySelector('.chkEnableDts').checked);
|
||||
|
|
|
@ -180,6 +180,16 @@
|
|||
<div class="fieldDescription checkboxFieldDescription">${EnableTrueHdHelp}</div>
|
||||
</div>
|
||||
|
||||
<div class="selectContainer">
|
||||
<select is="emby-select" id="selectPreferredTranscodeVideoCodec" label="${LabelSelectPreferredTranscodeVideoCodec}">
|
||||
<option value="">${Auto}</option>
|
||||
<option value="h264">H264</option>
|
||||
<option value="hevc">HEVC</option>
|
||||
<option value="av1">AV1</option>
|
||||
</select>
|
||||
<div class="fieldDescription">${SelectPreferredTranscodeVideoCodecHelp}</div>
|
||||
</div>
|
||||
|
||||
<div class="selectContainer">
|
||||
<select is="emby-select" id="selectPreferredTranscodeVideoAudioCodec" label="${LabelSelectPreferredTranscodeVideoAudioCodec}">
|
||||
<option value="">${Auto}</option>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue