From 4b52ba567a4c5b258d8ef657df385b5a31cdfae6 Mon Sep 17 00:00:00 2001 From: Ray Date: Sun, 7 Nov 2021 14:09:50 +0000 Subject: [PATCH] Fixed: ffmpeg path --- MainForm.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/MainForm.cs b/MainForm.cs index de8f890..38003de 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -260,12 +260,13 @@ namespace VideoPreview Clear(); + string ffmpegPath = Path.GetDirectoryName(Application.ExecutablePath) + @"\ffmpeg.exe"; MediaFile inputFile = new MediaFile { Filename = filename }; - using (Engine engine = new Engine(Path.GetDirectoryName(Application.ExecutablePath) + @"\ffmpeg.exe")) + using (Engine engine = new Engine(ffmpegPath)) { try { @@ -301,7 +302,7 @@ namespace VideoPreview int thumbnailWidth = flowLayoutPanel1.ClientSize.Width - flowLayoutPanel1.Padding.Horizontal - SystemInformation.VerticalScrollBarWidth; int thumbnailHeight = (int)Math.Round(decimal.Divide((decimal)thumbnailWidth, frameRatio)); - using (Engine engine = new Engine()) + using (Engine engine = new Engine(ffmpegPath)) { for (int i = 0; i < this.CurrentSession.NoFrames; i++) {