mirror of https://github.com/ErsatzTV/ErsatzTV.git
30 changed files with 11347 additions and 47 deletions
@ -0,0 +1,31 @@ |
|||||||
|
using ErsatzTV.FFmpeg.Format; |
||||||
|
|
||||||
|
namespace ErsatzTV.FFmpeg.Preset; |
||||||
|
|
||||||
|
public static class AvailablePresets |
||||||
|
{ |
||||||
|
public static ICollection<string> ForAccelAndFormat( |
||||||
|
HardwareAccelerationMode hardwareAccelerationMode, |
||||||
|
string videoFormat) |
||||||
|
{ |
||||||
|
return (hardwareAccelerationMode, videoFormat) switch |
||||||
|
{ |
||||||
|
(HardwareAccelerationMode.Nvenc, VideoFormat.H264 or VideoFormat.Hevc) => |
||||||
|
[ |
||||||
|
VideoPreset.LowLatencyHighPerformance, VideoPreset.LowLatencyHighQuality |
||||||
|
], |
||||||
|
|
||||||
|
(HardwareAccelerationMode.Qsv, VideoFormat.H264 or VideoFormat.Hevc) => |
||||||
|
[ |
||||||
|
VideoPreset.VeryFast |
||||||
|
], |
||||||
|
|
||||||
|
(HardwareAccelerationMode.None, VideoFormat.H264 or VideoFormat.Hevc) => |
||||||
|
[ |
||||||
|
VideoPreset.VeryFast |
||||||
|
], |
||||||
|
|
||||||
|
_ => Array.Empty<string>() |
||||||
|
}; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,13 @@ |
|||||||
|
namespace ErsatzTV.FFmpeg.Preset; |
||||||
|
|
||||||
|
public static class VideoPreset |
||||||
|
{ |
||||||
|
public const string Unset = ""; |
||||||
|
|
||||||
|
// NVENC
|
||||||
|
public const string LowLatencyHighPerformance = "llhp"; |
||||||
|
public const string LowLatencyHighQuality = "llhq"; |
||||||
|
|
||||||
|
// x264
|
||||||
|
public const string VeryFast = "veryfast"; |
||||||
|
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,29 @@ |
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||||
|
|
||||||
|
#nullable disable |
||||||
|
|
||||||
|
namespace ErsatzTV.Infrastructure.MySql.Migrations |
||||||
|
{ |
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Add_FFmpegProfile_VideoPreset : Migration |
||||||
|
{ |
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||||
|
{ |
||||||
|
migrationBuilder.AddColumn<string>( |
||||||
|
name: "VideoPreset", |
||||||
|
table: "FFmpegProfile", |
||||||
|
type: "longtext", |
||||||
|
nullable: true) |
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||||
|
} |
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||||
|
{ |
||||||
|
migrationBuilder.DropColumn( |
||||||
|
name: "VideoPreset", |
||||||
|
table: "FFmpegProfile"); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,28 @@ |
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||||
|
|
||||||
|
#nullable disable |
||||||
|
|
||||||
|
namespace ErsatzTV.Infrastructure.Sqlite.Migrations |
||||||
|
{ |
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Add_FFmpegProfile_VideoPreset : Migration |
||||||
|
{ |
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||||
|
{ |
||||||
|
migrationBuilder.AddColumn<string>( |
||||||
|
name: "VideoPreset", |
||||||
|
table: "FFmpegProfile", |
||||||
|
type: "TEXT", |
||||||
|
nullable: true); |
||||||
|
} |
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||||
|
{ |
||||||
|
migrationBuilder.DropColumn( |
||||||
|
name: "VideoPreset", |
||||||
|
table: "FFmpegProfile"); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue