mirror of
https://github.com/jellyfin/jellyfin-media-player.git
synced 2025-02-19 21:41:19 +00:00
Add options to allow HEVC remuxing and force HDR transcoding.
This commit is contained in:
parent
dc8f16c58d
commit
373a5a8b74
@ -64,6 +64,32 @@ window.NativeShell = {
|
||||
};
|
||||
|
||||
function getDeviceProfile() {
|
||||
const CodecProfiles = [
|
||||
{
|
||||
'Type': 'Video',
|
||||
'Conditions': [
|
||||
{
|
||||
'Condition': 'NotEquals',
|
||||
'Property': 'VideoRangeType',
|
||||
'Value': 'DOVI'
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
if (viewdata.force_transcode_hdr) {
|
||||
CodecProfiles.push({
|
||||
'Type': 'Video',
|
||||
'Conditions': [
|
||||
{
|
||||
'Condition': 'Equals',
|
||||
'Property': 'VideoRangeType',
|
||||
'Value': 'SDR'
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
'Name': 'Jellyfin Media Player',
|
||||
'MaxStaticBitrate': 1000000000,
|
||||
@ -76,7 +102,9 @@ function getDeviceProfile() {
|
||||
'Type': 'Video',
|
||||
'Protocol': 'hls',
|
||||
'AudioCodec': 'aac,mp3,ac3,opus,flac,vorbis',
|
||||
'VideoCodec': 'h264,h265,hevc,mpeg4,mpeg2video',
|
||||
'VideoCodec': viewdata.allow_transcode_to_hevc
|
||||
? 'h264,h265,hevc,mpeg4,mpeg2video'
|
||||
: 'h264,mpeg4,mpeg2video',
|
||||
'MaxAudioChannels': '6'
|
||||
},
|
||||
{'Container': 'jpeg', 'Type': 'Photo'}
|
||||
@ -84,18 +112,7 @@ function getDeviceProfile() {
|
||||
'DirectPlayProfiles': [{'Type': 'Video'}, {'Type': 'Audio'}, {'Type': 'Photo'}],
|
||||
'ResponseProfiles': [],
|
||||
'ContainerProfiles': [],
|
||||
'CodecProfiles': [
|
||||
{
|
||||
'Type': 'Video',
|
||||
'Conditions': [
|
||||
{
|
||||
'Condition': 'NotEquals',
|
||||
'Property': 'VideoRangeType',
|
||||
'Value': 'DOVI'
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
CodecProfiles,
|
||||
'SubtitleProfiles': [
|
||||
{'Format': 'srt', 'Method': 'External'},
|
||||
{'Format': 'srt', 'Method': 'Embed'},
|
||||
|
@ -251,6 +251,14 @@
|
||||
"default": false,
|
||||
"platforms_excluded": "oe_rpi"
|
||||
},
|
||||
{
|
||||
"value": "allow_transcode_to_hevc",
|
||||
"default": false
|
||||
},
|
||||
{
|
||||
"value": "force_transcode_hdr",
|
||||
"default": false
|
||||
},
|
||||
{
|
||||
"value": "sync_mode",
|
||||
"default": "audio",
|
||||
|
@ -330,6 +330,8 @@ QString SystemComponent::getNativeShellScript()
|
||||
clientData.insert("deviceName", QJsonValue::fromVariant(SettingsComponent::Get().getClientName()));
|
||||
clientData.insert("scriptPath", QJsonValue::fromVariant("file:///" + path));
|
||||
clientData.insert("mode", QJsonValue::fromVariant(SettingsComponent::Get().value(SETTINGS_SECTION_MAIN, "layout").toString()));
|
||||
clientData.insert("allow_transcode_to_hevc", QJsonValue::fromVariant(SettingsComponent::Get().value(SETTINGS_SECTION_VIDEO, "allow_transcode_to_hevc").toBool()));
|
||||
clientData.insert("force_transcode_hdr", QJsonValue::fromVariant(SettingsComponent::Get().value(SETTINGS_SECTION_VIDEO, "force_transcode_hdr").toBool()));
|
||||
nativeshellString.replace("@@data@@", QJsonDocument(clientData).toJson(QJsonDocument::Compact).toBase64());
|
||||
return nativeshellString;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user