Browse Source

add b-frames option to ffmpeg profile (#1726)

* add b-frames option to ffmpeg profile

* update dependencies

* cleanup
pull/1727/head
Jason Dove 1 year ago committed by GitHub
parent
commit
242a7ae382
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 1
      ErsatzTV.Application/FFmpegProfiles/Commands/CreateFFmpegProfile.cs
  3. 1
      ErsatzTV.Application/FFmpegProfiles/Commands/CreateFFmpegProfileHandler.cs
  4. 1
      ErsatzTV.Application/FFmpegProfiles/Commands/UpdateFFmpegProfile.cs
  5. 1
      ErsatzTV.Application/FFmpegProfiles/Commands/UpdateFFmpegProfileHandler.cs
  6. 1
      ErsatzTV.Application/FFmpegProfiles/FFmpegProfileViewModel.cs
  7. 1
      ErsatzTV.Application/FFmpegProfiles/Mapper.cs
  8. 2
      ErsatzTV.Core.Tests/ErsatzTV.Core.Tests.csproj
  9. 2
      ErsatzTV.Core/Domain/FFmpegProfile.cs
  10. 3
      ErsatzTV.Core/FFmpeg/FFmpegLibraryProcessService.cs
  11. 2
      ErsatzTV.FFmpeg.Tests/ErsatzTV.FFmpeg.Tests.csproj
  12. 4
      ErsatzTV.FFmpeg.Tests/PipelineBuilderBaseTests.cs
  13. 1
      ErsatzTV.FFmpeg/FrameState.cs
  14. 2
      ErsatzTV.FFmpeg/Pipeline/PipelineBuilderBase.cs
  15. 2
      ErsatzTV.Infrastructure.MySql/ErsatzTV.Infrastructure.MySql.csproj
  16. 5777
      ErsatzTV.Infrastructure.MySql/Migrations/20240524134543_Add_FFmpegProfile_AllowBFrames.Designer.cs
  17. 29
      ErsatzTV.Infrastructure.MySql/Migrations/20240524134543_Add_FFmpegProfile_AllowBFrames.cs
  18. 3
      ErsatzTV.Infrastructure.MySql/Migrations/TvContextModelSnapshot.cs
  19. 4
      ErsatzTV.Infrastructure.Sqlite/ErsatzTV.Infrastructure.Sqlite.csproj
  20. 5616
      ErsatzTV.Infrastructure.Sqlite/Migrations/20240524133111_Add_FFmpegProfile_AllowBFrames.Designer.cs
  21. 29
      ErsatzTV.Infrastructure.Sqlite/Migrations/20240524133111_Add_FFmpegProfile_AllowBFrames.cs
  22. 3
      ErsatzTV.Infrastructure.Sqlite/Migrations/TvContextModelSnapshot.cs
  23. 2
      ErsatzTV.Infrastructure.Tests/ErsatzTV.Infrastructure.Tests.csproj
  24. 6
      ErsatzTV.Infrastructure/ErsatzTV.Infrastructure.csproj
  25. 2
      ErsatzTV.Scanner.Tests/ErsatzTV.Scanner.Tests.csproj
  26. 10
      ErsatzTV/ErsatzTV.csproj
  27. 3
      ErsatzTV/Pages/FFmpegEditor.razor
  28. 4
      ErsatzTV/ViewModels/FFmpegProfileEditViewModel.cs

1
CHANGELOG.md

@ -61,6 +61,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Add two new environment variables to customize config and transcode folder locations - Add two new environment variables to customize config and transcode folder locations
- `ETV_CONFIG_FOLDER` - `ETV_CONFIG_FOLDER`
- `ETV_TRANSCODE_FOLDER` - `ETV_TRANSCODE_FOLDER`
- Add checkbox to allow use of B-frames in FFmpeg Profile (disabled by default)
### Fixed ### Fixed
- Fix some cases of 404s from Plex when files were replaced and scanning the library from ETV didn't help - Fix some cases of 404s from Plex when files were replaced and scanning the library from ETV didn't help

1
ErsatzTV.Application/FFmpegProfiles/Commands/CreateFFmpegProfile.cs

@ -16,6 +16,7 @@ public record CreateFFmpegProfile(
FFmpegProfileVideoFormat VideoFormat, FFmpegProfileVideoFormat VideoFormat,
string VideoProfile, string VideoProfile,
string VideoPreset, string VideoPreset,
bool AllowBFrames,
FFmpegProfileBitDepth BitDepth, FFmpegProfileBitDepth BitDepth,
int VideoBitrate, int VideoBitrate,
int VideoBufferSize, int VideoBufferSize,

1
ErsatzTV.Application/FFmpegProfiles/Commands/CreateFFmpegProfileHandler.cs

@ -56,6 +56,7 @@ public class CreateFFmpegProfileHandler :
VideoFormat = request.VideoFormat, VideoFormat = request.VideoFormat,
VideoProfile = request.VideoProfile, VideoProfile = request.VideoProfile,
VideoPreset = request.VideoPreset, VideoPreset = request.VideoPreset,
AllowBFrames = request.AllowBFrames,
BitDepth = request.BitDepth, BitDepth = request.BitDepth,
VideoBitrate = request.VideoBitrate, VideoBitrate = request.VideoBitrate,
VideoBufferSize = request.VideoBufferSize, VideoBufferSize = request.VideoBufferSize,

1
ErsatzTV.Application/FFmpegProfiles/Commands/UpdateFFmpegProfile.cs

@ -17,6 +17,7 @@ public record UpdateFFmpegProfile(
FFmpegProfileVideoFormat VideoFormat, FFmpegProfileVideoFormat VideoFormat,
string VideoProfile, string VideoProfile,
string VideoPreset, string VideoPreset,
bool AllowBFrames,
FFmpegProfileBitDepth BitDepth, FFmpegProfileBitDepth BitDepth,
int VideoBitrate, int VideoBitrate,
int VideoBufferSize, int VideoBufferSize,

1
ErsatzTV.Application/FFmpegProfiles/Commands/UpdateFFmpegProfileHandler.cs

@ -44,6 +44,7 @@ public class
p.VideoFormat = update.VideoFormat; p.VideoFormat = update.VideoFormat;
p.VideoProfile = update.VideoProfile; p.VideoProfile = update.VideoProfile;
p.VideoPreset = update.VideoPreset; p.VideoPreset = update.VideoPreset;
p.AllowBFrames = update.AllowBFrames;
// mpeg2video only supports 8-bit content // mpeg2video only supports 8-bit content
p.BitDepth = update.VideoFormat == FFmpegProfileVideoFormat.Mpeg2Video p.BitDepth = update.VideoFormat == FFmpegProfileVideoFormat.Mpeg2Video

1
ErsatzTV.Application/FFmpegProfiles/FFmpegProfileViewModel.cs

@ -17,6 +17,7 @@ public record FFmpegProfileViewModel(
FFmpegProfileVideoFormat VideoFormat, FFmpegProfileVideoFormat VideoFormat,
string VideoProfile, string VideoProfile,
string VideoPreset, string VideoPreset,
bool AllowBFrames,
FFmpegProfileBitDepth BitDepth, FFmpegProfileBitDepth BitDepth,
int VideoBitrate, int VideoBitrate,
int VideoBufferSize, int VideoBufferSize,

1
ErsatzTV.Application/FFmpegProfiles/Mapper.cs

@ -19,6 +19,7 @@ internal static class Mapper
profile.VideoFormat, profile.VideoFormat,
profile.VideoProfile, profile.VideoProfile,
profile.VideoPreset ?? string.Empty, profile.VideoPreset ?? string.Empty,
profile.AllowBFrames,
profile.BitDepth, profile.BitDepth,
profile.VideoBitrate, profile.VideoBitrate,
profile.VideoBufferSize, profile.VideoBufferSize,

2
ErsatzTV.Core.Tests/ErsatzTV.Core.Tests.csproj

@ -16,7 +16,7 @@
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" /> <PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" /> <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" /> <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.10.48"> <PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.10.48">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

2
ErsatzTV.Core/Domain/FFmpegProfile.cs

@ -17,6 +17,7 @@ public record FFmpegProfile
public FFmpegProfileVideoFormat VideoFormat { get; set; } public FFmpegProfileVideoFormat VideoFormat { get; set; }
public string VideoProfile { get; set; } public string VideoProfile { get; set; }
public string VideoPreset { get; set; } public string VideoPreset { get; set; }
public bool AllowBFrames { get; set; }
public FFmpegProfileBitDepth BitDepth { get; set; } public FFmpegProfileBitDepth BitDepth { get; set; }
public int VideoBitrate { get; set; } public int VideoBitrate { get; set; }
public int VideoBufferSize { get; set; } public int VideoBufferSize { get; set; }
@ -39,6 +40,7 @@ public record FFmpegProfile
VideoFormat = FFmpegProfileVideoFormat.H264, VideoFormat = FFmpegProfileVideoFormat.H264,
VideoProfile = "high", VideoProfile = "high",
VideoPreset = ErsatzTV.FFmpeg.Preset.VideoPreset.Unset, VideoPreset = ErsatzTV.FFmpeg.Preset.VideoPreset.Unset,
AllowBFrames = false,
AudioFormat = FFmpegProfileAudioFormat.Aac, AudioFormat = FFmpegProfileAudioFormat.Aac,
VideoBitrate = 2000, VideoBitrate = 2000,
VideoBufferSize = 4000, VideoBufferSize = 4000,

3
ErsatzTV.Core/FFmpeg/FFmpegLibraryProcessService.cs

@ -348,6 +348,7 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService
videoFormat, videoFormat,
maybeVideoProfile, maybeVideoProfile,
maybeVideoPreset, maybeVideoPreset,
channel.FFmpegProfile.AllowBFrames,
Optional(playbackSettings.PixelFormat), Optional(playbackSettings.PixelFormat),
scaledSize, scaledSize,
paddedSize, paddedSize,
@ -456,6 +457,7 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService
videoFormat, videoFormat,
GetVideoProfile(videoFormat, channel.FFmpegProfile.VideoProfile), GetVideoProfile(videoFormat, channel.FFmpegProfile.VideoProfile),
VideoPreset.Unset, VideoPreset.Unset,
channel.FFmpegProfile.AllowBFrames,
new PixelFormatYuv420P(), new PixelFormatYuv420P(),
new FrameSize(desiredResolution.Width, desiredResolution.Height), new FrameSize(desiredResolution.Width, desiredResolution.Height),
new FrameSize(desiredResolution.Width, desiredResolution.Height), new FrameSize(desiredResolution.Width, desiredResolution.Height),
@ -682,6 +684,7 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService
videoFormat, videoFormat,
maybeVideoProfile, maybeVideoProfile,
maybeVideoPreset, maybeVideoPreset,
channel.FFmpegProfile.AllowBFrames,
Optional(playbackSettings.PixelFormat), Optional(playbackSettings.PixelFormat),
resolution, resolution,
resolution, resolution,

2
ErsatzTV.FFmpeg.Tests/ErsatzTV.FFmpeg.Tests.csproj

@ -10,7 +10,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.12.0" /> <PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" /> <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="NSubstitute" Version="5.1.0" /> <PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="NUnit" Version="4.1.0" /> <PackageReference Include="NUnit" Version="4.1.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" /> <PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />

4
ErsatzTV.FFmpeg.Tests/PipelineBuilderBaseTests.cs

@ -60,6 +60,7 @@ public class PipelineBuilderBaseTests
VideoFormat.Hevc, VideoFormat.Hevc,
VideoProfile.Main, VideoProfile.Main,
VideoPreset.Unset, VideoPreset.Unset,
false,
new PixelFormatYuv420P(), new PixelFormatYuv420P(),
new FrameSize(1920, 1080), new FrameSize(1920, 1080),
new FrameSize(1920, 1080), new FrameSize(1920, 1080),
@ -151,6 +152,7 @@ public class PipelineBuilderBaseTests
VideoFormat.Hevc, VideoFormat.Hevc,
VideoProfile.Main, VideoProfile.Main,
VideoPreset.Unset, VideoPreset.Unset,
false,
new PixelFormatYuv420P(), new PixelFormatYuv420P(),
new FrameSize(1920, 1080), new FrameSize(1920, 1080),
new FrameSize(1920, 1080), new FrameSize(1920, 1080),
@ -298,6 +300,7 @@ public class PipelineBuilderBaseTests
VideoFormat.Copy, VideoFormat.Copy,
VideoProfile.Main, VideoProfile.Main,
VideoPreset.Unset, VideoPreset.Unset,
false,
Option<IPixelFormat>.None, Option<IPixelFormat>.None,
new FrameSize(1920, 1080), new FrameSize(1920, 1080),
new FrameSize(1920, 1080), new FrameSize(1920, 1080),
@ -383,6 +386,7 @@ public class PipelineBuilderBaseTests
VideoFormat.Copy, VideoFormat.Copy,
VideoProfile.Main, VideoProfile.Main,
VideoPreset.Unset, VideoPreset.Unset,
false,
new PixelFormatYuv420P(), new PixelFormatYuv420P(),
new FrameSize(1920, 1080), new FrameSize(1920, 1080),
new FrameSize(1920, 1080), new FrameSize(1920, 1080),

1
ErsatzTV.FFmpeg/FrameState.cs

@ -8,6 +8,7 @@ public record FrameState(
string VideoFormat, string VideoFormat,
Option<string> VideoProfile, Option<string> VideoProfile,
Option<string> VideoPreset, Option<string> VideoPreset,
bool AllowBFrames,
Option<IPixelFormat> PixelFormat, Option<IPixelFormat> PixelFormat,
FrameSize ScaledSize, FrameSize ScaledSize,
FrameSize PaddedSize, FrameSize PaddedSize,

2
ErsatzTV.FFmpeg/Pipeline/PipelineBuilderBase.cs

@ -174,7 +174,7 @@ public abstract class PipelineBuilderBase : IPipelineBuilder
new ClosedGopOutputOption() new ClosedGopOutputOption()
}; };
if (desiredState.VideoFormat != VideoFormat.Copy) if (desiredState.VideoFormat != VideoFormat.Copy && !desiredState.AllowBFrames)
{ {
pipelineSteps.Add(new NoBFramesOutputOption()); pipelineSteps.Add(new NoBFramesOutputOption());
} }

2
ErsatzTV.Infrastructure.MySql/ErsatzTV.Infrastructure.MySql.csproj

@ -16,7 +16,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.4" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.5" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.2" /> <PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.2" />
</ItemGroup> </ItemGroup>

5777
ErsatzTV.Infrastructure.MySql/Migrations/20240524134543_Add_FFmpegProfile_AllowBFrames.Designer.cs generated

File diff suppressed because it is too large Load Diff

29
ErsatzTV.Infrastructure.MySql/Migrations/20240524134543_Add_FFmpegProfile_AllowBFrames.cs

@ -0,0 +1,29 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ErsatzTV.Infrastructure.MySql.Migrations
{
/// <inheritdoc />
public partial class Add_FFmpegProfile_AllowBFrames : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "AllowBFrames",
table: "FFmpegProfile",
type: "tinyint(1)",
nullable: false,
defaultValue: false);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "AllowBFrames",
table: "FFmpegProfile");
}
}
}

3
ErsatzTV.Infrastructure.MySql/Migrations/TvContextModelSnapshot.cs

@ -579,6 +579,9 @@ namespace ErsatzTV.Infrastructure.MySql.Migrations
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id")); MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<bool>("AllowBFrames")
.HasColumnType("tinyint(1)");
b.Property<int>("AudioBitrate") b.Property<int>("AudioBitrate")
.HasColumnType("int"); .HasColumnType("int");

4
ErsatzTV.Infrastructure.Sqlite/ErsatzTV.Infrastructure.Sqlite.csproj

@ -13,8 +13,8 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Dapper" Version="2.1.35" /> <PackageReference Include="Dapper" Version="2.1.35" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.4" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.4" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.5" />
</ItemGroup> </ItemGroup>

5616
ErsatzTV.Infrastructure.Sqlite/Migrations/20240524133111_Add_FFmpegProfile_AllowBFrames.Designer.cs generated

File diff suppressed because it is too large Load Diff

29
ErsatzTV.Infrastructure.Sqlite/Migrations/20240524133111_Add_FFmpegProfile_AllowBFrames.cs

@ -0,0 +1,29 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ErsatzTV.Infrastructure.Sqlite.Migrations
{
/// <inheritdoc />
public partial class Add_FFmpegProfile_AllowBFrames : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "AllowBFrames",
table: "FFmpegProfile",
type: "INTEGER",
nullable: false,
defaultValue: false);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "AllowBFrames",
table: "FFmpegProfile");
}
}
}

3
ErsatzTV.Infrastructure.Sqlite/Migrations/TvContextModelSnapshot.cs

@ -548,6 +548,9 @@ namespace ErsatzTV.Infrastructure.Sqlite.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("INTEGER"); .HasColumnType("INTEGER");
b.Property<bool>("AllowBFrames")
.HasColumnType("INTEGER");
b.Property<int>("AudioBitrate") b.Property<int>("AudioBitrate")
.HasColumnType("INTEGER"); .HasColumnType("INTEGER");

2
ErsatzTV.Infrastructure.Tests/ErsatzTV.Infrastructure.Tests.csproj

@ -10,7 +10,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.12.0" /> <PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="NSubstitute" Version="5.1.0" /> <PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="NUnit" Version="4.1.0" /> <PackageReference Include="NUnit" Version="4.1.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" /> <PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />

6
ErsatzTV.Infrastructure/ErsatzTV.Infrastructure.csproj

@ -18,12 +18,12 @@
<PackageReference Include="Lucene.Net" Version="4.8.0-beta00016" /> <PackageReference Include="Lucene.Net" Version="4.8.0-beta00016" />
<PackageReference Include="Lucene.Net.Analysis.Common" Version="4.8.0-beta00016" /> <PackageReference Include="Lucene.Net.Analysis.Common" Version="4.8.0-beta00016" />
<PackageReference Include="Lucene.Net.QueryParser" Version="4.8.0-beta00016" /> <PackageReference Include="Lucene.Net.QueryParser" Version="4.8.0-beta00016" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.4" /> <PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.4"> <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.5">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.4" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.5" />
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.10.48"> <PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.10.48">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

2
ErsatzTV.Scanner.Tests/ErsatzTV.Scanner.Tests.csproj

@ -11,7 +11,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.12.0" /> <PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="LanguageExt.Core" Version="4.4.8" /> <PackageReference Include="LanguageExt.Core" Version="4.4.8" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="NSubstitute" Version="5.1.0" /> <PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="NUnit" Version="4.1.0" /> <PackageReference Include="NUnit" Version="4.1.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" /> <PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />

10
ErsatzTV/ErsatzTV.csproj

@ -25,11 +25,11 @@
<PackageReference Include="LanguageExt.Core" Version="4.4.8" /> <PackageReference Include="LanguageExt.Core" Version="4.4.8" />
<PackageReference Include="Markdig" Version="0.37.0" /> <PackageReference Include="Markdig" Version="0.37.0" />
<PackageReference Include="MediatR.Courier.DependencyInjection" Version="5.0.0" /> <PackageReference Include="MediatR.Courier.DependencyInjection" Version="5.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.4" /> <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.5" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.4" /> <PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.5" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.4" /> <PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.5" />
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="8.0.4" /> <PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="8.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.4"> <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.5">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>

3
ErsatzTV/Pages/FFmpegEditor.razor

@ -84,6 +84,9 @@
} }
} }
</MudSelect> </MudSelect>
<MudElement HtmlTag="div" Class="mt-3">
<MudCheckBox Label="Allow B-Frames" @bind-Value="@_model.AllowBFrames" For="@(() => _model.AllowBFrames)"/>
</MudElement>
<MudSelect Label="Bit Depth" @bind-Value="_model.BitDepth" For="@(() => _model.BitDepth)"> <MudSelect Label="Bit Depth" @bind-Value="_model.BitDepth" For="@(() => _model.BitDepth)">
<MudSelectItem Value="@FFmpegProfileBitDepth.EightBit">8-bit</MudSelectItem> <MudSelectItem Value="@FFmpegProfileBitDepth.EightBit">8-bit</MudSelectItem>
<MudSelectItem Value="@FFmpegProfileBitDepth.TenBit">10-bit</MudSelectItem> <MudSelectItem Value="@FFmpegProfileBitDepth.TenBit">10-bit</MudSelectItem>

4
ErsatzTV/ViewModels/FFmpegProfileEditViewModel.cs

@ -35,6 +35,7 @@ public class FFmpegProfileEditViewModel
VideoFormat = viewModel.VideoFormat; VideoFormat = viewModel.VideoFormat;
VideoProfile = viewModel.VideoProfile; VideoProfile = viewModel.VideoProfile;
VideoPreset = viewModel.VideoPreset; VideoPreset = viewModel.VideoPreset;
AllowBFrames = viewModel.AllowBFrames;
BitDepth = viewModel.BitDepth; BitDepth = viewModel.BitDepth;
} }
@ -60,6 +61,7 @@ public class FFmpegProfileEditViewModel
public FFmpegProfileVideoFormat VideoFormat { get; set; } public FFmpegProfileVideoFormat VideoFormat { get; set; }
public string VideoProfile { get; set; } public string VideoProfile { get; set; }
public string VideoPreset { get; set; } public string VideoPreset { get; set; }
public bool AllowBFrames { get; set; }
public FFmpegProfileBitDepth BitDepth { get; set; } public FFmpegProfileBitDepth BitDepth { get; set; }
public CreateFFmpegProfile ToCreate() => public CreateFFmpegProfile ToCreate() =>
@ -75,6 +77,7 @@ public class FFmpegProfileEditViewModel
VideoFormat, VideoFormat,
VideoProfile, VideoProfile,
VideoPreset, VideoPreset,
AllowBFrames,
BitDepth, BitDepth,
VideoBitrate, VideoBitrate,
VideoBufferSize, VideoBufferSize,
@ -102,6 +105,7 @@ public class FFmpegProfileEditViewModel
VideoFormat, VideoFormat,
VideoProfile, VideoProfile,
VideoPreset, VideoPreset,
AllowBFrames,
BitDepth, BitDepth,
VideoBitrate, VideoBitrate,
VideoBufferSize, VideoBufferSize,

Loading…
Cancel
Save