aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Configuration
diff options
context:
space:
mode:
authorDominik <git@secnd.me>2023-06-15 19:38:42 +0200
committerGitHub <noreply@github.com>2023-06-15 19:38:42 +0200
commit17f1e8d19b1fd693893d66d2275ed8ae2476344e (patch)
tree7f48be975faa92042769870957587b3c7864f631 /MediaBrowser.Model/Configuration
parente8ae7e5c38e28f13fa8de295e26c930cb46d9b79 (diff)
parent6771b5cabe96b4b3cbd1cd0c998d564f3dd17ed4 (diff)
Merge branch 'master' into segment-deletion
Diffstat (limited to 'MediaBrowser.Model/Configuration')
-rw-r--r--MediaBrowser.Model/Configuration/EncodingOptions.cs388
-rw-r--r--MediaBrowser.Model/Configuration/LibraryOptions.cs4
-rw-r--r--MediaBrowser.Model/Configuration/ServerConfiguration.cs22
3 files changed, 284 insertions, 130 deletions
diff --git a/MediaBrowser.Model/Configuration/EncodingOptions.cs b/MediaBrowser.Model/Configuration/EncodingOptions.cs
index 008050602..b5b6e86c8 100644
--- a/MediaBrowser.Model/Configuration/EncodingOptions.cs
+++ b/MediaBrowser.Model/Configuration/EncodingOptions.cs
@@ -1,134 +1,266 @@
#nullable disable
-#pragma warning disable CS1591
+using MediaBrowser.Model.Entities;
-namespace MediaBrowser.Model.Configuration
+namespace MediaBrowser.Model.Configuration;
+
+/// <summary>
+/// Class EncodingOptions.
+/// </summary>
+public class EncodingOptions
{
- public class EncodingOptions
+ /// <summary>
+ /// Initializes a new instance of the <see cref="EncodingOptions" /> class.
+ /// </summary>
+ public EncodingOptions()
{
- public EncodingOptions()
- {
- EnableFallbackFont = false;
- DownMixAudioBoost = 2;
- MaxMuxingQueueSize = 2048;
- EnableThrottling = false;
- EnableSegmentDeletion = false;
- ThrottleDelaySeconds = 180;
- SegmentKeepSeconds = 360;
- EncodingThreadCount = -1;
- // This is a DRM device that is almost guaranteed to be there on every intel platform,
- // plus it's the default one in ffmpeg if you don't specify anything
- VaapiDevice = "/dev/dri/renderD128";
- EnableTonemapping = false;
- EnableVppTonemapping = false;
- TonemappingAlgorithm = "bt2390";
- TonemappingRange = "auto";
- TonemappingDesat = 0;
- TonemappingThreshold = 0.8;
- TonemappingPeak = 100;
- TonemappingParam = 0;
- VppTonemappingBrightness = 0;
- VppTonemappingContrast = 1.2;
- H264Crf = 23;
- H265Crf = 28;
- DeinterlaceDoubleRate = false;
- DeinterlaceMethod = "yadif";
- EnableDecodingColorDepth10Hevc = true;
- EnableDecodingColorDepth10Vp9 = true;
- EnableEnhancedNvdecDecoder = false;
- PreferSystemNativeHwDecoder = true;
- EnableIntelLowPowerH264HwEncoder = false;
- EnableIntelLowPowerHevcHwEncoder = false;
- EnableHardwareEncoding = true;
- AllowHevcEncoding = false;
- EnableSubtitleExtraction = true;
- AllowOnDemandMetadataBasedKeyframeExtractionForExtensions = new[] { "mkv" };
- HardwareDecodingCodecs = new string[] { "h264", "vc1" };
- }
-
- public int EncodingThreadCount { get; set; }
-
- public string TranscodingTempPath { get; set; }
-
- public string FallbackFontPath { get; set; }
-
- public bool EnableFallbackFont { get; set; }
-
- public double DownMixAudioBoost { get; set; }
-
- public int MaxMuxingQueueSize { get; set; }
-
- public bool EnableThrottling { get; set; }
-
- public bool EnableSegmentDeletion { get; set; }
-
- public int ThrottleDelaySeconds { get; set; }
-
- public int SegmentKeepSeconds { get; set; }
-
- public string HardwareAccelerationType { get; set; }
-
- /// <summary>
- /// Gets or sets the FFmpeg path as set by the user via the UI.
- /// </summary>
- public string EncoderAppPath { get; set; }
-
- /// <summary>
- /// Gets or sets the current FFmpeg path being used by the system and displayed on the transcode page.
- /// </summary>
- public string EncoderAppPathDisplay { get; set; }
-
- public string VaapiDevice { get; set; }
-
- public bool EnableTonemapping { get; set; }
-
- public bool EnableVppTonemapping { get; set; }
-
- public string TonemappingAlgorithm { get; set; }
-
- public string TonemappingRange { get; set; }
-
- public double TonemappingDesat { get; set; }
-
- public double TonemappingThreshold { get; set; }
-
- public double TonemappingPeak { get; set; }
-
- public double TonemappingParam { get; set; }
-
- public double VppTonemappingBrightness { get; set; }
-
- public double VppTonemappingContrast { get; set; }
-
- public int H264Crf { get; set; }
-
- public int H265Crf { get; set; }
-
- public string EncoderPreset { get; set; }
-
- public bool DeinterlaceDoubleRate { get; set; }
-
- public string DeinterlaceMethod { get; set; }
-
- public bool EnableDecodingColorDepth10Hevc { get; set; }
-
- public bool EnableDecodingColorDepth10Vp9 { get; set; }
-
- public bool EnableEnhancedNvdecDecoder { get; set; }
-
- public bool PreferSystemNativeHwDecoder { get; set; }
-
- public bool EnableIntelLowPowerH264HwEncoder { get; set; }
-
- public bool EnableIntelLowPowerHevcHwEncoder { get; set; }
-
- public bool EnableHardwareEncoding { get; set; }
-
- public bool AllowHevcEncoding { get; set; }
-
- public bool EnableSubtitleExtraction { get; set; }
-
- public string[] HardwareDecodingCodecs { get; set; }
-
- public string[] AllowOnDemandMetadataBasedKeyframeExtractionForExtensions { get; set; }
+ EnableFallbackFont = false;
+ EnableAudioVbr = false;
+ DownMixAudioBoost = 2;
+ DownMixStereoAlgorithm = DownMixStereoAlgorithms.None;
+ MaxMuxingQueueSize = 2048;
+ EnableThrottling = false;
+ ThrottleDelaySeconds = 180;
+ EnableSegmentDeletion = false;
+ SegmentKeepSeconds = 360;
+ EncodingThreadCount = -1;
+ // This is a DRM device that is almost guaranteed to be there on every intel platform,
+ // plus it's the default one in ffmpeg if you don't specify anything
+ VaapiDevice = "/dev/dri/renderD128";
+ EnableTonemapping = false;
+ EnableVppTonemapping = false;
+ TonemappingAlgorithm = "bt2390";
+ TonemappingMode = "auto";
+ TonemappingRange = "auto";
+ TonemappingDesat = 0;
+ TonemappingPeak = 100;
+ TonemappingParam = 0;
+ VppTonemappingBrightness = 16;
+ VppTonemappingContrast = 1;
+ H264Crf = 23;
+ H265Crf = 28;
+ DeinterlaceDoubleRate = false;
+ DeinterlaceMethod = "yadif";
+ EnableDecodingColorDepth10Hevc = true;
+ EnableDecodingColorDepth10Vp9 = true;
+ // Enhanced Nvdec or system native decoder is required for DoVi to SDR tone-mapping.
+ EnableEnhancedNvdecDecoder = true;
+ PreferSystemNativeHwDecoder = true;
+ EnableIntelLowPowerH264HwEncoder = false;
+ EnableIntelLowPowerHevcHwEncoder = false;
+ EnableHardwareEncoding = true;
+ AllowHevcEncoding = false;
+ EnableSubtitleExtraction = true;
+ AllowOnDemandMetadataBasedKeyframeExtractionForExtensions = new[] { "mkv" };
+ HardwareDecodingCodecs = new string[] { "h264", "vc1" };
}
+
+ /// <summary>
+ /// Gets or sets the thread count used for encoding.
+ /// </summary>
+ public int EncodingThreadCount { get; set; }
+
+ /// <summary>
+ /// Gets or sets the temporary transcoding path.
+ /// </summary>
+ public string TranscodingTempPath { get; set; }
+
+ /// <summary>
+ /// Gets or sets the path to the fallback font.
+ /// </summary>
+ public string FallbackFontPath { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether to use the fallback font.
+ /// </summary>
+ public bool EnableFallbackFont { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether audio VBR is enabled.
+ /// </summary>
+ public bool EnableAudioVbr { get; set; }
+
+ /// <summary>
+ /// Gets or sets the audio boost applied when downmixing audio.
+ /// </summary>
+ public double DownMixAudioBoost { get; set; }
+
+ /// <summary>
+ /// Gets or sets the algorithm used for downmixing audio to stereo.
+ /// </summary>
+ public DownMixStereoAlgorithms DownMixStereoAlgorithm { get; set; }
+
+ /// <summary>
+ /// Gets or sets the maximum size of the muxing queue.
+ /// </summary>
+ public int MaxMuxingQueueSize { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether throttling is enabled.
+ /// </summary>
+ public bool EnableThrottling { get; set; }
+
+ /// <summary>
+ /// Gets or sets the delay after which throttling happens.
+ /// </summary>
+ public int ThrottleDelaySeconds { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether segment deletion is enabled.
+ /// </summary>
+ public bool EnableSegmentDeletion { get; set; }
+
+ /// <summary>
+ /// Gets or sets seconds for which segments should be kept before being deleted.
+ /// </summary>
+ public int SegmentKeepSeconds { get; set; }
+
+ /// <summary>
+ /// Gets or sets the hardware acceleration type.
+ /// </summary>
+ public string HardwareAccelerationType { get; set; }
+
+ /// <summary>
+ /// Gets or sets the FFmpeg path as set by the user via the UI.
+ /// </summary>
+ public string EncoderAppPath { get; set; }
+
+ /// <summary>
+ /// Gets or sets the current FFmpeg path being used by the system and displayed on the transcode page.
+ /// </summary>
+ public string EncoderAppPathDisplay { get; set; }
+
+ /// <summary>
+ /// Gets or sets the VA-API device.
+ /// </summary>
+ public string VaapiDevice { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether tonemapping is enabled.
+ /// </summary>
+ public bool EnableTonemapping { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether VPP tonemapping is enabled.
+ /// </summary>
+ public bool EnableVppTonemapping { get; set; }
+
+ /// <summary>
+ /// Gets or sets the tone-mapping algorithm.
+ /// </summary>
+ public string TonemappingAlgorithm { get; set; }
+
+ /// <summary>
+ /// Gets or sets the tone-mapping mode.
+ /// </summary>
+ public string TonemappingMode { get; set; }
+
+ /// <summary>
+ /// Gets or sets the tone-mapping range.
+ /// </summary>
+ public string TonemappingRange { get; set; }
+
+ /// <summary>
+ /// Gets or sets the tone-mapping desaturation.
+ /// </summary>
+ public double TonemappingDesat { get; set; }
+
+ /// <summary>
+ /// Gets or sets the tone-mapping peak.
+ /// </summary>
+ public double TonemappingPeak { get; set; }
+
+ /// <summary>
+ /// Gets or sets the tone-mapping parameters.
+ /// </summary>
+ public double TonemappingParam { get; set; }
+
+ /// <summary>
+ /// Gets or sets the VPP tone-mapping brightness.
+ /// </summary>
+ public double VppTonemappingBrightness { get; set; }
+
+ /// <summary>
+ /// Gets or sets the VPP tone-mapping contrast.
+ /// </summary>
+ public double VppTonemappingContrast { get; set; }
+
+ /// <summary>
+ /// Gets or sets the H264 CRF.
+ /// </summary>
+ public int H264Crf { get; set; }
+
+ /// <summary>
+ /// Gets or sets the H265 CRF.
+ /// </summary>
+ public int H265Crf { get; set; }
+
+ /// <summary>
+ /// Gets or sets the encoder preset.
+ /// </summary>
+ public string EncoderPreset { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether the framerate is doubled when deinterlacing.
+ /// </summary>
+ public bool DeinterlaceDoubleRate { get; set; }
+
+ /// <summary>
+ /// Gets or sets the deinterlace method.
+ /// </summary>
+ public string DeinterlaceMethod { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether 10bit HEVC decoding is enabled.
+ /// </summary>
+ public bool EnableDecodingColorDepth10Hevc { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether 10bit VP9 decoding is enabled.
+ /// </summary>
+ public bool EnableDecodingColorDepth10Vp9 { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether the enhanced NVDEC is enabled.
+ /// </summary>
+ public bool EnableEnhancedNvdecDecoder { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether the system native hardware decoder should be used.
+ /// </summary>
+ public bool PreferSystemNativeHwDecoder { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether the Intel H264 low-power hardware encoder should be used.
+ /// </summary>
+ public bool EnableIntelLowPowerH264HwEncoder { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether the Intel HEVC low-power hardware encoder should be used.
+ /// </summary>
+ public bool EnableIntelLowPowerHevcHwEncoder { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether hardware encoding is enabled.
+ /// </summary>
+ public bool EnableHardwareEncoding { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether HEVC encoding is enabled.
+ /// </summary>
+ public bool AllowHevcEncoding { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether subtitle extraction is enabled.
+ /// </summary>
+ public bool EnableSubtitleExtraction { get; set; }
+
+ /// <summary>
+ /// Gets or sets the codecs hardware encoding is used for.
+ /// </summary>
+ public string[] HardwareDecodingCodecs { get; set; }
+
+ /// <summary>
+ /// Gets or sets the file extensions on-demand metadata based keyframe extraction is enabled for.
+ /// </summary>
+ public string[] AllowOnDemandMetadataBasedKeyframeExtractionForExtensions { get; set; }
}
diff --git a/MediaBrowser.Model/Configuration/LibraryOptions.cs b/MediaBrowser.Model/Configuration/LibraryOptions.cs
index c4d313bdb..df6829946 100644
--- a/MediaBrowser.Model/Configuration/LibraryOptions.cs
+++ b/MediaBrowser.Model/Configuration/LibraryOptions.cs
@@ -30,6 +30,8 @@ namespace MediaBrowser.Model.Configuration
public bool EnableRealtimeMonitor { get; set; }
+ public bool EnableLUFSScan { get; set; }
+
public bool EnableChapterImageExtraction { get; set; }
public bool ExtractChapterImagesDuringLibraryScan { get; set; }
@@ -45,6 +47,8 @@ namespace MediaBrowser.Model.Configuration
public bool EnableEmbeddedTitles { get; set; }
+ public bool EnableEmbeddedExtrasTitles { get; set; }
+
public bool EnableEmbeddedEpisodeInfos { get; set; }
public int AutomaticRefreshIntervalDays { get; set; }
diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
index e61b896b9..07f02d187 100644
--- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs
+++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
@@ -2,7 +2,7 @@
#pragma warning disable CA1819
using System;
-using System.Collections.Generic;
+using MediaBrowser.Model.Drawing;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Updates;
@@ -193,7 +193,7 @@ namespace MediaBrowser.Model.Configuration
public string[] CodecsUsed { get; set; } = Array.Empty<string>();
- public List<RepositoryInfo> PluginRepositories { get; set; } = new List<RepositoryInfo>();
+ public RepositoryInfo[] PluginRepositories { get; set; } = Array.Empty<RepositoryInfo>();
public bool EnableExternalContentInSuggestions { get; set; } = true;
@@ -240,5 +240,23 @@ namespace MediaBrowser.Model.Configuration
/// Gets or sets a value indicating whether clients should be allowed to upload logs.
/// </summary>
public bool AllowClientLogUpload { get; set; } = true;
+
+ /// <summary>
+ /// Gets or sets the dummy chapter duration in seconds, use 0 (zero) or less to disable generation alltogether.
+ /// </summary>
+ /// <value>The dummy chapters duration.</value>
+ public int DummyChapterDuration { get; set; } = 0;
+
+ /// <summary>
+ /// Gets or sets the chapter image resolution.
+ /// </summary>
+ /// <value>The chapter image resolution.</value>
+ public ImageResolution ChapterImageResolution { get; set; } = ImageResolution.MatchSource;
+
+ /// <summary>
+ /// Gets or sets the limit for parallel image encoding.
+ /// </summary>
+ /// <value>The limit for parallel image encoding.</value>
+ public int ParallelImageEncodingLimit { get; set; } = 0;
}
}