private void ConversionEnded(object sender, ffmpeg.FinishedEventArgs e) { // Set ended boolean and close form ended = true; if (e.Error()) MessageBox.Show(e.ErrorOutput(), "Unable to Convert", MessageBoxButtons.OK, MessageBoxIcon.Error); BeginInvoke((MethodInvoker)delegate { this.Close(); }); }
private void ProgressUpdate(object sender, ffmpeg.ProgressEventArgs e) { BeginInvoke((MethodInvoker)delegate { // Change from marquee to continuous progress bar if (conversionProgressBar.Style != ProgressBarStyle.Continuous) conversionProgressBar.Style = ProgressBarStyle.Continuous; // Update percentage complete conversionProgressBar.Value = e.EncoderOutput(); }); }
private void ProgressUpdate(object sender, ffmpeg.ProgressEventArgs e) { BeginInvoke((MethodInvoker)delegate { // Change from marquee to continuous progress bar if (conversionProgressBar.Style != ProgressBarStyle.Continuous) conversionProgressBar.Style = ProgressBarStyle.Continuous; // Update progress conversionProgressBar.Value = e.Percentage(); if (ffmpeg.twoPass) detailsLabel.Text = "Frames per Second: " + e.FPS() + " - Current Bitrate: " + e.Bitrate() + " - Pass: "******"Frames per Second: " + e.FPS() + " - Current Bitrate: " + e.Bitrate(); else detailsLabel.Text = "Current Bitrate: " + e.Bitrate(); }); }