Fixed: ffmpeg path

This commit is contained in:
Ray 2021-11-07 14:09:50 +00:00
parent 2bed5a85d1
commit 4b52ba567a

View File

@ -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++)
{