private bool StartEncoding() { bool result = false; if (File.Exists(FFmpegFilePath) && !string.IsNullOrEmpty(Options.InputFilePath) && File.Exists(Options.InputFilePath) && !string.IsNullOrEmpty(Options.OutputFolderPath) && !string.IsNullOrEmpty(Options.OutputFileName)) { using (FFmpegCLIManager ffmpeg = new FFmpegCLIManager(FFmpegFilePath)) { ffmpeg.ShowError = true; ffmpeg.TrackEncodeProgress = true; ffmpeg.EncodeProgressChanged += Manager_EncodeProgressChanged; string outputFilePath = Options.OutputFilePath; string args = Options.GetFFmpegArgs(); result = ffmpeg.Run(args); if (result) { Helpers.OpenFolderWithFile(outputFilePath); } } } return(result); }
private bool StartEncoding() { bool result = false; if (File.Exists(FFmpegFilePath) && !string.IsNullOrEmpty(Options.InputFilePath) && File.Exists(Options.InputFilePath) && !string.IsNullOrEmpty(Options.OutputFolderPath) && !string.IsNullOrEmpty(Options.OutputFileName)) { using (ffmpeg = new FFmpegCLIManager(FFmpegFilePath)) { ffmpeg.ShowError = true; ffmpeg.TrackEncodeProgress = true; ffmpeg.EncodeProgressChanged += Manager_EncodeProgressChanged; try { string outputFilePath = Options.OutputFilePath; string args = Options.Arguments; result = ffmpeg.Run(args); if (Options.AutoOpenFolder && result && !ffmpeg.StopRequested) { Helpers.OpenFolderWithFile(outputFilePath); } } catch (Exception e) { e.ShowError(); } } } return(result); }
private bool StartEncoding() { bool result = false; if (!string.IsNullOrEmpty(Options.InputFilePath) && File.Exists(Options.InputFilePath) && !string.IsNullOrEmpty(Options.OutputFolderPath) && !string.IsNullOrEmpty(Options.OutputFileName)) { using (FFmpegCLIManager manager = new FFmpegCLIManager(FFmpegFilePath)) { manager.ShowError = true; string outputFilePath = Options.OutputFilePath; string args = Options.GetFFmpegArgs(); result = manager.Run(args); if (result) { Helpers.OpenFolderWithFile(outputFilePath); } } } return(result); }