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 void UpdateVideoInfo() { using (FFmpegCLIManager ffmpeg = new FFmpegCLIManager(FFmpegPath)) { VideoInfo = ffmpeg.GetVideoInfo(MediaPath); } }
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); }
public VideoThumbnailer(string mediaPath, string ffmpegPath, VideoThumbnailOptions options) { MediaPath = mediaPath; FFmpegPath = ffmpegPath; Options = options; using (FFmpegCLIManager ffmpegCLI = new FFmpegCLIManager(FFmpegPath)) { VideoInfo = ffmpegCLI.GetVideoInfo(MediaPath); } }
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); }