\r
// All the Main Window GUI options\r
#region Varibles\r
- \r
+\r
private string q_source;\r
/// <summary>\r
/// Returns a String \r
}\r
}\r
\r
- private string q_videoTargetSize;\r
+ private string q_videoTargetSize;\r
/// <summary>\r
/// Returns a string with the video target size\r
/// </summary>\r
{\r
QueryParser thisQuery = new QueryParser();\r
\r
- #region reg exp \r
+ #region reg exp\r
//Source\r
Regex r1 = new Regex(@"(-i)(?:\s\"")([a-zA-Z0-9:\\\s\.]+)(?:\"")");\r
Match source = r1.Match(input.Replace('"', '\"'));\r
Match title = Regex.Match(input, @"-t ([0-9]*)");\r
Match chapters = Regex.Match(input, @"-c ([0-9-]*)");\r
Match format = Regex.Match(input, @"-f ([a-z0-9a-z0-9a-z0-9]*)");\r
- \r
+\r
//Destination\r
Regex r2 = new Regex(@"(-o)(?:\s\"")([a-zA-Z0-9:\\\s\.]+)(?:\"")");\r
Match destination = r2.Match(input.Replace('"', '\"'));\r
Match largerMp4 = Regex.Match(input, @"-4");\r
Match ipodAtom = Regex.Match(input, @"-I");\r
Match optimizeMP4 = Regex.Match(input, @"-O");\r
- \r
+\r
//Audio Settings Tab\r
Match subtitles = Regex.Match(input, @"-s ([0-9]*)");\r
Match audioBitrate = Regex.Match(input, @"-B ([0-9]*)");\r
\r
//H264 Tab\r
Match x264 = Regex.Match(input, @"-x ([,a-zA-Z0-9=:-]*)");\r
- \r
+\r
//Program Options\r
Match verbose = Regex.Match(input, @"-v");\r
#endregion\r
// Source\r
//\r
#region Source Tab\r
- \r
+\r
thisQuery.q_source = source.ToString().Replace("-i ", "").Replace("\"", "");\r
if (title.Success != false)\r
thisQuery.q_dvdTitle = int.Parse(title.ToString().Replace("-t ", ""));\r
\r
if (chapters.Success != false)\r
{\r
- string[] actTitles = new string[2];\r
- actTitles = chapters.ToString().Replace("-c ", "").Split('-');\r
- thisQuery.q_chaptersStart = int.Parse(actTitles[0]);\r
- thisQuery.q_chaptersFinish = int.Parse(actTitles[1]);\r
- }\r
+ string[] actTitles = new string[2];\r
+ actTitles = chapters.ToString().Replace("-c ", "").Split('-');\r
+ thisQuery.q_chaptersStart = int.Parse(actTitles[0]);\r
+ if (actTitles.Length > 1)\r
+ thisQuery.q_chaptersFinish = int.Parse(actTitles[1]);\r
+ }\r
\r
- if (format.Success != false)\r
- thisQuery.q_format = format.ToString().Replace("-f ", "");\r
+ if (format.Success != false)\r
+ thisQuery.q_format = format.ToString().Replace("-f ", "");\r
\r
#endregion\r
\r
// Destination\r
//\r
#region Destination\r
- thisQuery.q_destination = destination.ToString().Replace("-o ","").Replace("\"", "");\r
+ thisQuery.q_destination = destination.ToString().Replace("-o ", "").Replace("\"", "");\r
\r
- string videoEncoderConvertion;\r
- string audioEncoderConvertion;\r
+ string videoEncoderConvertion;\r
+ string audioEncoderConvertion;\r
\r
- videoEncoderConvertion = videoEncoder.ToString().Replace("-e ", "");\r
- switch (videoEncoderConvertion)\r
- {\r
+ videoEncoderConvertion = videoEncoder.ToString().Replace("-e ", "");\r
+ switch (videoEncoderConvertion)\r
+ {\r
case "ffmpeg":\r
videoEncoderConvertion = "Mpeg 4";\r
break;\r
default:\r
videoEncoderConvertion = "Mpeg 4";\r
break;\r
- }\r
- thisQuery.q_videoEncoder = videoEncoderConvertion;\r
+ }\r
+ thisQuery.q_videoEncoder = videoEncoderConvertion;\r
\r
- audioEncoderConvertion = audioEncoder.ToString().Replace("-E ", "");\r
- switch (audioEncoderConvertion)\r
- {\r
+ audioEncoderConvertion = audioEncoder.ToString().Replace("-E ", "");\r
+ switch (audioEncoderConvertion)\r
+ {\r
case "faac":\r
audioEncoderConvertion = "AAC";\r
break;\r
default:\r
audioEncoderConvertion = "AAC";\r
break;\r
- }\r
- thisQuery.q_audioEncoder =audioEncoderConvertion;\r
+ }\r
+ thisQuery.q_audioEncoder = audioEncoderConvertion;\r
\r
\r
- if (width.Success != false)\r
+ if (width.Success != false)\r
thisQuery.q_videoWidth = int.Parse(width.ToString().Replace("-w ", ""));\r
\r
- if (height.Success != false)\r
+ if (height.Success != false)\r
thisQuery.q_videoHeight = int.Parse(height.ToString().Replace("-l ", ""));\r
\r
- #endregion\r
+ #endregion\r
\r
//\r
//Picture Settings Tab\r
//\r
#region Picture Tab\r
- if (crop.Success != false)\r
- {\r
+ if (crop.Success != false)\r
+ {\r
thisQuery.q_cropValues = crop.ToString().Replace("--crop ", "");\r
string[] actCropValues = new string[3];\r
actCropValues = thisQuery.q_cropValues.Split(':');\r
thisQuery.q_cropbottom = actCropValues[1];\r
thisQuery.q_cropLeft = actCropValues[2];\r
thisQuery.q_cropRight = actCropValues[3];\r
- }\r
-\r
- thisQuery.q_detelecine = detelecine.Success;\r
- thisQuery.q_deBlock = deblock.Success;\r
-\r
- thisQuery.q_deinterlace = "None";\r
- if (deinterlace.Success != false)\r
- {\r
- switch (deinterlace.ToString().Replace("--deinterlace=", ""))\r
- {\r
- case "fast":\r
- thisQuery.q_deinterlace = "Original (Fast)";\r
- break;\r
- case "slow":\r
- thisQuery.q_deinterlace = "yadif (Slow)";\r
- break;\r
- case "slower":\r
- thisQuery.q_deinterlace = "yadif + mcdeint (Slower)";\r
- break;\r
- case "slowest":\r
- thisQuery.q_deinterlace = "yadif + mcdeint (Slowest)";\r
- break;\r
- default:\r
- thisQuery.q_deinterlace = "None";\r
- break;\r
- }\r
- }\r
-\r
- thisQuery.q_denoise = "None";\r
- if (denoise.Success != false)\r
- {\r
- switch (denoise.ToString().Replace("--denoise=", ""))\r
- {\r
- case "weak":\r
- thisQuery.q_denoise = "Weak";\r
- break;\r
- case "medium":\r
- thisQuery.q_denoise = "Medium";\r
- break;\r
- case "strong":\r
- thisQuery.q_denoise = "Strong";\r
- break;\r
- default:\r
- thisQuery.q_denoise = "None";\r
- break;\r
- }\r
- \r
- }\r
- thisQuery.q_anamorphic = anamorphic.Success;\r
- thisQuery.q_chapterMarkers = chapterMarkers.Success;\r
- thisQuery.q_vfr = vfr.Success;\r
- thisQuery.q_looseAnamorphic = lanamorphic.Success;\r
- \r
- #endregion\r
+ }\r
+\r
+ thisQuery.q_detelecine = detelecine.Success;\r
+ thisQuery.q_deBlock = deblock.Success;\r
+\r
+ thisQuery.q_deinterlace = "None";\r
+ if (deinterlace.Success != false)\r
+ {\r
+ switch (deinterlace.ToString().Replace("--deinterlace=", ""))\r
+ {\r
+ case "fast":\r
+ thisQuery.q_deinterlace = "Original (Fast)";\r
+ break;\r
+ case "slow":\r
+ thisQuery.q_deinterlace = "yadif (Slow)";\r
+ break;\r
+ case "slower":\r
+ thisQuery.q_deinterlace = "yadif + mcdeint (Slower)";\r
+ break;\r
+ case "slowest":\r
+ thisQuery.q_deinterlace = "yadif + mcdeint (Slowest)";\r
+ break;\r
+ default:\r
+ thisQuery.q_deinterlace = "None";\r
+ break;\r
+ }\r
+ }\r
+\r
+ thisQuery.q_denoise = "None";\r
+ if (denoise.Success != false)\r
+ {\r
+ switch (denoise.ToString().Replace("--denoise=", ""))\r
+ {\r
+ case "weak":\r
+ thisQuery.q_denoise = "Weak";\r
+ break;\r
+ case "medium":\r
+ thisQuery.q_denoise = "Medium";\r
+ break;\r
+ case "strong":\r
+ thisQuery.q_denoise = "Strong";\r
+ break;\r
+ default:\r
+ thisQuery.q_denoise = "None";\r
+ break;\r
+ }\r
+\r
+ }\r
+ thisQuery.q_anamorphic = anamorphic.Success;\r
+ thisQuery.q_chapterMarkers = chapterMarkers.Success;\r
+ thisQuery.q_vfr = vfr.Success;\r
+ thisQuery.q_looseAnamorphic = lanamorphic.Success;\r
+\r
+ #endregion\r
\r
//\r
//Video Settings Tab\r
thisQuery.q_audioTrackMix = "Automatic";\r
if (audioChannelsMix.Success != false)\r
{\r
- switch (audioChannelsMix.ToString().Replace("-6 ", "").Replace(" ",""))\r
+ switch (audioChannelsMix.ToString().Replace("-6 ", "").Replace(" ", ""))\r
{\r
case "mono":\r
thisQuery.q_audioTrackMix = "Mono";\r
thisQuery.q_audioTrackMix = "Automatic";\r
break;\r
}\r
- \r
+\r
}\r
if (subtitles.Success != false)\r
thisQuery.q_subtitles = subtitles.ToString().Replace("-s ", "");\r