using Model;\r
using Parsing;\r
using Presets;\r
+ using Properties;\r
using Services;\r
\r
public partial class frmMain : Form\r
private Preset CurrentlySelectedPreset;\r
private DVD currentSource;\r
private Scan SourceScan = new Scan();\r
+ private List<DriveInformation> drives;\r
\r
// Delegates **********************************************************\r
private delegate void UpdateWindowHandler();\r
// Load and setup the splash screen in this thread\r
splash = new frmSplashScreen();\r
splash.Show(this);\r
- Label lblStatus = new Label {Size = new Size(150, 20), Location = new Point(182, 102)};\r
+ Label lblStatus = new Label { Size = new Size(150, 20), Location = new Point(182, 102) };\r
splash.Controls.Add(lblStatus);\r
\r
InitializeComponent();\r
x264Panel.Reset2Defaults();\r
\r
QueryParser presetQuery = QueryParser.Parse(query);\r
- PresetLoader.LoadPreset(this, presetQuery, Properties.Settings.Default.defaultPreset, \r
+ PresetLoader.LoadPreset(this, presetQuery, Properties.Settings.Default.defaultPreset,\r
loadPictureSettings);\r
\r
x264Panel.X264_StandardizeOptString();\r
}\r
catch (Exception ex)\r
{\r
- if ((bool) result.AsyncState)\r
+ if ((bool)result.AsyncState)\r
MessageBox.Show(\r
- "Unable to check for updates, Please try again later.\n\nDetailed Error Information:\n" + ex, \r
+ "Unable to check for updates, Please try again later.\n\nDetailed Error Information:\n" + ex,\r
"Error", MessageBoxButtons.OK, MessageBoxIcon.Error);\r
}\r
}\r
{\r
DialogResult result =\r
MessageBox.Show(\r
- "HandBrake has detected unfinished items on the queue from the last time the application was launched. Would you like to recover these?", \r
+ "HandBrake has detected unfinished items on the queue from the last time the application was launched. Would you like to recover these?",\r
"Queue Recovery Possible", MessageBoxButtons.YesNo, MessageBoxIcon.Question);\r
\r
if (result == DialogResult.Yes)\r
LoadPresetPanel();\r
if (treeView_presets.Nodes.Count == 0)\r
MessageBox.Show(\r
- "Unable to load the presets.xml file. Please select \"Update Built-in Presets\" from the Presets Menu. \nMake sure you are running the program in Admin mode if running on Vista. See Windows FAQ for details!", \r
+ "Unable to load the presets.xml file. Please select \"Update Built-in Presets\" from the Presets Menu. \nMake sure you are running the program in Admin mode if running on Vista. See Windows FAQ for details!",\r
"Error", MessageBoxButtons.OK, MessageBoxIcon.Error);\r
else\r
MessageBox.Show("Presets have been updated!", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Information);\r
\r
private void btn_new_preset_Click(object sender, EventArgs e)\r
{\r
- Form preset = new frmAddPreset(this, QueryGenerator.GenerateCliQuery(this, drop_mode.SelectedIndex, 0, null), \r
+ Form preset = new frmAddPreset(this, QueryGenerator.GenerateCliQuery(this, drop_mode.SelectedIndex, 0, null),\r
presetHandler);\r
preset.ShowDialog();\r
}\r
updateWindow.ShowDialog();\r
}\r
else\r
- MessageBox.Show("There are no new updates at this time.", "Update Check", MessageBoxButtons.OK, \r
+ MessageBox.Show("There are no new updates at this time.", "Update Check", MessageBoxButtons.OK,\r
MessageBoxIcon.Information);\r
lbl_updateCheck.Visible = false;\r
return;\r
}\r
catch (Exception ex)\r
{\r
- if ((bool) result.AsyncState)\r
+ if ((bool)result.AsyncState)\r
MessageBox.Show(\r
- "Unable to check for updates, Please try again later.\n\nDetailed Error Information:\n" + ex, \r
+ "Unable to check for updates, Please try again later.\n\nDetailed Error Information:\n" + ex,\r
"Error", MessageBoxButtons.OK, MessageBoxIcon.Error);\r
}\r
}\r
DialogResult result =\r
MessageBox.Show(\r
"Do you wish to include picture settings when updating the preset: " +\r
- treeView_presets.SelectedNode.Text, "Update Preset", MessageBoxButtons.YesNoCancel, \r
+ treeView_presets.SelectedNode.Text, "Update Preset", MessageBoxButtons.YesNoCancel,\r
MessageBoxIcon.Question);\r
if (result == DialogResult.Yes)\r
- presetHandler.Update(treeView_presets.SelectedNode.Text, \r
+ presetHandler.Update(treeView_presets.SelectedNode.Text,\r
QueryGenerator.GenerateTabbedComponentsQuery(this), true);\r
else if (result == DialogResult.No)\r
- presetHandler.Update(treeView_presets.SelectedNode.Text, \r
+ presetHandler.Update(treeView_presets.SelectedNode.Text,\r
QueryGenerator.GenerateTabbedComponentsQuery(this), false);\r
}\r
\r
\r
private void btn_removePreset_Click(object sender, EventArgs e)\r
{\r
- DialogResult result = MessageBox.Show("Are you sure you wish to delete the selected preset?", "Preset", \r
+ DialogResult result = MessageBox.Show("Are you sure you wish to delete the selected preset?", "Preset",\r
MessageBoxButtons.YesNo, MessageBoxIcon.Question);\r
if (result == DialogResult.Yes)\r
{\r
{\r
if (treeView_presets.SelectedNode != null)\r
{\r
- DialogResult result = MessageBox.Show("Are you sure you wish to set this preset as the default?", \r
+ DialogResult result = MessageBox.Show("Are you sure you wish to set this preset as the default?",\r
"Preset", MessageBoxButtons.YesNo, MessageBoxIcon.Question);\r
if (result == DialogResult.Yes)\r
{\r
{\r
if (e.KeyCode == Keys.Delete)\r
{\r
- DialogResult result = MessageBox.Show("Are you sure you wish to delete the selected preset?", "Preset", \r
+ DialogResult result = MessageBox.Show("Are you sure you wish to delete the selected preset?", "Preset",\r
MessageBoxButtons.YesNo, MessageBoxIcon.Question);\r
if (result == DialogResult.Yes)\r
{\r
if (presetHandler.CheckIfUserPresetExists(parsed.PresetName + " (Imported)"))\r
{\r
DialogResult result =\r
- MessageBox.Show("This preset appears to already exist. Would you like to overwrite it?", \r
- "Overwrite preset?", \r
+ MessageBox.Show("This preset appears to already exist. Would you like to overwrite it?",\r
+ "Overwrite preset?",\r
MessageBoxButtons.YesNo, MessageBoxIcon.Warning);\r
if (result == DialogResult.Yes)\r
{\r
PresetLoader.LoadPreset(this, parsed, parsed.PresetName, parsed.UsesPictureSettings);\r
- presetHandler.Update(parsed.PresetName + " (Imported)", \r
- QueryGenerator.GenerateCliQuery(this, drop_mode.SelectedIndex, 0, null), \r
+ presetHandler.Update(parsed.PresetName + " (Imported)",\r
+ QueryGenerator.GenerateCliQuery(this, drop_mode.SelectedIndex, 0, null),\r
parsed.UsesPictureSettings);\r
}\r
}\r
else\r
{\r
PresetLoader.LoadPreset(this, parsed, parsed.PresetName, parsed.UsesPictureSettings);\r
- presetHandler.Add(parsed.PresetName, \r
- QueryGenerator.GenerateCliQuery(this, drop_mode.SelectedIndex, 0, null), \r
+ presetHandler.Add(parsed.PresetName,\r
+ QueryGenerator.GenerateCliQuery(this, drop_mode.SelectedIndex, 0, null),\r
parsed.UsesPictureSettings);\r
\r
- if (presetHandler.Add(parsed.PresetName + " (Imported)", \r
- QueryGenerator.GenerateCliQuery(this, drop_mode.SelectedIndex, 0, null), \r
+ if (presetHandler.Add(parsed.PresetName + " (Imported)",\r
+ QueryGenerator.GenerateCliQuery(this, drop_mode.SelectedIndex, 0, null),\r
parsed.UsesPictureSettings))\r
{\r
TreeNode preset_treeview = new TreeNode(parsed.PresetName + " (Imported)")\r
{\r
- ForeColor = Color.Black\r
+ ForeColor = Color.Black\r
};\r
treeView_presets.Nodes.Add(preset_treeview);\r
}\r
\r
private void btn_source_Click(object sender, EventArgs e)\r
{\r
- mnu_dvd_drive.Visible = true;\r
+ // Remove old Drive Menu Items.\r
+ List<ToolStripMenuItem> itemsToRemove = new List<ToolStripMenuItem>();\r
+ foreach (var item in btn_source.DropDownItems)\r
+ {\r
+ if (item.GetType() == typeof(ToolStripMenuItem))\r
+ {\r
+ ToolStripMenuItem menuItem = (ToolStripMenuItem)item;\r
+ if (menuItem.Name.StartsWith("Drive"))\r
+ {\r
+ itemsToRemove.Add(menuItem);\r
+ }\r
+ }\r
+ }\r
+\r
+ foreach (ToolStripMenuItem item in itemsToRemove)\r
+ btn_source.DropDownItems.Remove(item);\r
+\r
Thread driveInfoThread = new Thread(SetDriveSelectionMenuItem);\r
driveInfoThread.Start();\r
}\r
!Properties.Settings.Default.showCliForInGuiEncodeStatus)\r
{\r
result = MessageBox.Show(\r
- "Are you sure you wish to cancel the encode?\n\nPlease note, when 'Enable in-GUI encode status' is enabled, stopping this encode will render the file unplayable. ", \r
+ "Are you sure you wish to cancel the encode?\n\nPlease note, when 'Enable in-GUI encode status' is enabled, stopping this encode will render the file unplayable. ",\r
"Cancel Encode?", MessageBoxButtons.YesNo, MessageBoxIcon.Question);\r
}\r
else\r
{\r
- result = MessageBox.Show("Are you sure you wish to cancel the encode?", "Cancel Encode?", \r
+ result = MessageBox.Show("Are you sure you wish to cancel the encode?", "Cancel Encode?",\r
MessageBoxButtons.YesNo, MessageBoxIcon.Question);\r
}\r
\r
"priority over the GUI, your recently updated settings will not be taken " +\r
"into account when encoding this job." +\r
Environment.NewLine + Environment.NewLine +\r
- "Do you want to replace the manual query with the updated GUI-generated query?", \r
- "Manual Query does not Match GUI", \r
- MessageBoxButtons.YesNoCancel, MessageBoxIcon.Asterisk, \r
+ "Do you want to replace the manual query with the updated GUI-generated query?",\r
+ "Manual Query does not Match GUI",\r
+ MessageBoxButtons.YesNoCancel, MessageBoxIcon.Asterisk,\r
MessageBoxDefaultButton.Button3);\r
\r
switch (result)\r
if (File.Exists(text_destination.Text))\r
overwrite =\r
MessageBox.Show(\r
- "The destination file already exists. Are you sure you want to overwrite it?", \r
+ "The destination file already exists. Are you sure you want to overwrite it?",\r
"Overwrite File?", MessageBoxButtons.YesNo, MessageBoxIcon.Question);\r
\r
if (overwrite == DialogResult.Yes)\r
this.Focus();\r
}\r
else if (string.IsNullOrEmpty(sourcePath) || string.IsNullOrEmpty(text_destination.Text))\r
- MessageBox.Show("No source or destination selected.", "Warning", MessageBoxButtons.OK, \r
+ MessageBox.Show("No source or destination selected.", "Warning", MessageBoxButtons.OK,\r
MessageBoxIcon.Warning);\r
}\r
}\r
private void btn_add2Queue_Click(object sender, EventArgs e)\r
{\r
if (string.IsNullOrEmpty(sourcePath) || string.IsNullOrEmpty(text_destination.Text))\r
- MessageBox.Show("No source or destination selected.", "Warning", MessageBoxButtons.OK, \r
+ MessageBox.Show("No source or destination selected.", "Warning", MessageBoxButtons.OK,\r
MessageBoxIcon.Warning);\r
else\r
{\r
{\r
DialogResult result =\r
MessageBox.Show(\r
- "There is already a queue item for this destination path. \n\n If you continue, the encode will be overwritten. Do you wish to continue?", \r
+ "There is already a queue item for this destination path. \n\n If you continue, the encode will be overwritten. Do you wish to continue?",\r
"Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);\r
if (result == DialogResult.Yes)\r
encodeQueue.Add(query, sourcePath, text_destination.Text, (rtf_query.Text != string.Empty));\r
private void tb_preview_Click(object sender, EventArgs e)\r
{\r
if (string.IsNullOrEmpty(sourcePath) || string.IsNullOrEmpty(text_destination.Text))\r
- MessageBox.Show("No source or destination selected.", "Warning", MessageBoxButtons.OK, \r
+ MessageBox.Show("No source or destination selected.", "Warning", MessageBoxButtons.OK,\r
MessageBoxIcon.Warning);\r
else\r
{\r
qtpreview.Show();\r
}\r
else\r
- MessageBox.Show(qtpreview, "The preview window is already open!", "Warning", MessageBoxButtons.OK, \r
+ MessageBox.Show(qtpreview, "The preview window is already open!", "Warning", MessageBoxButtons.OK,\r
MessageBoxIcon.Warning);\r
}\r
}\r
\r
private void mnu_dvd_drive_Click(object sender, EventArgs e)\r
{\r
- if (this.dvdDrivePath == null) return;\r
- this.selectedSourceType = SourceType.DvdDrive;\r
- SelectSource(this.dvdDrivePath);\r
+ ToolStripMenuItem item = sender as ToolStripMenuItem;\r
+ if (item != null)\r
+ {\r
+ string driveId = item.Name.Replace("Drive", string.Empty);\r
+ int id;\r
+ if (int.TryParse(driveId, out id))\r
+ {\r
+\r
+ this.dvdDrivePath = drives[id].RootDirectory;\r
+ this.dvdDriveLabel = drives[id].VolumeLabel;\r
+\r
+ if (this.dvdDrivePath == null) return;\r
+ this.selectedSourceType = SourceType.DvdDrive;\r
+ SelectSource(this.dvdDrivePath);\r
+ }\r
+ }\r
}\r
\r
private void SelectSource(string file)\r
{\r
if ((drp_dvdtitle.Items.Count == 1) && (drp_dvdtitle.Items[0].ToString() == "Automatic"))\r
MessageBox.Show(\r
- "There are no titles to select. Please load a source file by clicking the 'Source' button above before trying to select a title.", \r
+ "There are no titles to select. Please load a source file by clicking the 'Source' button above before trying to select a title.",\r
"Alert", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);\r
}\r
\r
text_destination.Text = autoPath;\r
else\r
MessageBox.Show(\r
- "You currently have \"Automatically name output files\" enabled for the destination file box, but you do not have a default directory set.\n\nYou should set a \"Default Path\" in HandBrakes preferences. (See 'Tools' menu -> 'Options' -> 'General' Tab -> 'Default Path')", \r
+ "You currently have \"Automatically name output files\" enabled for the destination file box, but you do not have a default directory set.\n\nYou should set a \"Default Path\" in HandBrakes preferences. (See 'Tools' menu -> 'Options' -> 'General' Tab -> 'Default Path')",\r
"Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
}\r
\r
if (drop_mode.SelectedIndex != 0) // Function is not used if we are not in chapters mode.\r
return;\r
\r
- Control ctl = (Control) sender;\r
+ Control ctl = (Control)sender;\r
int chapterStart, chapterEnd;\r
int.TryParse(drop_chapterStart.Text, out chapterStart);\r
int.TryParse(drop_chapterFinish.Text, out chapterEnd);\r
int n = data_chpt.Rows.Add();\r
data_chpt.Rows[n].Cells[0].Value = (i + 1);\r
data_chpt.Rows[n].Cells[1].Value = "Chapter " + (i + 1);\r
- data_chpt.Rows[n].Cells[0].ValueType = typeof (int);\r
- data_chpt.Rows[n].Cells[1].ValueType = typeof (string);\r
+ data_chpt.Rows[n].Cells[0].ValueType = typeof(int);\r
+ data_chpt.Rows[n].Cells[1].ValueType = typeof(string);\r
i++;\r
}\r
}\r
case 2:\r
if (selectedTitle != null)\r
{\r
- duration = duration/selectedTitle.Fps;\r
+ duration = duration / selectedTitle.Fps;\r
lbl_duration.Text = TimeSpan.FromSeconds(duration).ToString();\r
}\r
else\r
if (selectedTitle != null)\r
{\r
drop_chapterStart.Text = "0";\r
- drop_chapterFinish.Text = (selectedTitle.Fps*selectedTitle.Duration.TotalSeconds).ToString();\r
+ drop_chapterFinish.Text = (selectedTitle.Fps * selectedTitle.Duration.TotalSeconds).ToString();\r
}\r
return;\r
}\r
{\r
case 1:\r
if (\r
- !Path.GetExtension(DVD_Save.FileName).Equals(".mp4", \r
+ !Path.GetExtension(DVD_Save.FileName).Equals(".mp4",\r
StringComparison.InvariantCultureIgnoreCase))\r
if (Properties.Settings.Default.useM4v)\r
DVD_Save.FileName = DVD_Save.FileName.Replace(".mp4", ".m4v").Replace(".mkv", ".m4v");\r
break;\r
case 2:\r
if (\r
- !Path.GetExtension(DVD_Save.FileName).Equals(".mkv", \r
+ !Path.GetExtension(DVD_Save.FileName).Equals(".mkv",\r
StringComparison.InvariantCultureIgnoreCase))\r
DVD_Save.FileName = DVD_Save.FileName.Replace(".mp4", ".mkv").Replace(".m4v", ".mkv");\r
break;\r
\r
CultureInfo culture = CultureInfo.CreateSpecificCulture("en-US");\r
double cqStep = Properties.Settings.Default.x264cqstep;\r
- double multiplier = 1.0/cqStep;\r
- double value = slider_videoQuality.Value*multiplier;\r
+ double multiplier = 1.0 / cqStep;\r
+ double value = slider_videoQuality.Value * multiplier;\r
\r
switch (Properties.Settings.Default.x264cqstep.ToString(culture))\r
{\r
break;\r
}\r
if (value < slider_videoQuality.Maximum)\r
- slider_videoQuality.Value = slider_videoQuality.Maximum - (int) value;\r
+ slider_videoQuality.Value = slider_videoQuality.Maximum - (int)value;\r
\r
break;\r
case "VP3 (Theora)":\r
{\r
// Work out the current RF value.\r
double cqStep = _cachedCqStep;\r
- double rfValue = 51.0 - slider_videoQuality.Value*cqStep;\r
+ double rfValue = 51.0 - slider_videoQuality.Value * cqStep;\r
\r
// Change the maximum value for the slider\r
switch (Properties.Settings.Default.x264cqstep.ToString(new CultureInfo("en-US")))\r
\r
// Reset the CQ slider back to the previous value as close as possible\r
double cqStepNew = Properties.Settings.Default.x264cqstep;\r
- double rfValueCurrent = 51.0 - slider_videoQuality.Value*cqStepNew;\r
+ double rfValueCurrent = 51.0 - slider_videoQuality.Value * cqStepNew;\r
while (rfValueCurrent < rfValue)\r
{\r
slider_videoQuality.Value--;\r
- rfValueCurrent = 51.0 - slider_videoQuality.Value*cqStepNew;\r
+ rfValueCurrent = 51.0 - slider_videoQuality.Value * cqStepNew;\r
}\r
\r
// Cache the CQ step for the next calculation\r
lbl_SliderValue.Text = "QP:" + (32 - slider_videoQuality.Value);\r
break;\r
case "H.264 (x264)":\r
- double rfValue = 51.0 - slider_videoQuality.Value*cqStep;\r
+ double rfValue = 51.0 - slider_videoQuality.Value * cqStep;\r
rfValue = Math.Round(rfValue, 2);\r
lbl_SliderValue.Text = "RF:" + rfValue.ToString(new CultureInfo("en-US"));\r
break;\r
if (drp_dvdtitle.Items.Count == 0)\r
{\r
MessageBox.Show(\r
- "No Title(s) found. \n\nYour Source may be copy protected, badly mastered or in a format which HandBrake does not support. \nPlease refer to the Documentation and FAQ (see Help Menu).", \r
+ "No Title(s) found. \n\nYour Source may be copy protected, badly mastered or in a format which HandBrake does not support. \nPlease refer to the Documentation and FAQ (see Help Menu).",\r
"Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);\r
sourcePath = string.Empty;\r
}\r
}\r
catch (Exception exc)\r
{\r
- MessageBox.Show("frmMain.cs - updateUIafterScan " + exc, "Error", MessageBoxButtons.OK, \r
+ MessageBox.Show("frmMain.cs - updateUIafterScan " + exc, "Error", MessageBoxButtons.OK,\r
MessageBoxIcon.Error);\r
EnableGUI();\r
}\r
return;\r
}\r
\r
- List<DriveInformation> drives = Main.GetDrives();\r
+ drives = Main.GetDrives();\r
\r
- if (drives.Count == 0)\r
+ List<ToolStripMenuItem> menuItems = new List<ToolStripMenuItem>();\r
+ foreach (DriveInformation drive in drives)\r
{\r
- mnu_dvd_drive.Text = "[No DVD Drive Ready]";\r
- return;\r
+ ToolStripMenuItem menuItem = new ToolStripMenuItem();\r
+ menuItem.Name = drive.ToString();\r
+ menuItem.Text = drive.RootDirectory + " (" + drive.VolumeLabel + ")";\r
+ menuItem.Image = Resources.disc_small;\r
+ menuItem.Click += new EventHandler(mnu_dvd_drive_Click);\r
+ menuItems.Add(menuItem);\r
}\r
\r
- this.dvdDrivePath = drives[0].RootDirectory;\r
- this.dvdDriveLabel = drives[0].VolumeLabel;\r
- mnu_dvd_drive.Text = this.dvdDrivePath + " (" + this.dvdDriveLabel + ")";\r
+ foreach (ToolStripMenuItem item in menuItems)\r
+ btn_source.DropDownItems.Add(item);\r
}\r
- catch (Exception)\r
+ catch (Exception exc)\r
{\r
- mnu_dvd_drive.Text = "[No DVD Drive Ready / Found]";\r
+ MessageBox.Show("Error in SetDriveSelectionMenuItem" + exc);\r
}\r
}\r
\r
{\r
if (presetHandler.CheckIfPresetsAreOutOfDate())\r
if (!Properties.Settings.Default.presetNotification)\r
- MessageBox.Show(splash, \r
- "HandBrake has determined your built-in presets are out of date... These presets will now be updated.", \r
+ MessageBox.Show(splash,\r
+ "HandBrake has determined your built-in presets are out of date... These presets will now be updated.",\r
"Preset Update", MessageBoxButtons.OK, MessageBoxIcon.Information);\r
\r
presetHandler.GetPresetPanel(ref treeView_presets);\r
{\r
DialogResult result =\r
MessageBox.Show(\r
- "HandBrake has queue items to process. Closing HandBrake will not stop the current encoding, but will stop processing the queue.\n\nDo you want to close HandBrake?", \r
+ "HandBrake has queue items to process. Closing HandBrake will not stop the current encoding, but will stop processing the queue.\n\nDo you want to close HandBrake?",\r
"Close HandBrake?", MessageBoxButtons.YesNo, MessageBoxIcon.Question);\r
if (result == DialogResult.No)\r
e.Cancel = true;\r
/// <param name="CurrentFps"></param>\r
/// <param name="AverageFps"></param>\r
/// <param name="TimeRemaining"></param>\r
- private void EncodeOnEncodeProgress(object Sender, int CurrentTask, int TaskCount, float PercentComplete, \r
+ private void EncodeOnEncodeProgress(object Sender, int CurrentTask, int TaskCount, float PercentComplete,\r
float CurrentFps, float AverageFps, TimeSpan TimeRemaining)\r
{\r
if (this.InvokeRequired)\r
{\r
- this.BeginInvoke(new EncodeProgressEventHandler(EncodeOnEncodeProgress), \r
+ this.BeginInvoke(new EncodeProgressEventHandler(EncodeOnEncodeProgress),\r
new[]\r
{\r
Sender, CurrentTask, TaskCount, PercentComplete, CurrentFps, AverageFps, \r
return;\r
}\r
lbl_encode.Text =\r
- string.Format("Encode Progress: {0}%, FPS: {1}, Avg FPS: {2}, Time Remaining: {3} ", \r
+ string.Format("Encode Progress: {0}%, FPS: {1}, Avg FPS: {2}, Time Remaining: {3} ",\r
PercentComplete, CurrentFps, AverageFps, TimeRemaining);\r
}\r
\r