From f28db6699d6595944567139bb5d27d1647bb8550 Mon Sep 17 00:00:00 2001 From: nyanmisaka Date: Fri, 14 Apr 2023 18:50:24 +0800 Subject: [PATCH 1/2] Add tonemap mode options Signed-off-by: nyanmisaka --- src/controllers/dashboard/encodingsettings.html | 12 ++++++++---- src/controllers/dashboard/encodingsettings.js | 4 ++-- src/strings/en-us.json | 4 +++- src/strings/zh-cn.json | 4 +++- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/controllers/dashboard/encodingsettings.html b/src/controllers/dashboard/encodingsettings.html index b6faf13149..bf678e71a4 100644 --- a/src/controllers/dashboard/encodingsettings.html +++ b/src/controllers/dashboard/encodingsettings.html @@ -166,6 +166,14 @@ ${TonemappingAlgorithmHelp} +
+ +
${TonemappingModeHelp}
+
${LabelTonemappingDesatHelp}
-
- -
${LabelTonemappingThresholdHelp}
-
${LabelTonemappingPeakHelp}
diff --git a/src/controllers/dashboard/encodingsettings.js b/src/controllers/dashboard/encodingsettings.js index e1ff452073..f24f3fecb4 100644 --- a/src/controllers/dashboard/encodingsettings.js +++ b/src/controllers/dashboard/encodingsettings.js @@ -32,9 +32,9 @@ import alert from '../../components/alert'; page.querySelector('#chkTonemapping').checked = config.EnableTonemapping; page.querySelector('#chkVppTonemapping').checked = config.EnableVppTonemapping; page.querySelector('#selectTonemappingAlgorithm').value = config.TonemappingAlgorithm; + page.querySelector('#selectTonemappingMode').value = config.TonemappingMode; page.querySelector('#selectTonemappingRange').value = config.TonemappingRange; page.querySelector('#txtTonemappingDesat').value = config.TonemappingDesat; - page.querySelector('#txtTonemappingThreshold').value = config.TonemappingThreshold; page.querySelector('#txtTonemappingPeak').value = config.TonemappingPeak; page.querySelector('#txtTonemappingParam').value = config.TonemappingParam || ''; page.querySelector('#txtVppTonemappingBrightness').value = config.VppTonemappingBrightness; @@ -88,9 +88,9 @@ import alert from '../../components/alert'; config.EnableTonemapping = form.querySelector('#chkTonemapping').checked; config.EnableVppTonemapping = form.querySelector('#chkVppTonemapping').checked; config.TonemappingAlgorithm = form.querySelector('#selectTonemappingAlgorithm').value; + config.TonemappingMode = form.querySelector('#selectTonemappingMode').value; config.TonemappingRange = form.querySelector('#selectTonemappingRange').value; config.TonemappingDesat = form.querySelector('#txtTonemappingDesat').value; - config.TonemappingThreshold = form.querySelector('#txtTonemappingThreshold').value; config.TonemappingPeak = form.querySelector('#txtTonemappingPeak').value; config.TonemappingParam = form.querySelector('#txtTonemappingParam').value || '0'; config.VppTonemappingBrightness = form.querySelector('#txtVppTonemappingBrightness').value; diff --git a/src/strings/en-us.json b/src/strings/en-us.json index 6afa62dafd..230b6d8744 100644 --- a/src/strings/en-us.json +++ b/src/strings/en-us.json @@ -1663,5 +1663,7 @@ "MediaInfoRpuPresentFlag": "DV rpu preset flag", "MediaInfoElPresentFlag": "DV el preset flag", "MediaInfoBlPresentFlag": "DV bl preset flag", - "MediaInfoDvBlSignalCompatibilityId": "DV bl signal compatibility id" + "MediaInfoDvBlSignalCompatibilityId": "DV bl signal compatibility id", + "LabelTonemappingMode": "Tone mapping mode:", + "TonemappingModeHelp": "Select the tone mapping mode. If you experience blown out highlights try switching to the RGB mode." } diff --git a/src/strings/zh-cn.json b/src/strings/zh-cn.json index 92115ae7b8..9ceeae66fe 100644 --- a/src/strings/zh-cn.json +++ b/src/strings/zh-cn.json @@ -1648,5 +1648,7 @@ "StoryArc": "故事线", "OriginalAirDate": "原始播出日期", "Digital": "数字的", - "MessageUnauthorizedUser": "您目前无权访问服务器。请联系您的服务器管理员以获取更多信息。" + "MessageUnauthorizedUser": "您目前无权访问服务器。请联系您的服务器管理员以获取更多信息。", + "LabelTonemappingMode": "色调映射模式:", + "TonemappingModeHelp": "如果您遇到高光过曝问题,请尝试切换到 RGB 模式。" } From f942072e53632a21968bb35e3ac4832bcdd16e90 Mon Sep 17 00:00:00 2001 From: nyanmisaka Date: Fri, 14 Apr 2023 18:55:08 +0800 Subject: [PATCH 2/2] Update translations for tonemapping Signed-off-by: nyanmisaka --- src/strings/en-us.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/strings/en-us.json b/src/strings/en-us.json index 230b6d8744..1f1d158a17 100644 --- a/src/strings/en-us.json +++ b/src/strings/en-us.json @@ -32,7 +32,7 @@ "AllowOnTheFlySubtitleExtractionHelp": "Embedded subtitles can be extracted from videos and delivered to clients in plain text, in order to help prevent video transcoding. On some systems this can take a long time and cause video playback to stall during the extraction process. Disable this to have embedded subtitles burned in with video transcoding when they are not natively supported by the client device.", "AllowRemoteAccess": "Allow remote connections to this server", "AllowRemoteAccessHelp": "If unchecked, all remote connections will be blocked.", - "AllowTonemappingHelp": "Tone-mapping can transform the dynamic range of a video from HDR to SDR while maintaining image details and colors, which are very important information for representing the original scene. Currently works only with HDR10 or HLG videos. This requires the corresponding OpenCL or CUDA runtime.", + "AllowTonemappingHelp": "Tone-mapping can transform the dynamic range of a video from HDR to SDR while maintaining image details and colors, which are very important information for representing the original scene. Currently works only with 10bit HDR10,HLG and DoVi videos. This requires the corresponding OpenCL or CUDA runtime.", "AlwaysPlaySubtitles": "Always Play", "AlwaysPlaySubtitlesHelp": "Subtitles matching the language preference will be loaded regardless of the audio language.", "AnyLanguage": "Any Language", @@ -1649,9 +1649,9 @@ "ThemeVideo": "Theme Video", "EnableSplashScreen": "Enable the splash screen", "LabelVppTonemappingBrightness": "VPP Tone mapping brightness gain:", - "LabelVppTonemappingBrightnessHelp": "Apply brightness gain in VPP tone mapping. Both recommended and default values are 0.", + "LabelVppTonemappingBrightnessHelp": "Apply brightness gain in VPP tone mapping. The recommended and default values are 16 and 0.", "LabelVppTonemappingContrast": "VPP Tone mapping contrast gain:", - "LabelVppTonemappingContrastHelp": "Apply contrast gain in VPP tone mapping. The recommended and default values are 1.2 and 1.", + "LabelVppTonemappingContrastHelp": "Apply contrast gain in VPP tone mapping. Both recommended and default values are 1.", "VideoRangeTypeNotSupported": "The video's range type is not supported", "LabelVideoRangeType": "Video range type:", "MediaInfoVideoRangeType": "Video range type",