public Library() { MMToolsConfiguration.Register(); var ffRunner = new MMRunner(MMAppType.FFMPEG); ffmpegPath = (string)ffRunner.GetType().GetProperty("ApplicationPath", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ffRunner); AppContext.SetSwitch("System.Net.Http.UseSocketsHttpHandler", false); }
public Library() { MMToolsConfiguration.Register(); var ffRunner = new MMRunner(MMAppType.FFMPEG); var pathField = (string)ffRunner.GetType().GetProperty("ApplicationPath", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ffRunner); if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { pathField = pathField + ".exe"; } ffmpeg = new Engine(pathField); }