mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Merge branch 'master' into network-rewrite
This commit is contained in:
commit
67a58df1a3
6
.github/workflows/codeql-analysis.yml
vendored
6
.github/workflows/codeql-analysis.yml
vendored
@ -27,11 +27,11 @@ jobs:
|
|||||||
dotnet-version: '7.0.x'
|
dotnet-version: '7.0.x'
|
||||||
|
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@83f0fe6c4988d98a455712a27f0255212bba9bd4 # v2.3.6
|
uses: github/codeql-action/init@6c089f53dd51dc3fc7e599c3cb5356453a52ca9e # v2.20.0
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
queries: +security-extended
|
queries: +security-extended
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@83f0fe6c4988d98a455712a27f0255212bba9bd4 # v2.3.6
|
uses: github/codeql-action/autobuild@6c089f53dd51dc3fc7e599c3cb5356453a52ca9e # v2.20.0
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@83f0fe6c4988d98a455712a27f0255212bba9bd4 # v2.3.6
|
uses: github/codeql-action/analyze@6c089f53dd51dc3fc7e599c3cb5356453a52ca9e # v2.20.0
|
||||||
|
4
.github/workflows/openapi.yml
vendored
4
.github/workflows/openapi.yml
vendored
@ -45,10 +45,12 @@ jobs:
|
|||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Checkout common ancestor
|
- name: Checkout common ancestor
|
||||||
|
env:
|
||||||
|
HEAD_REF: ${{ github.head_ref }}
|
||||||
run: |
|
run: |
|
||||||
git remote add upstream https://github.com/${{ github.event.pull_request.base.repo.full_name }}
|
git remote add upstream https://github.com/${{ github.event.pull_request.base.repo.full_name }}
|
||||||
git -c protocol.version=2 fetch --prune --progress --no-recurse-submodules upstream +refs/heads/*:refs/remotes/upstream/* +refs/tags/*:refs/tags/*
|
git -c protocol.version=2 fetch --prune --progress --no-recurse-submodules upstream +refs/heads/*:refs/remotes/upstream/* +refs/tags/*:refs/tags/*
|
||||||
ANCESTOR_REF=$(git merge-base upstream/${{ github.base_ref }} origin/${{ github.head_ref }})
|
ANCESTOR_REF=$(git merge-base upstream/${{ github.base_ref }} origin/$HEAD_REF)
|
||||||
git checkout --progress --force $ANCESTOR_REF
|
git checkout --progress --force $ANCESTOR_REF
|
||||||
- name: Setup .NET
|
- name: Setup .NET
|
||||||
uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3.2.0
|
uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3.2.0
|
||||||
|
@ -23,14 +23,14 @@
|
|||||||
<PackageVersion Include="libse" Version="3.6.13" />
|
<PackageVersion Include="libse" Version="3.6.13" />
|
||||||
<PackageVersion Include="LrcParser" Version="2023.524.0" />
|
<PackageVersion Include="LrcParser" Version="2023.524.0" />
|
||||||
<PackageVersion Include="MetaBrainz.MusicBrainz" Version="5.0.0" />
|
<PackageVersion Include="MetaBrainz.MusicBrainz" Version="5.0.0" />
|
||||||
<PackageVersion Include="Microsoft.AspNetCore.Authorization" Version="7.0.5" />
|
<PackageVersion Include="Microsoft.AspNetCore.Authorization" Version="7.0.7" />
|
||||||
<PackageVersion Include="Microsoft.AspNetCore.HttpOverrides" Version="2.2.0" />
|
<PackageVersion Include="Microsoft.AspNetCore.HttpOverrides" Version="2.2.0" />
|
||||||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.5" />
|
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.7" />
|
||||||
<PackageVersion Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="3.3.4" />
|
<PackageVersion Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="3.3.4" />
|
||||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.5" />
|
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.7" />
|
||||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="7.0.5" />
|
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="7.0.7" />
|
||||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.5" />
|
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.7" />
|
||||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.5" />
|
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.7" />
|
||||||
<PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="7.0.0" />
|
<PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="7.0.0" />
|
||||||
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
|
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
|
||||||
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="7.0.0" />
|
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="7.0.0" />
|
||||||
@ -39,11 +39,11 @@
|
|||||||
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
|
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
|
||||||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
|
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
|
||||||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
|
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
|
||||||
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="7.0.5" />
|
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="7.0.7" />
|
||||||
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="7.0.5" />
|
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="7.0.7" />
|
||||||
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="7.0.0" />
|
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="7.0.0" />
|
||||||
<PackageVersion Include="Microsoft.Extensions.Http" Version="7.0.0" />
|
<PackageVersion Include="Microsoft.Extensions.Http" Version="7.0.0" />
|
||||||
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0" />
|
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
|
||||||
<PackageVersion Include="Microsoft.Extensions.Logging" Version="7.0.0" />
|
<PackageVersion Include="Microsoft.Extensions.Logging" Version="7.0.0" />
|
||||||
<PackageVersion Include="Microsoft.Extensions.Options" Version="7.0.1" />
|
<PackageVersion Include="Microsoft.Extensions.Options" Version="7.0.1" />
|
||||||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
|
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
|
||||||
@ -63,7 +63,7 @@
|
|||||||
<PackageVersion Include="Serilog.Sinks.Async" Version="1.5.0" />
|
<PackageVersion Include="Serilog.Sinks.Async" Version="1.5.0" />
|
||||||
<PackageVersion Include="Serilog.Sinks.Console" Version="4.1.0" />
|
<PackageVersion Include="Serilog.Sinks.Console" Version="4.1.0" />
|
||||||
<PackageVersion Include="Serilog.Sinks.File" Version="5.0.0" />
|
<PackageVersion Include="Serilog.Sinks.File" Version="5.0.0" />
|
||||||
<PackageVersion Include="Serilog.Sinks.Graylog" Version="3.0.0" />
|
<PackageVersion Include="Serilog.Sinks.Graylog" Version="3.0.1" />
|
||||||
<PackageVersion Include="SerilogAnalyzer" Version="0.15.0" />
|
<PackageVersion Include="SerilogAnalyzer" Version="0.15.0" />
|
||||||
<PackageVersion Include="SharpFuzz" Version="2.0.2" />
|
<PackageVersion Include="SharpFuzz" Version="2.0.2" />
|
||||||
<PackageVersion Include="SkiaSharp.NativeAssets.Linux" Version="2.88.3" />
|
<PackageVersion Include="SkiaSharp.NativeAssets.Linux" Version="2.88.3" />
|
||||||
@ -78,7 +78,7 @@
|
|||||||
<PackageVersion Include="System.Globalization" Version="4.3.0" />
|
<PackageVersion Include="System.Globalization" Version="4.3.0" />
|
||||||
<PackageVersion Include="System.Linq.Async" Version="6.0.1" />
|
<PackageVersion Include="System.Linq.Async" Version="6.0.1" />
|
||||||
<PackageVersion Include="System.Text.Encoding.CodePages" Version="7.0.0" />
|
<PackageVersion Include="System.Text.Encoding.CodePages" Version="7.0.0" />
|
||||||
<PackageVersion Include="System.Text.Json" Version="7.0.2" />
|
<PackageVersion Include="System.Text.Json" Version="7.0.3" />
|
||||||
<PackageVersion Include="System.Threading.Tasks.Dataflow" Version="7.0.0" />
|
<PackageVersion Include="System.Threading.Tasks.Dataflow" Version="7.0.0" />
|
||||||
<PackageVersion Include="TagLibSharp" Version="2.3.0" />
|
<PackageVersion Include="TagLibSharp" Version="2.3.0" />
|
||||||
<PackageVersion Include="TMDbLib" Version="2.0.0" />
|
<PackageVersion Include="TMDbLib" Version="2.0.0" />
|
||||||
|
@ -12,6 +12,7 @@ using System.Threading.Tasks;
|
|||||||
using Jellyfin.Data.Entities;
|
using Jellyfin.Data.Entities;
|
||||||
using Jellyfin.Data.Events;
|
using Jellyfin.Data.Events;
|
||||||
using MediaBrowser.Controller.Channels;
|
using MediaBrowser.Controller.Channels;
|
||||||
|
using MediaBrowser.Controller.Configuration;
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Controller.Entities.Audio;
|
using MediaBrowser.Controller.Entities.Audio;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
@ -26,12 +27,8 @@ namespace Emby.Server.Implementations.EntryPoints
|
|||||||
{
|
{
|
||||||
public class LibraryChangedNotifier : IServerEntryPoint
|
public class LibraryChangedNotifier : IServerEntryPoint
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// The library update duration.
|
|
||||||
/// </summary>
|
|
||||||
private const int LibraryUpdateDuration = 30000;
|
|
||||||
|
|
||||||
private readonly ILibraryManager _libraryManager;
|
private readonly ILibraryManager _libraryManager;
|
||||||
|
private readonly IServerConfigurationManager _configurationManager;
|
||||||
private readonly IProviderManager _providerManager;
|
private readonly IProviderManager _providerManager;
|
||||||
private readonly ISessionManager _sessionManager;
|
private readonly ISessionManager _sessionManager;
|
||||||
private readonly IUserManager _userManager;
|
private readonly IUserManager _userManager;
|
||||||
@ -51,12 +48,14 @@ namespace Emby.Server.Implementations.EntryPoints
|
|||||||
|
|
||||||
public LibraryChangedNotifier(
|
public LibraryChangedNotifier(
|
||||||
ILibraryManager libraryManager,
|
ILibraryManager libraryManager,
|
||||||
|
IServerConfigurationManager configurationManager,
|
||||||
ISessionManager sessionManager,
|
ISessionManager sessionManager,
|
||||||
IUserManager userManager,
|
IUserManager userManager,
|
||||||
ILogger<LibraryChangedNotifier> logger,
|
ILogger<LibraryChangedNotifier> logger,
|
||||||
IProviderManager providerManager)
|
IProviderManager providerManager)
|
||||||
{
|
{
|
||||||
_libraryManager = libraryManager;
|
_libraryManager = libraryManager;
|
||||||
|
_configurationManager = configurationManager;
|
||||||
_sessionManager = sessionManager;
|
_sessionManager = sessionManager;
|
||||||
_userManager = userManager;
|
_userManager = userManager;
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
@ -196,12 +195,12 @@ namespace Emby.Server.Implementations.EntryPoints
|
|||||||
LibraryUpdateTimer = new Timer(
|
LibraryUpdateTimer = new Timer(
|
||||||
LibraryUpdateTimerCallback,
|
LibraryUpdateTimerCallback,
|
||||||
null,
|
null,
|
||||||
LibraryUpdateDuration,
|
TimeSpan.FromSeconds(_configurationManager.Configuration.LibraryUpdateDuration),
|
||||||
Timeout.Infinite);
|
Timeout.InfiniteTimeSpan);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LibraryUpdateTimer.Change(LibraryUpdateDuration, Timeout.Infinite);
|
LibraryUpdateTimer.Change(TimeSpan.FromSeconds(_configurationManager.Configuration.LibraryUpdateDuration), Timeout.InfiniteTimeSpan);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.Item.GetParent() is Folder parent)
|
if (e.Item.GetParent() is Folder parent)
|
||||||
@ -229,11 +228,11 @@ namespace Emby.Server.Implementations.EntryPoints
|
|||||||
{
|
{
|
||||||
if (LibraryUpdateTimer is null)
|
if (LibraryUpdateTimer is null)
|
||||||
{
|
{
|
||||||
LibraryUpdateTimer = new Timer(LibraryUpdateTimerCallback, null, LibraryUpdateDuration, Timeout.Infinite);
|
LibraryUpdateTimer = new Timer(LibraryUpdateTimerCallback, null, TimeSpan.FromSeconds(_configurationManager.Configuration.LibraryUpdateDuration), Timeout.InfiniteTimeSpan);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LibraryUpdateTimer.Change(LibraryUpdateDuration, Timeout.Infinite);
|
LibraryUpdateTimer.Change(TimeSpan.FromSeconds(_configurationManager.Configuration.LibraryUpdateDuration), Timeout.InfiniteTimeSpan);
|
||||||
}
|
}
|
||||||
|
|
||||||
_itemsUpdated.Add(e.Item);
|
_itemsUpdated.Add(e.Item);
|
||||||
@ -256,11 +255,11 @@ namespace Emby.Server.Implementations.EntryPoints
|
|||||||
{
|
{
|
||||||
if (LibraryUpdateTimer is null)
|
if (LibraryUpdateTimer is null)
|
||||||
{
|
{
|
||||||
LibraryUpdateTimer = new Timer(LibraryUpdateTimerCallback, null, LibraryUpdateDuration, Timeout.Infinite);
|
LibraryUpdateTimer = new Timer(LibraryUpdateTimerCallback, null, TimeSpan.FromSeconds(_configurationManager.Configuration.LibraryUpdateDuration), Timeout.InfiniteTimeSpan);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LibraryUpdateTimer.Change(LibraryUpdateDuration, Timeout.Infinite);
|
LibraryUpdateTimer.Change(TimeSpan.FromSeconds(_configurationManager.Configuration.LibraryUpdateDuration), Timeout.InfiniteTimeSpan);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.Parent is Folder parent)
|
if (e.Parent is Folder parent)
|
||||||
|
@ -1641,9 +1641,11 @@ public class DynamicHlsController : BaseJellyfinApiController
|
|||||||
Path.GetFileNameWithoutExtension(outputPath));
|
Path.GetFileNameWithoutExtension(outputPath));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var hlsArguments = GetHlsArguments(isEventPlaylist, state.SegmentLength);
|
||||||
|
|
||||||
return string.Format(
|
return string.Format(
|
||||||
CultureInfo.InvariantCulture,
|
CultureInfo.InvariantCulture,
|
||||||
"{0} {1} -map_metadata -1 -map_chapters -1 -threads {2} {3} {4} {5} -copyts -avoid_negative_ts disabled -max_muxing_queue_size {6} -f hls -max_delay 5000000 -hls_time {7} -hls_segment_type {8} -start_number {9}{10} -hls_segment_filename \"{12}\" -hls_playlist_type {11} -hls_list_size 0 -y \"{13}\"",
|
"{0} {1} -map_metadata -1 -map_chapters -1 -threads {2} {3} {4} {5} -copyts -avoid_negative_ts disabled -max_muxing_queue_size {6} -f hls -max_delay 5000000 -hls_time {7} -hls_segment_type {8} -start_number {9}{10} -hls_segment_filename \"{11}\" {12} -y \"{13}\"",
|
||||||
inputModifier,
|
inputModifier,
|
||||||
_encodingHelper.GetInputArgument(state, _encodingOptions, segmentContainer),
|
_encodingHelper.GetInputArgument(state, _encodingOptions, segmentContainer),
|
||||||
threads,
|
threads,
|
||||||
@ -1655,11 +1657,38 @@ public class DynamicHlsController : BaseJellyfinApiController
|
|||||||
segmentFormat,
|
segmentFormat,
|
||||||
startNumber.ToString(CultureInfo.InvariantCulture),
|
startNumber.ToString(CultureInfo.InvariantCulture),
|
||||||
baseUrlParam,
|
baseUrlParam,
|
||||||
isEventPlaylist ? "event" : "vod",
|
|
||||||
EncodingUtils.NormalizePath(outputTsArg),
|
EncodingUtils.NormalizePath(outputTsArg),
|
||||||
|
hlsArguments,
|
||||||
EncodingUtils.NormalizePath(outputPath)).Trim();
|
EncodingUtils.NormalizePath(outputPath)).Trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the HLS arguments for transcoding.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>The command line arguments for HLS transcoding.</returns>
|
||||||
|
private string GetHlsArguments(bool isEventPlaylist, int segmentLength)
|
||||||
|
{
|
||||||
|
var enableThrottling = _encodingOptions.EnableThrottling;
|
||||||
|
var enableSegmentDeletion = _encodingOptions.EnableSegmentDeletion;
|
||||||
|
|
||||||
|
// Only enable segment deletion when throttling is enabled
|
||||||
|
if (enableThrottling && enableSegmentDeletion)
|
||||||
|
{
|
||||||
|
// Store enough segments for configured seconds of playback; this needs to be above throttling settings
|
||||||
|
var segmentCount = _encodingOptions.SegmentKeepSeconds / segmentLength;
|
||||||
|
|
||||||
|
_logger.LogDebug("Using throttling and segment deletion, keeping {0} segments", segmentCount);
|
||||||
|
|
||||||
|
return string.Format(CultureInfo.InvariantCulture, "-hls_list_size {0} -hls_flags delete_segments", segmentCount.ToString(CultureInfo.InvariantCulture));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_logger.LogDebug("Using normal playback, is event playlist? {0}", isEventPlaylist);
|
||||||
|
|
||||||
|
return string.Format(CultureInfo.InvariantCulture, "-hls_playlist_type {0} -hls_list_size 0", isEventPlaylist ? "event" : "vod");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the audio arguments for transcoding.
|
/// Gets the audio arguments for transcoding.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -660,7 +660,7 @@ public class TranscodingJobHelper : IDisposable
|
|||||||
{
|
{
|
||||||
if (EnableThrottling(state))
|
if (EnableThrottling(state))
|
||||||
{
|
{
|
||||||
transcodingJob.TranscodingThrottler = new TranscodingThrottler(transcodingJob, new Logger<TranscodingThrottler>(new LoggerFactory()), _serverConfigurationManager, _fileSystem, _mediaEncoder);
|
transcodingJob.TranscodingThrottler = new TranscodingThrottler(transcodingJob, _loggerFactory.CreateLogger<TranscodingThrottler>(), _serverConfigurationManager, _fileSystem, _mediaEncoder);
|
||||||
transcodingJob.TranscodingThrottler.Start();
|
transcodingJob.TranscodingThrottler.Start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1365,22 +1365,11 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|||||||
{
|
{
|
||||||
var args = string.Empty;
|
var args = string.Empty;
|
||||||
var gopArg = string.Empty;
|
var gopArg = string.Empty;
|
||||||
var keyFrameArg = string.Empty;
|
|
||||||
if (isEventPlaylist)
|
var keyFrameArg = string.Format(
|
||||||
{
|
CultureInfo.InvariantCulture,
|
||||||
keyFrameArg = string.Format(
|
" -force_key_frames:0 \"expr:gte(t,n_forced*{0})\"",
|
||||||
CultureInfo.InvariantCulture,
|
segmentLength);
|
||||||
" -force_key_frames:0 \"expr:gte(t,n_forced*{0})\"",
|
|
||||||
segmentLength);
|
|
||||||
}
|
|
||||||
else if (startNumber.HasValue)
|
|
||||||
{
|
|
||||||
keyFrameArg = string.Format(
|
|
||||||
CultureInfo.InvariantCulture,
|
|
||||||
" -force_key_frames:0 \"expr:gte(t,{0}+n_forced*{1})\"",
|
|
||||||
startNumber.Value * segmentLength,
|
|
||||||
segmentLength);
|
|
||||||
}
|
|
||||||
|
|
||||||
var framerate = state.VideoStream?.RealFrameRate;
|
var framerate = state.VideoStream?.RealFrameRate;
|
||||||
if (framerate.HasValue)
|
if (framerate.HasValue)
|
||||||
@ -2966,7 +2955,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|||||||
|
|
||||||
if (string.Equals(hwTonemapSuffix, "vaapi", StringComparison.OrdinalIgnoreCase))
|
if (string.Equals(hwTonemapSuffix, "vaapi", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
args = "procamp_vaapi=b={2}:c={3}," + args + ":extra_hw_frames=32";
|
args = "procamp_vaapi=b={1}:c={2},tonemap_vaapi=format={0}:p=bt709:t=bt709:m=bt709:extra_hw_frames=32";
|
||||||
|
|
||||||
return string.Format(
|
return string.Format(
|
||||||
CultureInfo.InvariantCulture,
|
CultureInfo.InvariantCulture,
|
||||||
@ -2975,25 +2964,6 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|||||||
options.VppTonemappingBrightness,
|
options.VppTonemappingBrightness,
|
||||||
options.VppTonemappingContrast);
|
options.VppTonemappingContrast);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.Equals(hwTonemapSuffix, "vulkan", StringComparison.OrdinalIgnoreCase))
|
|
||||||
{
|
|
||||||
args = "libplacebo=format={1}:tonemapping={2}:color_primaries=bt709:color_trc=bt709:colorspace=bt709:peak_detect=0:upscaler=none:downscaler=none";
|
|
||||||
|
|
||||||
if (!string.Equals(options.TonemappingRange, "auto", StringComparison.OrdinalIgnoreCase))
|
|
||||||
{
|
|
||||||
args += ":range={6}";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (string.Equals(options.TonemappingAlgorithm, "bt2390", StringComparison.OrdinalIgnoreCase))
|
|
||||||
{
|
|
||||||
algorithm = "bt.2390";
|
|
||||||
}
|
|
||||||
else if (string.Equals(options.TonemappingAlgorithm, "none", StringComparison.OrdinalIgnoreCase))
|
|
||||||
{
|
|
||||||
algorithm = "clip";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
args = "tonemap_{0}=format={1}:p=bt709:t=bt709:m=bt709:tonemap={2}:peak={3}:desat={4}";
|
args = "tonemap_{0}=format={1}:p=bt709:t=bt709:m=bt709:tonemap={2}:peak={3}:desat={4}";
|
||||||
|
@ -20,6 +20,8 @@ public class EncodingOptions
|
|||||||
MaxMuxingQueueSize = 2048;
|
MaxMuxingQueueSize = 2048;
|
||||||
EnableThrottling = false;
|
EnableThrottling = false;
|
||||||
ThrottleDelaySeconds = 180;
|
ThrottleDelaySeconds = 180;
|
||||||
|
EnableSegmentDeletion = false;
|
||||||
|
SegmentKeepSeconds = 720;
|
||||||
EncodingThreadCount = -1;
|
EncodingThreadCount = -1;
|
||||||
// This is a DRM device that is almost guaranteed to be there on every intel platform,
|
// 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
|
// plus it's the default one in ffmpeg if you don't specify anything
|
||||||
@ -102,6 +104,16 @@ public class EncodingOptions
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public int ThrottleDelaySeconds { get; set; }
|
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>
|
/// <summary>
|
||||||
/// Gets or sets the hardware acceleration type.
|
/// Gets or sets the hardware acceleration type.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -165,6 +165,12 @@ namespace MediaBrowser.Model.Configuration
|
|||||||
/// <value>The file watcher delay.</value>
|
/// <value>The file watcher delay.</value>
|
||||||
public int LibraryMonitorDelay { get; set; } = 60;
|
public int LibraryMonitorDelay { get; set; } = 60;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the duration in seconds that we will wait after a library updated event before executing the library changed notification.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The library update duration.</value>
|
||||||
|
public int LibraryUpdateDuration { get; set; } = 30;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the image saving convention.
|
/// Gets or sets the image saving convention.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -13,7 +13,7 @@ RUN yum update -yq \
|
|||||||
&& yum install -yq @buildsys-build rpmdevtools yum-plugins-core libcurl-devel fontconfig-devel freetype-devel openssl-devel glibc-devel libicu-devel git wget
|
&& yum install -yq @buildsys-build rpmdevtools yum-plugins-core libcurl-devel fontconfig-devel freetype-devel openssl-devel glibc-devel libicu-devel git wget
|
||||||
|
|
||||||
# Install DotNET SDK
|
# Install DotNET SDK
|
||||||
RUN wget -q https://download.visualstudio.microsoft.com/download/pr/ebfd0bf8-79bd-480a-9e81-0b217463738d/9adc6bf0614ce02670101e278a2d8555/dotnet-sdk-7.0.203-linux-x64.tar.gz -O dotnet-sdk.tar.gz \
|
RUN wget -q https://download.visualstudio.microsoft.com/download/pr/9c86d7b4-acb2-4be4-8a89-d13bc3c3f28f/1d044c7c29df018e8f2837bb343e8a84/dotnet-sdk-7.0.304-linux-x64.tar.gz -O dotnet-sdk.tar.gz \
|
||||||
&& mkdir -p dotnet-sdk \
|
&& mkdir -p dotnet-sdk \
|
||||||
&& tar -xzf dotnet-sdk.tar.gz -C dotnet-sdk \
|
&& tar -xzf dotnet-sdk.tar.gz -C dotnet-sdk \
|
||||||
&& ln -s $( pwd )/dotnet-sdk/dotnet /usr/bin/dotnet
|
&& ln -s $( pwd )/dotnet-sdk/dotnet /usr/bin/dotnet
|
||||||
|
@ -12,7 +12,7 @@ RUN dnf update -yq \
|
|||||||
&& dnf install -yq @buildsys-build rpmdevtools git dnf-plugins-core libcurl-devel fontconfig-devel freetype-devel openssl-devel glibc-devel libicu-devel systemd wget make
|
&& dnf install -yq @buildsys-build rpmdevtools git dnf-plugins-core libcurl-devel fontconfig-devel freetype-devel openssl-devel glibc-devel libicu-devel systemd wget make
|
||||||
|
|
||||||
# Install DotNET SDK
|
# Install DotNET SDK
|
||||||
RUN wget -q https://download.visualstudio.microsoft.com/download/pr/ebfd0bf8-79bd-480a-9e81-0b217463738d/9adc6bf0614ce02670101e278a2d8555/dotnet-sdk-7.0.203-linux-x64.tar.gz -O dotnet-sdk.tar.gz \
|
RUN wget -q https://download.visualstudio.microsoft.com/download/pr/9c86d7b4-acb2-4be4-8a89-d13bc3c3f28f/1d044c7c29df018e8f2837bb343e8a84/dotnet-sdk-7.0.304-linux-x64.tar.gz -O dotnet-sdk.tar.gz \
|
||||||
&& mkdir -p dotnet-sdk \
|
&& mkdir -p dotnet-sdk \
|
||||||
&& tar -xzf dotnet-sdk.tar.gz -C dotnet-sdk \
|
&& tar -xzf dotnet-sdk.tar.gz -C dotnet-sdk \
|
||||||
&& ln -s $( pwd )/dotnet-sdk/dotnet /usr/bin/dotnet
|
&& ln -s $( pwd )/dotnet-sdk/dotnet /usr/bin/dotnet
|
||||||
|
@ -17,7 +17,7 @@ RUN apt-get update -yqq \
|
|||||||
libfreetype6-dev libssl-dev libssl1.1 liblttng-ust0
|
libfreetype6-dev libssl-dev libssl1.1 liblttng-ust0
|
||||||
|
|
||||||
# Install dotnet repository
|
# Install dotnet repository
|
||||||
RUN wget -q https://download.visualstudio.microsoft.com/download/pr/ebfd0bf8-79bd-480a-9e81-0b217463738d/9adc6bf0614ce02670101e278a2d8555/dotnet-sdk-7.0.203-linux-x64.tar.gz -O dotnet-sdk.tar.gz \
|
RUN wget -q https://download.visualstudio.microsoft.com/download/pr/9c86d7b4-acb2-4be4-8a89-d13bc3c3f28f/1d044c7c29df018e8f2837bb343e8a84/dotnet-sdk-7.0.304-linux-x64.tar.gz -O dotnet-sdk.tar.gz \
|
||||||
&& mkdir -p dotnet-sdk \
|
&& mkdir -p dotnet-sdk \
|
||||||
&& tar -xzf dotnet-sdk.tar.gz -C dotnet-sdk \
|
&& tar -xzf dotnet-sdk.tar.gz -C dotnet-sdk \
|
||||||
&& ln -s $( pwd )/dotnet-sdk/dotnet /usr/bin/dotnet
|
&& ln -s $( pwd )/dotnet-sdk/dotnet /usr/bin/dotnet
|
||||||
|
@ -16,7 +16,7 @@ RUN apt-get update -yqq \
|
|||||||
mmv build-essential lsb-release
|
mmv build-essential lsb-release
|
||||||
|
|
||||||
# Install dotnet repository
|
# Install dotnet repository
|
||||||
RUN wget -q https://download.visualstudio.microsoft.com/download/pr/ebfd0bf8-79bd-480a-9e81-0b217463738d/9adc6bf0614ce02670101e278a2d8555/dotnet-sdk-7.0.203-linux-x64.tar.gz -O dotnet-sdk.tar.gz \
|
RUN wget -q https://download.visualstudio.microsoft.com/download/pr/9c86d7b4-acb2-4be4-8a89-d13bc3c3f28f/1d044c7c29df018e8f2837bb343e8a84/dotnet-sdk-7.0.304-linux-x64.tar.gz -O dotnet-sdk.tar.gz \
|
||||||
&& mkdir -p dotnet-sdk \
|
&& mkdir -p dotnet-sdk \
|
||||||
&& tar -xzf dotnet-sdk.tar.gz -C dotnet-sdk \
|
&& tar -xzf dotnet-sdk.tar.gz -C dotnet-sdk \
|
||||||
&& ln -s $( pwd )/dotnet-sdk/dotnet /usr/bin/dotnet
|
&& ln -s $( pwd )/dotnet-sdk/dotnet /usr/bin/dotnet
|
||||||
|
@ -16,7 +16,7 @@ RUN apt-get update -yqq \
|
|||||||
mmv build-essential lsb-release
|
mmv build-essential lsb-release
|
||||||
|
|
||||||
# Install dotnet repository
|
# Install dotnet repository
|
||||||
RUN wget -q https://download.visualstudio.microsoft.com/download/pr/ebfd0bf8-79bd-480a-9e81-0b217463738d/9adc6bf0614ce02670101e278a2d8555/dotnet-sdk-7.0.203-linux-x64.tar.gz -O dotnet-sdk.tar.gz \
|
RUN wget -q https://download.visualstudio.microsoft.com/download/pr/9c86d7b4-acb2-4be4-8a89-d13bc3c3f28f/1d044c7c29df018e8f2837bb343e8a84/dotnet-sdk-7.0.304-linux-x64.tar.gz -O dotnet-sdk.tar.gz \
|
||||||
&& mkdir -p dotnet-sdk \
|
&& mkdir -p dotnet-sdk \
|
||||||
&& tar -xzf dotnet-sdk.tar.gz -C dotnet-sdk \
|
&& tar -xzf dotnet-sdk.tar.gz -C dotnet-sdk \
|
||||||
&& ln -s $( pwd )/dotnet-sdk/dotnet /usr/bin/dotnet
|
&& ln -s $( pwd )/dotnet-sdk/dotnet /usr/bin/dotnet
|
||||||
|
Loading…
x
Reference in New Issue
Block a user