Added VideoCodec.LibX265 (#276)

This commit is contained in:
Malte Rosenbjerg 2021-11-03 18:53:38 +01:00
parent 936da48ca2
commit 0f82509c41
2 changed files with 14 additions and 0 deletions

View file

@ -72,6 +72,19 @@ public void Video_ToMP4_Args()
Assert.IsTrue(success); Assert.IsTrue(success);
} }
[TestMethod, Timeout(10000)]
public void Video_ToH265_MKV_Args()
{
using var outputFile = new TemporaryFile($"out.mkv");
var success = FFMpegArguments
.FromFileInput(TestResources.WebmVideo)
.OutputToFile(outputFile, false, opt => opt
.WithVideoCodec(VideoCodec.LibX265))
.ProcessSynchronously();
Assert.IsTrue(success);
}
[DataTestMethod, Timeout(10000)] [DataTestMethod, Timeout(10000)]
[DataRow(System.Drawing.Imaging.PixelFormat.Format24bppRgb)] [DataRow(System.Drawing.Imaging.PixelFormat.Format24bppRgb)]
[DataRow(System.Drawing.Imaging.PixelFormat.Format32bppArgb)] [DataRow(System.Drawing.Imaging.PixelFormat.Format32bppArgb)]

View file

@ -12,6 +12,7 @@ public enum CodecType
public static class VideoCodec public static class VideoCodec
{ {
public static Codec LibX264 => FFMpeg.GetCodec("libx264"); public static Codec LibX264 => FFMpeg.GetCodec("libx264");
public static Codec LibX265 => FFMpeg.GetCodec("libx265");
public static Codec LibVpx => FFMpeg.GetCodec("libvpx"); public static Codec LibVpx => FFMpeg.GetCodec("libvpx");
public static Codec LibTheora => FFMpeg.GetCodec("libtheora"); public static Codec LibTheora => FFMpeg.GetCodec("libtheora");
public static Codec Png => FFMpeg.GetCodec("png"); public static Codec Png => FFMpeg.GetCodec("png");