Adjusted FFMpegCore.Examples for separate FFMpegCore.Extensions.SkiaSharp project

This commit is contained in:
Dimitri Vranken 2023-02-16 10:25:42 +01:00
parent cc22d15061
commit 315c1e1a91
2 changed files with 3 additions and 2 deletions

View file

@ -7,6 +7,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\FFMpegCore.Extensions.SkiaSharp\FFMpegCore.Extensions.SkiaSharp.csproj" />
<ProjectReference Include="..\FFMpegCore.Extensions.System.Drawing.Common\FFMpegCore.Extensions.System.Drawing.Common.csproj" />
<ProjectReference Include="..\FFMpegCore\FFMpegCore.csproj" />
</ItemGroup>

View file

@ -3,7 +3,6 @@
using FFMpegCore.Enums;
using FFMpegCore.Extensions.System.Drawing.Common;
using FFMpegCore.Pipes;
using SkiaSharp;
var inputPath = "/path/to/input";
var outputPath = "/path/to/output";
@ -80,7 +79,8 @@ await FFMpegArguments
FFMpeg.PosterWithAudio(inputPath, inputAudioPath, outputPath);
// or
#pragma warning disable CA1416
using var image = SKBitmap.Decode(inputImagePath);
using var image = Image.FromFile(inputImagePath); // Using FFMpegCore.Extensions.System.Drawing.Common
//using var image = SKBitmap.Decode(inputImagePath); // Using FFMpegCore.Extensions.SkiaSharp
image.AddAudio(inputAudioPath, outputPath);
#pragma warning restore CA1416
}