0

so I am writing a c# application which uses ffmpeg to upscale videos. Currently, it checks if ffmpeg is installed, and if not, prompts the user to install it.

{
        if (File.Exists(@"C:\ffmpeg-2020-12-27-git-bff6fbead8-full_build\bin\ffmpeg.exe"))
        {
            
        MessageBox.Show("Please note that this will only upsalce a video, it will not remaster it. Program C 2020 Keifmeister Technologies. Aka this will clear up the image but not upgrade character models or anything. Cheers.");
    }
    else
    {
        MessageBox.Show("You need to have ffmpeg installed, and you do not. Opening download link, please extract the downloaded zip file to root of yout c:\\ drive. Thanks.");
        Process.Start("https://github.com/GyanD/codexffmpeg/releases/download/2020-12-27-git-bff6fbead8/ffmpeg-2020-12-27-git-bff6fbead8-full_build.zip");
    }
}

I am wondering, is there instead a way to install ffmpeg automatically and print its install location as a string? Thanks very much.

  • https://www.nuget.org/packages/Xabe.FFmpeg.Downloader/ or https://learn.microsoft.com/en-us/dotnet/api/system.net.webclient.downloadfile?view=net-5.0 – Martheen Jan 25 '21 at 00:28
  • 1
    You can try to add the ffmpeg exe to project and set "Copy to output Directory" to "Copy Always". Refer to [How to add External .exe to my C# project?](https://stackoverflow.com/questions/51326810/how-to-add-external-exe-to-my-c-sharp-project/51326915) and [Add an EXE file to a project...](https://stackoverflow.com/questions/18728406/add-an-exe-file-to-a-project-so-that-it-will-be-copied-to-the-bin-debug-folder/18728469). – 大陸北方網友 Jan 25 '21 at 01:28

0 Answers0