OdessaGUIProject.MainModel.GetPathToFFmpeg C# (CSharp) Method

GetPathToFFmpeg() static private method

Returns the outputPath to the FFMpeg executable
static private GetPathToFFmpeg ( ) : string
return string
        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;
        }