internal static string GetPathToFFmpeg()
{
string ffmpegPath = "";
try
{
var thisexe = new FileInfo(Assembly.GetExecutingAssembly().Location);
if (thisexe.DirectoryName != null) ffmpegPath = Path.Combine(thisexe.DirectoryName, "ffmpeg.exe");
}
catch (Exception ex)
{
Logger.Error("Exception: " + ex);
}
if (File.Exists(ffmpegPath) == false)
{
ffmpegPath = Path.Combine(Environment.CurrentDirectory, "ffmpeg.exe"); // fallback
}
Logger.Info("Returning " + ffmpegPath);
return ffmpegPath;
}