Made the service basically start working

This commit is contained in:
Samuele Lorefice
2025-12-15 05:42:46 +01:00
parent dbf2f18f26
commit db20f5d54d
18 changed files with 424 additions and 46 deletions

41
Encoder/NvencExt.cs Normal file
View File

@@ -0,0 +1,41 @@
using System.ComponentModel.DataAnnotations;
namespace Encoder;
public enum NvencSpeed {
Default=0,
Slow=1,
Medium=2,
Fast=3,
p1=12,
p2=13,
p3=14,
p4=15,
p5=16,
p6=17,
p7=18,
}
public enum NvencTune {
hq=1,
uhq=5,
ll=2,
ull=3,
lossless=4,
}
class NvencSpeedPreset(NvencSpeed speed) : FFMpegCore.Arguments.IArgument {
public string Text { get { return $"-preset {speed.ToString().ToLower()}"; } }
}
class NvencTuneArgument(NvencTune tune) : FFMpegCore.Arguments.IArgument {
public string Text { get { return $"-tune {tune.ToString().ToLower()}"; } }
}
class NvencHighBitDepthArgument(bool enable) : FFMpegCore.Arguments.IArgument {
public string Text { get { return enable ? "-highbitdepth true" : string.Empty; } }
}
class NvencQPArgument([Range(-1, 255)]byte qp) : FFMpegCore.Arguments.IArgument {
public string Text { get { return $"-qp {qp}"; } }
}