mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2025-01-18 20:46:43 +00:00
Updated example program to avoid commented-out code
This commit is contained in:
parent
01a33f9a1f
commit
b63258217d
1 changed files with 8 additions and 3 deletions
|
@ -2,7 +2,10 @@
|
|||
using FFMpegCore;
|
||||
using FFMpegCore.Enums;
|
||||
using FFMpegCore.Extensions.System.Drawing.Common;
|
||||
using FFMpegCore.Extensions.SkiaSharp;
|
||||
using FFMpegCore.Pipes;
|
||||
using SkiaSharp;
|
||||
using FFMpegImage = FFMpegCore.Extensions.System.Drawing.Common.FFMpegImage;
|
||||
|
||||
var inputPath = "/path/to/input";
|
||||
var outputPath = "/path/to/output";
|
||||
|
@ -77,12 +80,14 @@ await FFMpegArguments
|
|||
var inputImagePath = "/path/to/input/image";
|
||||
{
|
||||
FFMpeg.PosterWithAudio(inputPath, inputAudioPath, outputPath);
|
||||
// or
|
||||
// or using FFMpegCore.Extensions.System.Drawing.Common
|
||||
#pragma warning disable CA1416
|
||||
using var image = Image.FromFile(inputImagePath); // Using FFMpegCore.Extensions.System.Drawing.Common
|
||||
//using var image = SKBitmap.Decode(inputImagePath); // Using FFMpegCore.Extensions.SkiaSharp
|
||||
using var image = Image.FromFile(inputImagePath);
|
||||
image.AddAudio(inputAudioPath, outputPath);
|
||||
#pragma warning restore CA1416
|
||||
// or using FFMpegCore.Extensions.SkiaSharp
|
||||
using var skiaSharpImage = SKBitmap.Decode(inputImagePath);
|
||||
skiaSharpImage.AddAudio(inputAudioPath, outputPath);
|
||||
}
|
||||
|
||||
IVideoFrame GetNextFrame() => throw new NotImplementedException();
|
||||
|
|
Loading…
Reference in a new issue