|
|
|
@ -113,7 +113,7 @@ public class TranscodingTests |
|
|
|
public static Watermark[] Watermarks = |
|
|
|
public static Watermark[] Watermarks = |
|
|
|
[ |
|
|
|
[ |
|
|
|
Watermark.None, |
|
|
|
Watermark.None, |
|
|
|
//Watermark.PermanentOpaqueScaled,
|
|
|
|
Watermark.PermanentOpaqueScaled, |
|
|
|
// Watermark.PermanentOpaqueActualSize,
|
|
|
|
// Watermark.PermanentOpaqueActualSize,
|
|
|
|
// Watermark.PermanentTransparentScaled,
|
|
|
|
// Watermark.PermanentTransparentScaled,
|
|
|
|
// Watermark.PermanentTransparentActualSize
|
|
|
|
// Watermark.PermanentTransparentActualSize
|
|
|
|
@ -122,8 +122,8 @@ public class TranscodingTests |
|
|
|
public static Subtitle[] Subtitles = |
|
|
|
public static Subtitle[] Subtitles = |
|
|
|
[ |
|
|
|
[ |
|
|
|
Subtitle.None, |
|
|
|
Subtitle.None, |
|
|
|
//Subtitle.Picture,
|
|
|
|
Subtitle.Picture, |
|
|
|
// Subtitle.Text
|
|
|
|
Subtitle.Text |
|
|
|
]; |
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
public static Padding[] Paddings = |
|
|
|
public static Padding[] Paddings = |
|
|
|
@ -151,7 +151,7 @@ public class TranscodingTests |
|
|
|
new("libx264", "yuv420p", "tv", "smpte170m", "bt709", "smpte170m"), |
|
|
|
new("libx264", "yuv420p", "tv", "smpte170m", "bt709", "smpte170m"), |
|
|
|
// // //
|
|
|
|
// // //
|
|
|
|
// // // // example format that requires setparams filter
|
|
|
|
// // // // example format that requires setparams filter
|
|
|
|
//new("libx264", "yuv420p", string.Empty, string.Empty, string.Empty, string.Empty),
|
|
|
|
new("libx264", "yuv420p", string.Empty, string.Empty, string.Empty, string.Empty), |
|
|
|
// // //
|
|
|
|
// // //
|
|
|
|
// // // // new("libx264", "yuvj420p"),
|
|
|
|
// // // // new("libx264", "yuvj420p"),
|
|
|
|
//new("libx264", "yuv420p10le"),
|
|
|
|
//new("libx264", "yuv420p10le"),
|
|
|
|
@ -159,7 +159,7 @@ public class TranscodingTests |
|
|
|
// // //
|
|
|
|
// // //
|
|
|
|
// // // // new("mpeg1video", "yuv420p"),
|
|
|
|
// // // // new("mpeg1video", "yuv420p"),
|
|
|
|
// // // //
|
|
|
|
// // // //
|
|
|
|
//new("mpeg2video", "yuv420p"),
|
|
|
|
new("mpeg2video", "yuv420p"), |
|
|
|
// //
|
|
|
|
// //
|
|
|
|
//new InputFormat("libx265", "yuv420p"),
|
|
|
|
//new InputFormat("libx265", "yuv420p"),
|
|
|
|
//new("libx265", "yuv420p10le"),
|
|
|
|
//new("libx265", "yuv420p10le"),
|
|
|
|
@ -188,7 +188,7 @@ public class TranscodingTests |
|
|
|
public static FFmpegProfileBitDepth[] BitDepths = |
|
|
|
public static FFmpegProfileBitDepth[] BitDepths = |
|
|
|
[ |
|
|
|
[ |
|
|
|
FFmpegProfileBitDepth.EightBit, |
|
|
|
FFmpegProfileBitDepth.EightBit, |
|
|
|
//FFmpegProfileBitDepth.TenBit
|
|
|
|
FFmpegProfileBitDepth.TenBit |
|
|
|
]; |
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
public static FFmpegProfileVideoFormat[] VideoFormats = |
|
|
|
public static FFmpegProfileVideoFormat[] VideoFormats = |
|
|
|
@ -200,10 +200,10 @@ public class TranscodingTests |
|
|
|
|
|
|
|
|
|
|
|
public static HardwareAccelerationKind[] TestAccelerations = |
|
|
|
public static HardwareAccelerationKind[] TestAccelerations = |
|
|
|
[ |
|
|
|
[ |
|
|
|
//HardwareAccelerationKind.None,
|
|
|
|
HardwareAccelerationKind.None, |
|
|
|
HardwareAccelerationKind.Nvenc |
|
|
|
//HardwareAccelerationKind.Nvenc
|
|
|
|
//HardwareAccelerationKind.Vaapi
|
|
|
|
HardwareAccelerationKind.Vaapi, |
|
|
|
//HardwareAccelerationKind.Qsv,
|
|
|
|
HardwareAccelerationKind.Qsv, |
|
|
|
// HardwareAccelerationKind.VideoToolbox,
|
|
|
|
// HardwareAccelerationKind.VideoToolbox,
|
|
|
|
// HardwareAccelerationKind.Amf
|
|
|
|
// HardwareAccelerationKind.Amf
|
|
|
|
]; |
|
|
|
]; |
|
|
|
@ -388,7 +388,7 @@ public class TranscodingTests |
|
|
|
watermarks, |
|
|
|
watermarks, |
|
|
|
[], |
|
|
|
[], |
|
|
|
"drm", |
|
|
|
"drm", |
|
|
|
VaapiDriver.RadeonSI, |
|
|
|
VaapiDriver.iHD, |
|
|
|
"/dev/dri/renderD128", |
|
|
|
"/dev/dri/renderD128", |
|
|
|
Option<int>.None, |
|
|
|
Option<int>.None, |
|
|
|
false, |
|
|
|
false, |
|
|
|
@ -400,6 +400,7 @@ public class TranscodingTests |
|
|
|
None, |
|
|
|
None, |
|
|
|
Option<string>.None, |
|
|
|
Option<string>.None, |
|
|
|
_ => { }, |
|
|
|
_ => { }, |
|
|
|
|
|
|
|
canProxy: false, |
|
|
|
CancellationToken.None); |
|
|
|
CancellationToken.None); |
|
|
|
|
|
|
|
|
|
|
|
// Console.WriteLine($"ffmpeg arguments {process.Arguments}");
|
|
|
|
// Console.WriteLine($"ffmpeg arguments {process.Arguments}");
|
|
|
|
@ -410,7 +411,7 @@ public class TranscodingTests |
|
|
|
profileBitDepth, |
|
|
|
profileBitDepth, |
|
|
|
profileVideoFormat, |
|
|
|
profileVideoFormat, |
|
|
|
profileAcceleration, |
|
|
|
profileAcceleration, |
|
|
|
VaapiDriver.RadeonSI, |
|
|
|
VaapiDriver.iHD, |
|
|
|
localStatisticsProvider, |
|
|
|
localStatisticsProvider, |
|
|
|
streamingMode, |
|
|
|
streamingMode, |
|
|
|
() => videoVersion); |
|
|
|
() => videoVersion); |
|
|
|
@ -444,7 +445,14 @@ public class TranscodingTests |
|
|
|
[ValueSource(typeof(TestData), nameof(TestData.StreamingModes))] |
|
|
|
[ValueSource(typeof(TestData), nameof(TestData.StreamingModes))] |
|
|
|
StreamingMode streamingMode) |
|
|
|
StreamingMode streamingMode) |
|
|
|
{ |
|
|
|
{ |
|
|
|
NvEncSharpRedirector.Init(); |
|
|
|
try |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
NvEncSharpRedirector.Init(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
catch (FileNotFoundException) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
// do nothing
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
string file = fileToTest; |
|
|
|
string file = fileToTest; |
|
|
|
if (string.IsNullOrWhiteSpace(file)) |
|
|
|
if (string.IsNullOrWhiteSpace(file)) |
|
|
|
@ -602,7 +610,7 @@ public class TranscodingTests |
|
|
|
|
|
|
|
|
|
|
|
// TODO: bit depth
|
|
|
|
// TODO: bit depth
|
|
|
|
|
|
|
|
|
|
|
|
bool hasPadding = filterChain.VideoFilterSteps.Any(s => s is PadFilter); |
|
|
|
bool hasPadding = filterChain.VideoFilterSteps.Any(s => s is PadFilter or PadVaapiFilter); |
|
|
|
|
|
|
|
|
|
|
|
// TODO: optimize out padding
|
|
|
|
// TODO: optimize out padding
|
|
|
|
// hasPadding.ShouldBe(padding == Padding.WithPadding);
|
|
|
|
// hasPadding.ShouldBe(padding == Padding.WithPadding);
|
|
|
|
@ -699,7 +707,7 @@ public class TranscodingTests |
|
|
|
watermarks, |
|
|
|
watermarks, |
|
|
|
[], |
|
|
|
[], |
|
|
|
"drm", |
|
|
|
"drm", |
|
|
|
VaapiDriver.RadeonSI, |
|
|
|
VaapiDriver.iHD, |
|
|
|
"/dev/dri/renderD128", |
|
|
|
"/dev/dri/renderD128", |
|
|
|
Option<int>.None, |
|
|
|
Option<int>.None, |
|
|
|
false, |
|
|
|
false, |
|
|
|
@ -711,6 +719,7 @@ public class TranscodingTests |
|
|
|
None, |
|
|
|
None, |
|
|
|
Option<string>.None, |
|
|
|
Option<string>.None, |
|
|
|
PipelineAction, |
|
|
|
PipelineAction, |
|
|
|
|
|
|
|
canProxy: false, |
|
|
|
CancellationToken.None); |
|
|
|
CancellationToken.None); |
|
|
|
|
|
|
|
|
|
|
|
// Console.WriteLine($"ffmpeg arguments {string.Join(" ", process.StartInfo.ArgumentList)}");
|
|
|
|
// Console.WriteLine($"ffmpeg arguments {string.Join(" ", process.StartInfo.ArgumentList)}");
|
|
|
|
@ -721,7 +730,7 @@ public class TranscodingTests |
|
|
|
profileBitDepth, |
|
|
|
profileBitDepth, |
|
|
|
profileVideoFormat, |
|
|
|
profileVideoFormat, |
|
|
|
profileAcceleration, |
|
|
|
profileAcceleration, |
|
|
|
VaapiDriver.RadeonSI, |
|
|
|
VaapiDriver.iHD, |
|
|
|
localStatisticsProvider, |
|
|
|
localStatisticsProvider, |
|
|
|
streamingMode, |
|
|
|
streamingMode, |
|
|
|
() => v); |
|
|
|
() => v); |
|
|
|
|