From 1f3d1ec429235fa20f29ce4f49b3536b3f1205c1 Mon Sep 17 00:00:00 2001 From: Malte Rosenbjerg Date: Sat, 7 Aug 2021 14:40:58 +0200 Subject: [PATCH] Move Loop(1) to image FileInput. Fix for #206 Former-commit-id: 914003ee3252869d3f2846d2e0427f65fca68ff2 --- FFMpegCore/FFMpeg/FFMpeg.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FFMpegCore/FFMpeg/FFMpeg.cs b/FFMpegCore/FFMpeg/FFMpeg.cs index 42c344b..2928e29 100644 --- a/FFMpegCore/FFMpeg/FFMpeg.cs +++ b/FFMpegCore/FFMpeg/FFMpeg.cs @@ -231,10 +231,10 @@ public static bool PosterWithAudio(string image, string audio, string output) FFMpegHelper.ConversionSizeExceptionCheck(Image.FromFile(image)); return FFMpegArguments - .FromFileInput(image) + .FromFileInput(image, false, options => options + .Loop(1)) .AddFileInput(audio) .OutputToFile(output, true, options => options - .Loop(1) .WithVideoCodec(VideoCodec.LibX264) .WithConstantRateFactor(21) .WithAudioBitrate(AudioQuality.Normal)