From fc58cec7e238ed17ad8053598c3403c62275e38b Mon Sep 17 00:00:00 2001 From: Malte Rosenbjerg Date: Fri, 15 Apr 2022 12:08:03 +0200 Subject: [PATCH] Fix for PosterWithAudio #317 Former-commit-id: 621b3a2eebfee07fe6f8e10382b568b4404d46fa --- FFMpegCore/FFMpeg/FFMpeg.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/FFMpegCore/FFMpeg/FFMpeg.cs b/FFMpegCore/FFMpeg/FFMpeg.cs index 4e7d47a..bceea02 100644 --- a/FFMpegCore/FFMpeg/FFMpeg.cs +++ b/FFMpegCore/FFMpeg/FFMpeg.cs @@ -254,9 +254,11 @@ public static bool PosterWithAudio(string image, string audio, string output) return FFMpegArguments .FromFileInput(image, false, options => options - .Loop(1)) + .Loop(1) + .ForceFormat("image2")) .AddFileInput(audio) .OutputToFile(output, true, options => options + .ForcePixelFormat("yuv420p") .WithVideoCodec(VideoCodec.LibX264) .WithConstantRateFactor(21) .WithAudioBitrate(AudioQuality.Normal)