2 using System.Collections.Generic;
\r
3 using System.ComponentModel;
\r
5 using System.Drawing;
\r
7 using System.Windows.Forms;
\r
12 public partial class frmMain : Form
\r
16 InitializeComponent();
\r
19 // --------------------------------------------------------------
\r
20 // onLoad - setup the program ready for use.
\r
21 // --------------------------------------------------------------
\r
22 private void frmMain_Load(object sender, EventArgs e)
\r
24 // Set the Version number lable to the corect version.
\r
25 Version.Text = "Version " + Properties.Settings.Default.GuiVersion;
\r
27 // Run the update checker.
\r
30 // Now load the users default if required.
\r
35 public void loadUserDefaults()
\r
39 if (Properties.Settings.Default.defaultSettings == "Checked")
\r
42 text_source.Text = Properties.Settings.Default.DVDSource;
\r
43 drp_dvdtitle.Text = Properties.Settings.Default.DVDTitle;
\r
44 drop_chapterStart.Text = Properties.Settings.Default.ChapterStart;
\r
45 drop_chapterFinish.Text = Properties.Settings.Default.ChapterFinish;
\r
47 text_destination.Text = Properties.Settings.Default.VideoDest;
\r
48 drp_videoEncoder.Text = Properties.Settings.Default.VideoEncoder;
\r
49 drp_audioCodec.Text = Properties.Settings.Default.AudioEncoder;
\r
50 text_width.Text = Properties.Settings.Default.Width;
\r
51 text_height.Text = Properties.Settings.Default.Height;
\r
52 //Picture Settings Tab
\r
53 drp_crop.Text = Properties.Settings.Default.CroppingOption;
\r
54 text_top.Text = Properties.Settings.Default.CropTop;
\r
55 text_bottom.Text = Properties.Settings.Default.CropBottom;
\r
56 text_left.Text = Properties.Settings.Default.CropLeft;
\r
57 text_right.Text = Properties.Settings.Default.CropRight;
\r
58 drp_subtitle.Text = Properties.Settings.Default.Subtitles;
\r
59 //Video Settings Tab
\r
60 text_bitrate.Text = Properties.Settings.Default.VideoBitrate;
\r
61 text_filesize.Text = Properties.Settings.Default.VideoFilesize;
\r
62 slider_videoQuality.Value = Properties.Settings.Default.VideoQuality;
\r
63 if (Properties.Settings.Default.TwoPass == "Checked")
\r
65 check_2PassEncode.CheckState = CheckState.Checked;
\r
67 if (Properties.Settings.Default.DeInterlace == "Checked")
\r
69 check_DeInterlace.CheckState = CheckState.Checked;
\r
71 if (Properties.Settings.Default.Grayscale == "Checked")
\r
73 check_grayscale.CheckState = CheckState.Checked;
\r
76 drp_videoFramerate.Text = Properties.Settings.Default.Framerate;
\r
78 if (Properties.Settings.Default.PixelRatio == "Checked")
\r
80 CheckPixelRatio.CheckState = CheckState.Checked;
\r
82 if (Properties.Settings.Default.turboFirstPass == "Checked")
\r
84 check_turbo.CheckState = CheckState.Checked;
\r
86 if (Properties.Settings.Default.largeFile == "Checked")
\r
88 check_largeFile.CheckState = CheckState.Checked;
\r
90 //Audio Settings Tab
\r
91 drp_audioBitrate.Text = Properties.Settings.Default.AudioBitrate;
\r
92 drp_audioSampleRate.Text = Properties.Settings.Default.AudioSampleRate;
\r
93 drp_audioChannels.Text = Properties.Settings.Default.AudioChannels;
\r
95 if (Properties.Settings.Default.CRF == "Checked")
\r
97 CheckCRF.CheckState = CheckState.Checked;
\r
99 rtf_h264advanced.Text = Properties.Settings.Default.H264;
\r
104 // No real need to alert the user. Try/Catch only in just incase there is a problem reading the settings xml file.
\r
108 public void updateCheck()
\r
110 if (Properties.Settings.Default.updateStatus == "Checked")
\r
115 String updateFile = Properties.Settings.Default.updateFile;
\r
116 WebClient client = new WebClient();
\r
117 String data = client.DownloadString(updateFile);
\r
118 String[] versionData = data.Split('\n');
\r
120 if ((versionData[0] != Properties.Settings.Default.GuiVersion) || (versionData[1] != Properties.Settings.Default.CliVersion))
\r
122 lbl_update.Visible = true;
\r
125 //else fail displaying an error message.
\r
128 //Silently ignore the error
\r
135 // --------------------------------------------------------------
\r
137 // --------------------------------------------------------------
\r
139 // FILE MENU --------------------------------------------------------------
\r
140 private void mnu_open_Click(object sender, EventArgs e)
\r
142 File_Open.ShowDialog();
\r
144 private void mnu_save_Click(object sender, EventArgs e)
\r
146 File_Save.ShowDialog();
\r
149 private void mnu_update_Click(object sender, EventArgs e)
\r
151 Form Update = new frmUpdate();
\r
155 private void mnu_exit_Click(object sender, EventArgs e)
\r
160 // TOOLS MENU --------------------------------------------------------------
\r
161 private void mnu_encode_Click(object sender, EventArgs e)
\r
163 Form Queue = new frmQueue();
\r
167 private void mnu_viewDVDdata_Click(object sender, EventArgs e)
\r
169 Form DVDData = new frmDVDData();
\r
173 private void mnu_options_Click(object sender, EventArgs e)
\r
175 Form Options = new frmOptions();
\r
179 // PRESETS MENU --------------------------------------------------------------
\r
180 private void mnu_preset_ipod133_Click(object sender, EventArgs e)
\r
182 CheckPixelRatio.CheckState = CheckState.Unchecked;
\r
183 text_width.Text = "640";
\r
184 text_height.Text = "480";
\r
185 drp_videoEncoder.Text = "H.264 (iPod)";
\r
186 text_bitrate.Text = "1000";
\r
187 text_filesize.Text = "";
\r
188 slider_videoQuality.Value = 0;
\r
189 SliderValue.Text = "0%";
\r
190 drp_audioBitrate.Text = "160";
\r
191 rtf_h264advanced.Text = "";
\r
192 drp_crop.Text = "No Crop";
\r
195 private void mnu_preset_ipod178_Click(object sender, EventArgs e)
\r
197 CheckPixelRatio.CheckState = CheckState.Unchecked;
\r
198 text_width.Text = "640";
\r
199 text_height.Text = "352";
\r
200 drp_videoEncoder.Text = "H.264 (iPod)";
\r
201 text_bitrate.Text = "1000";
\r
202 text_filesize.Text = "";
\r
203 slider_videoQuality.Value = 0;
\r
204 SliderValue.Text = "0%";
\r
205 drp_audioBitrate.Text = "160";
\r
206 rtf_h264advanced.Text = "";
\r
207 drp_crop.Text = "No Crop";
\r
210 private void mnu_preset_ipod235_Click(object sender, EventArgs e)
\r
212 CheckPixelRatio.CheckState = CheckState.Unchecked;
\r
213 text_width.Text = "640";
\r
214 text_height.Text = "272";
\r
215 drp_videoEncoder.Text = "H.264 (iPod)";
\r
216 text_bitrate.Text = "1000";
\r
217 text_filesize.Text = "";
\r
218 slider_videoQuality.Value = 0;
\r
219 SliderValue.Text = "0%";
\r
220 drp_audioBitrate.Text = "160";
\r
221 rtf_h264advanced.Text = "";
\r
222 drp_crop.Text = "No Crop";
\r
225 private void mnu_appleTv_Click(object sender, EventArgs e)
\r
227 text_width.Text = "";
\r
228 text_height.Text = "";
\r
229 drp_videoEncoder.Text = "H.264";
\r
230 text_bitrate.Text = "3000";
\r
231 text_filesize.Text = "";
\r
232 slider_videoQuality.Value = 0;
\r
233 SliderValue.Text = "0%";
\r
234 drp_audioBitrate.Text = "160";
\r
235 CheckPixelRatio.CheckState = CheckState.Checked;
\r
236 drp_audioSampleRate.Text = "48";
\r
237 rtf_h264advanced.Text = "bframes=3:ref=1:subme=5:me=umh:no-fast-pskip=1:no-dct-decimate=1:trellis=2";
\r
238 drp_crop.Text = "No Crop";
\r
242 private void mnu_presetPS3_Click(object sender, EventArgs e)
\r
244 CheckPixelRatio.CheckState = CheckState.Unchecked;
\r
245 text_width.Text = "";
\r
246 text_height.Text = "";
\r
247 drp_videoEncoder.Text = "H.264";
\r
248 text_bitrate.Text = "3000";
\r
249 text_filesize.Text = "";
\r
250 slider_videoQuality.Value = 0;
\r
251 SliderValue.Text = "0%";
\r
252 drp_audioBitrate.Text = "160";
\r
253 CheckPixelRatio.CheckState = CheckState.Checked;
\r
254 drp_audioSampleRate.Text = "48";
\r
255 rtf_h264advanced.Text = "level=41";
\r
256 drp_crop.Text = "No Crop";
\r
259 private void mnu_ProgramDefaultOptions_Click(object sender, EventArgs e)
\r
262 Properties.Settings.Default.DVDSource = text_source.Text;
\r
263 Properties.Settings.Default.DVDTitle = drp_dvdtitle.Text;
\r
264 Properties.Settings.Default.ChapterStart = drop_chapterStart.Text;
\r
265 Properties.Settings.Default.ChapterFinish = drop_chapterFinish.Text;
\r
267 Properties.Settings.Default.VideoDest = text_destination.Text;
\r
268 Properties.Settings.Default.VideoEncoder = drp_videoEncoder.Text;
\r
269 Properties.Settings.Default.AudioEncoder = drp_audioCodec.Text;
\r
270 Properties.Settings.Default.Width = text_width.Text;
\r
271 Properties.Settings.Default.Height = text_height.Text;
\r
272 //Picture Settings Tab
\r
273 Properties.Settings.Default.CroppingOption = drp_crop.Text;
\r
274 Properties.Settings.Default.CropTop = text_top.Text;
\r
275 Properties.Settings.Default.CropBottom = text_bottom.Text;
\r
276 Properties.Settings.Default.CropLeft = text_left.Text;
\r
277 Properties.Settings.Default.CropRight = text_right.Text;
\r
278 Properties.Settings.Default.Subtitles = drp_subtitle.Text;
\r
279 //Video Settings Tab
\r
280 Properties.Settings.Default.VideoBitrate = text_bitrate.Text;
\r
281 Properties.Settings.Default.VideoFilesize = text_filesize.Text;
\r
282 Properties.Settings.Default.VideoQuality = slider_videoQuality.Value;
\r
283 Properties.Settings.Default.TwoPass = check_2PassEncode.CheckState.ToString();
\r
284 Properties.Settings.Default.DeInterlace = check_DeInterlace.CheckState.ToString();
\r
285 Properties.Settings.Default.Grayscale = check_grayscale.CheckState.ToString();
\r
286 Properties.Settings.Default.Framerate = drp_videoFramerate.Text;
\r
287 Properties.Settings.Default.PixelRatio = CheckPixelRatio.CheckState.ToString();
\r
288 Properties.Settings.Default.turboFirstPass = check_turbo.CheckState.ToString();
\r
289 Properties.Settings.Default.largeFile = check_largeFile.CheckState.ToString();
\r
290 //Audio Settings Tab
\r
291 Properties.Settings.Default.AudioBitrate = drp_audioBitrate.Text;
\r
292 Properties.Settings.Default.AudioSampleRate = drp_audioSampleRate.Text;
\r
293 Properties.Settings.Default.AudioChannels = drp_audioChannels.Text;
\r
295 Properties.Settings.Default.CRF = CheckCRF.CheckState.ToString();
\r
296 Properties.Settings.Default.H264 = rtf_h264advanced.Text;
\r
297 Properties.Settings.Default.Save();
\r
300 // Help Menu --------------------------------------------------------------
\r
301 private void mnu_wiki_Click(object sender, EventArgs e)
\r
303 System.Diagnostics.Process.Start("http://handbrake.m0k.org/trac");
\r
306 private void mnu_onlineDocs_Click(object sender, EventArgs e)
\r
308 System.Diagnostics.Process.Start("http://handbrake.m0k.org/?page_id=11");
\r
311 private void mnu_faq_Click(object sender, EventArgs e)
\r
313 System.Diagnostics.Process.Start("http://handbrake.m0k.org/trac/wiki/WindowsGuiFaq");
\r
316 private void mnu_homepage_Click(object sender, EventArgs e)
\r
318 System.Diagnostics.Process.Start("http://handbrake.m0k.org");
\r
321 private void mnu_forum_Click(object sender, EventArgs e)
\r
323 System.Diagnostics.Process.Start("http://handbrake.m0k.org/forum");
\r
326 private void mnu_about_Click(object sender, EventArgs e)
\r
328 Form About = new frmAbout();
\r
334 // --------------------------------------------------------------
\r
335 // Buttons on the main Window
\r
336 // --------------------------------------------------------------
\r
337 private void btn_Browse_Click(object sender, EventArgs e)
\r
339 String filename ="";
\r
340 text_source.Text = "";
\r
342 if (RadioDVD.Checked)
\r
344 DVD_Open.ShowDialog();
\r
345 filename = DVD_Open.SelectedPath;
\r
346 if (filename != "")
\r
348 text_source.Text = filename;
\r
349 Form frmReadDVD = new frmReadDVD(filename);
\r
356 ISO_Open.ShowDialog();
\r
357 filename = ISO_Open.FileName;
\r
358 if (filename != "")
\r
360 text_source.Text = filename;
\r
361 Form frmReadDVD = new frmReadDVD(filename);
\r
370 private void btn_destBrowse_Click(object sender, EventArgs e)
\r
372 // TODO: Need to write some code to check if there is a reasonable amount of disk space left.
\r
374 DVD_Save.ShowDialog();
\r
375 text_destination.Text = DVD_Save.FileName;
\r
378 private void btn_h264Clear_Click(object sender, EventArgs e)
\r
380 rtf_h264advanced.Text = "";
\r
383 private void GenerateQuery_Click(object sender, EventArgs e)
\r
385 String query = GenerateTheQuery();
\r
386 QueryEditorText.Text = query;
\r
389 private void btn_ClearQuery_Click(object sender, EventArgs e)
\r
391 QueryEditorText.Text = "";
\r
394 private void btn_queue_Click(object sender, EventArgs e)
\r
396 Form Queue = new frmQueue();
\r
400 private void btn_encode_Click(object sender, EventArgs e)
\r
404 if (QueryEditorText.Text == "")
\r
406 query = GenerateTheQuery();
\r
407 MessageBox.Show(query);
\r
411 query = QueryEditorText.Text;
\r
414 System.Diagnostics.Process hbProc = new System.Diagnostics.Process();
\r
415 hbProc.StartInfo.FileName = "hbcli.exe";
\r
416 hbProc.StartInfo.Arguments = query;
\r
417 hbProc.StartInfo.UseShellExecute = false;
\r
421 MessageBox.Show("The encode process has now started.", "Status", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
\r
423 // TODO: Need to write a bit of code here to do process monitoring.
\r
424 // Note: hbProc.waitForExit will freeze the app, meaning one cannot add additional items to the queue during an encode.
\r
427 // --------------------------------------------------------------
\r
428 // Items that require actions on frmMain
\r
429 // --------------------------------------------------------------
\r
432 private void drop_chapterStart_SelectedIndexChanged(object sender, EventArgs e)
\r
434 QueryEditorText.Text = "";
\r
435 if ((drop_chapterFinish.Text != "Auto") && (drop_chapterStart.Text != "Auto"))
\r
437 int chapterFinish = int.Parse(drop_chapterFinish.Text);
\r
438 int chapterStart = int.Parse(drop_chapterStart.Text);
\r
442 if (chapterFinish < chapterStart)
\r
444 MessageBox.Show("Invalid Chapter Range! - Final chapter can not be smaller than the starting chapter.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
\r
449 MessageBox.Show("Invalid Character Entered!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
\r
456 private void drop_chapterFinish_SelectedIndexChanged(object sender, EventArgs e)
\r
458 QueryEditorText.Text = "";
\r
459 if ((drop_chapterFinish.Text != "Auto") && (drop_chapterStart.Text != "Auto"))
\r
461 int chapterFinish = int.Parse(drop_chapterFinish.Text);
\r
462 int chapterStart = int.Parse(drop_chapterStart.Text);
\r
466 if (chapterFinish > chapterStart)
\r
468 MessageBox.Show("Invalid Chapter Range! - Start chapter can not be larger than the Final chapter.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
\r
473 MessageBox.Show("Invalid Character Entered!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
\r
478 private void text_bitrate_TextChanged(object sender, EventArgs e)
\r
480 text_filesize.Text = "";
\r
481 slider_videoQuality.Value = 0;
\r
482 SliderValue.Text = "0%";
\r
483 CheckCRF.CheckState = CheckState.Unchecked;
\r
486 private void text_filesize_TextChanged(object sender, EventArgs e)
\r
488 text_bitrate.Text = "";
\r
489 slider_videoQuality.Value = 0;
\r
490 SliderValue.Text = "0%";
\r
491 CheckCRF.CheckState = CheckState.Unchecked;
\r
494 private void slider_videoQuality_Scroll(object sender, EventArgs e)
\r
496 SliderValue.Text = slider_videoQuality.Value.ToString() + "%";
\r
497 text_bitrate.Text = "";
\r
498 text_filesize.Text = "";
\r
501 private void label_h264_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
\r
503 System.Diagnostics.Process.Start("http://handbrake.m0k.org/trac/wiki/x264Options");
\r
510 // The Query Generation Function
\r
514 // This function was imported from old vb.net version of this application.
\r
515 // It could probably do with being cleaned up a good deal at some point
\r
516 public string GenerateTheQuery()
\r
518 string source = text_source.Text;
\r
519 string dvdTitle = drp_dvdtitle.Text;
\r
520 string chapterStart = drop_chapterStart.Text;
\r
521 string chapterFinish = drop_chapterFinish.Text;
\r
522 int totalChapters = drop_chapterFinish.Items.Count - 1;
\r
523 string dvdChapter = "";
\r
527 MessageBox.Show("No Source has been selected.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
\r
529 source = " -i " + '"' + source+ '"'; //'"'+
\r
532 if (dvdTitle == "Automatic")
\r
536 string[] titleInfo = dvdTitle.Split(' ');
\r
537 dvdTitle = " -t "+ titleInfo[0];
\r
543 if ((chapterFinish.Equals("Auto") && chapterStart.Equals("Auto")))
\r
547 else if (chapterFinish == chapterStart)
\r
549 dvdChapter = " -c " + chapterStart;
\r
554 dvdChapter = " -c " + chapterStart + "-" + chapterFinish;
\r
557 string querySource = source+ dvdTitle+ dvdChapter;
\r
558 // ----------------------------------------------------------------------
\r
562 string destination = text_destination.Text;
\r
563 string videoEncoder = drp_videoEncoder.Text;
\r
564 string audioEncoder = drp_audioCodec.Text;
\r
565 string width = text_width.Text;
\r
566 string height = text_height.Text;
\r
567 if ((destination == ""))
\r
569 MessageBox.Show("No destination has been selected.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
\r
574 destination = " -o " + '"' + destination + '"'; //'"'+
\r
577 if ((videoEncoder == "Mpeg 4"))
\r
579 videoEncoder = " -e ffmpeg";
\r
582 else if ((videoEncoder == "Xvid"))
\r
584 videoEncoder = " -e xvid";
\r
587 else if ((videoEncoder == "H.264"))
\r
589 videoEncoder = " -e x264";
\r
592 else if ((videoEncoder == "H.264 Baseline 1.3"))
\r
594 videoEncoder = " -e x264b13";
\r
597 else if ((videoEncoder == "H.264 (iPod)"))
\r
599 videoEncoder = " -e x264b30";
\r
602 if ((audioEncoder == "AAC"))
\r
604 audioEncoder = " -E faac";
\r
607 else if ((audioEncoder == "MP3"))
\r
609 audioEncoder = " -E lame";
\r
612 else if ((audioEncoder == "Vorbis"))
\r
614 audioEncoder = " -E vorbis";
\r
617 else if ((audioEncoder == "AC3"))
\r
619 audioEncoder = " -E ac3";
\r
624 width = " -w "+ width;
\r
627 if ((height != ""))
\r
629 height = " -l "+ height;
\r
632 string queryDestination = destination+ videoEncoder+ audioEncoder+ width+ height;
\r
633 // ----------------------------------------------------------------------
\r
635 // Picture Settings Tab
\r
637 string cropSetting = drp_crop.Text;
\r
638 string cropTop = text_top.Text;
\r
639 string cropBottom = text_bottom.Text;
\r
640 string cropLeft = text_left.Text;
\r
641 string cropRight = text_right.Text;
\r
642 string subtitles = drp_subtitle.Text;
\r
643 string cropOut = "";
\r
644 // Returns Crop Query
\r
646 if (cropSetting == "Auto Crop")
\r
651 else if (cropSetting == "No Crop")
\r
653 cropOut = " --crop 0:0:0:0 ";
\r
658 cropOut = " --crop "+ cropTop+ ":"+ cropBottom+ ":"+ cropLeft+ ":"+ cropRight;
\r
661 if ((subtitles == "None"))
\r
666 else if ((subtitles == ""))
\r
674 tempSub = subtitles.Split(' ');
\r
675 subtitles = " -s "+ tempSub[0];
\r
678 string queryPictureSettings = cropOut+ subtitles;
\r
679 // ----------------------------------------------------------------------
\r
681 // Video Settings Tab
\r
683 string videoBitrate = text_bitrate.Text;
\r
684 string videoFilesize = text_filesize.Text;
\r
685 int videoQuality = slider_videoQuality.Value;
\r
686 string vidQSetting;
\r
687 string twoPassEncoding = check_2PassEncode.CheckState.ToString();
\r
688 string deinterlace = check_DeInterlace.CheckState.ToString();
\r
689 string grayscale = check_grayscale.CheckState.ToString();
\r
690 string videoFramerate = drp_videoFramerate.Text;
\r
691 string pixelRatio = CheckPixelRatio.CheckState.ToString();
\r
692 string ChapterMarkers = Check_ChapterMarkers.CheckState.ToString();
\r
693 string turboH264 = check_turbo.CheckState.ToString();
\r
694 string largeFile = check_largeFile.CheckState.ToString();
\r
696 if ((videoBitrate != ""))
\r
698 videoBitrate = " -b "+ videoBitrate;
\r
701 if ((videoFilesize != ""))
\r
703 videoFilesize = " -S "+ videoFilesize;
\r
706 // Video Quality Setting
\r
708 if ((videoQuality == 0))
\r
715 videoQuality = videoQuality/ 100;
\r
716 if (videoQuality == 1)
\r
718 vidQSetting = "1.0";
\r
721 vidQSetting = " -q " + videoQuality.ToString();
\r
724 if ((twoPassEncoding == "1"))
\r
726 twoPassEncoding = " -2 ";
\r
731 twoPassEncoding = "";
\r
734 if ((deinterlace == "1"))
\r
736 deinterlace = " -d ";
\r
744 if ((grayscale == "1"))
\r
746 grayscale = " -g ";
\r
754 if ((videoFramerate == "Automatic"))
\r
756 videoFramerate = "";
\r
761 videoFramerate = " -r "+ videoFramerate;
\r
764 if ((pixelRatio == "1"))
\r
766 pixelRatio = " -p ";
\r
774 if ((ChapterMarkers == "1"))
\r
776 ChapterMarkers = " -m ";
\r
781 ChapterMarkers = "";
\r
784 if ((turboH264 == "1"))
\r
786 turboH264 = " -T ";
\r
794 if ((largeFile == "1"))
\r
796 largeFile = " -4 ";
\r
804 string queryVideoSettings = videoBitrate + videoFilesize + vidQSetting + twoPassEncoding + deinterlace + grayscale + videoFramerate + pixelRatio + ChapterMarkers + turboH264 + largeFile;
\r
805 // ----------------------------------------------------------------------
\r
807 // Audio Settings Tab
\r
809 string audioBitrate = drp_audioBitrate.Text;
\r
810 string audioSampleRate = drp_audioSampleRate.Text;
\r
811 string audioChannels = drp_audioChannels.Text;
\r
812 string Mixdown = drp_audioMixDown.Text;
\r
813 string SixChannelAudio = "";
\r
814 if ((audioBitrate != ""))
\r
816 audioBitrate = " -B "+ audioBitrate;
\r
819 if ((audioSampleRate != ""))
\r
821 audioSampleRate = " -R "+ audioSampleRate;
\r
824 if ((audioChannels == "Automatic"))
\r
826 audioChannels = "";
\r
829 else if ((audioChannels == ""))
\r
831 audioChannels = "";
\r
837 tempSub = audioChannels.Split(' ');
\r
838 audioChannels = " -a "+ tempSub[0];
\r
841 if ((Mixdown == "Automatic"))
\r
846 else if (Mixdown == "Mono")
\r
851 else if (Mixdown == "Stereo")
\r
853 Mixdown = "stereo";
\r
856 else if (Mixdown == "Dolby Surround")
\r
861 else if (Mixdown == "Dolby Pro Logic II")
\r
866 else if (Mixdown == "6 Channel Discrete")
\r
876 if ((Mixdown != ""))
\r
878 SixChannelAudio = " -6 "+ Mixdown;
\r
883 SixChannelAudio = "";
\r
886 string queryAudioSettings = audioBitrate+ audioSampleRate+ audioChannels+ SixChannelAudio;
\r
887 // ----------------------------------------------------------------------
\r
891 string CRF = CheckCRF.CheckState.ToString();
\r
892 string h264Advanced = rtf_h264advanced.Text;
\r
903 if ((h264Advanced == ""))
\r
910 h264Advanced = " -x "+ h264Advanced;
\r
913 string h264Settings = CRF+ h264Advanced;
\r
914 // ----------------------------------------------------------------------
\r
916 // Processors (Program Settings)
\r
918 string processors = Properties.Settings.Default.Processors;
\r
919 // Number of Processors Handler
\r
921 if ((processors == "Automatic"))
\r
928 processors = " -C "+ processors+ " ";
\r
931 string queryAdvancedSettings = processors;
\r
932 // ----------------------------------------------------------------------
\r
934 // Verbose option (Program Settings)
\r
936 string verbose = "";
\r
937 if ( Properties.Settings.Default.verbose == "1")
\r
942 // ----------------------------------------------------------------------
\r
944 return querySource+ queryDestination+ queryPictureSettings+ queryVideoSettings+ h264Settings+ queryAudioSettings+ queryAdvancedSettings+ verbose;
\r
951 // This is the END of the road ------------------------------------------------------------------------------
\r