using System;\r
using System.Collections.Generic;\r
using System.ComponentModel;\r
+ using System.Drawing;\r
using System.Linq;\r
using System.Windows.Forms;\r
\r
}\r
}\r
\r
+ /// <summary>\r
+ /// Gets the Estimated Bitrate for Tracks and Passthru Tracks\r
+ /// Returns a Size object (Encoded Tracks, Passthru Trask)\r
+ /// </summary>\r
+ public Size EstimatedBitrate\r
+ {\r
+ get\r
+ {\r
+ int encodedTracks = 0;\r
+ int passthruTracks = 0;\r
+ foreach (AudioTrack track in this.AudioTracks)\r
+ {\r
+ if (track.Encoder == AudioEncoder.Ac3Passthrough || track.Encoder == AudioEncoder.DtsPassthrough)\r
+ {\r
+ passthruTracks += track.ScannedTrack.Bitrate;\r
+ } \r
+ else\r
+ {\r
+ encodedTracks += track.Bitrate;\r
+ }\r
+ }\r
+\r
+ return new Size(encodedTracks, passthruTracks);\r
+ }\r
+ }\r
+\r
#endregion\r
\r
#region Public Methods\r
switch (presetQuery.VideoEncoder)\r
{\r
case VideoEncoder.X264:\r
- mainWindow.drp_videoEncoder.SelectedIndex = 1;\r
+ mainWindow.drp_videoEncoder.SelectedIndex = 0;\r
break;\r
case VideoEncoder.FFMpeg:\r
- mainWindow.drp_videoEncoder.SelectedIndex = 0;\r
+ mainWindow.drp_videoEncoder.SelectedIndex = 1;\r
break;\r
- case VideoEncoder.Theora:\r
+ case VideoEncoder.FFMpeg2:\r
mainWindow.drp_videoEncoder.SelectedIndex = 2;\r
break;\r
+ case VideoEncoder.Theora:\r
+ mainWindow.drp_videoEncoder.SelectedIndex = 3;\r
+ break;\r
}\r
\r
// Quality\r
switch (videoEncoder)\r
{\r
case VideoEncoder.FFMpeg:\r
+ case VideoEncoder.FFMpeg2:\r
sliderValue = 32 - (int)value;\r
break;\r
case VideoEncoder.X264:\r
case "MPEG-4 (FFmpeg)":\r
query += " -e ffmpeg";\r
break;\r
+ case "MPEG-2 (FFmpeg)":\r
+ query += " -e ffmpeg2";\r
+ break;\r
case "H.264 (x264)":\r
query += " -e x264";\r
break;\r
switch (mainWindow.drp_videoEncoder.Text)\r
{\r
case "MPEG-4 (FFmpeg)":\r
+ case "MPEG-2 (FFmpeg)":\r
value = 31 - (mainWindow.slider_videoQuality.Value - 1);\r
query += " -q " + value.ToString(new CultureInfo("en-US"));\r
break;\r
{\r
case "ffmpeg":\r
return VideoEncoder.FFMpeg;\r
+ case "ffmpeg2":\r
+ return VideoEncoder.FFMpeg2;\r
case "x264":\r
return VideoEncoder.X264;\r
case "theora":\r
{\r
case VideoEncoder.FFMpeg:\r
return "ffmpeg";\r
+ case VideoEncoder.FFMpeg2:\r
+ return "ffmpeg2";\r
case VideoEncoder.X264:\r
return "x264";\r
case VideoEncoder.Theora:\r
[Description("MPEG-4 (FFMpeg)")]\r
FFMpeg,\r
\r
+ [Description("MPEG-2 (FFMpeg)")]\r
+ FFMpeg2,\r
+\r
[Description("VP3 (Theora)")]\r
Theora\r
}\r
this.components = new System.ComponentModel.Container();\r
System.Windows.Forms.ContextMenuStrip notifyIconMenu;\r
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmMain));\r
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();\r
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();\r
this.btn_restore = new System.Windows.Forms.ToolStripMenuItem();\r
this.DVD_Save = new System.Windows.Forms.SaveFileDialog();\r
this.ToolTip = new System.Windows.Forms.ToolTip(this.components);\r
this.drp_videoEncoder.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\r
this.drp_videoEncoder.FormattingEnabled = true;\r
this.drp_videoEncoder.Items.AddRange(new object[] {\r
- "MPEG-4 (FFmpeg)",\r
"H.264 (x264)",\r
+ "MPEG-4 (FFmpeg)",\r
+ "MPEG-2 (FFmpeg)",\r
"VP3 (Theora)"});\r
this.drp_videoEncoder.Location = new System.Drawing.Point(125, 35);\r
this.drp_videoEncoder.Name = "drp_videoEncoder";\r
this.check_turbo.Enabled = false;\r
this.check_turbo.Location = new System.Drawing.Point(495, 134);\r
this.check_turbo.Name = "check_turbo";\r
- this.check_turbo.Size = new System.Drawing.Size(99, 17);\r
+ this.check_turbo.Size = new System.Drawing.Size(101, 17);\r
this.check_turbo.TabIndex = 9;\r
this.check_turbo.Text = "Turbo first Pass";\r
this.ToolTip.SetToolTip(this.check_turbo, "Makes the first pass of a 2 pass encode faster.");\r
// \r
// number\r
// \r
- dataGridViewCellStyle1.Format = "N0";\r
- dataGridViewCellStyle1.NullValue = null;\r
- this.number.DefaultCellStyle = dataGridViewCellStyle1;\r
+ dataGridViewCellStyle2.Format = "N0";\r
+ dataGridViewCellStyle2.NullValue = null;\r
+ this.number.DefaultCellStyle = dataGridViewCellStyle2;\r
this.number.Frozen = true;\r
this.number.HeaderText = "Chapter Number";\r
this.number.MaxInputLength = 3;\r
this.radio_cq.BackColor = System.Drawing.Color.Transparent;\r
this.radio_cq.Location = new System.Drawing.Point(366, 37);\r
this.radio_cq.Name = "radio_cq";\r
- this.radio_cq.Size = new System.Drawing.Size(105, 17);\r
+ this.radio_cq.Size = new System.Drawing.Size(110, 17);\r
this.radio_cq.TabIndex = 3;\r
this.radio_cq.Text = "Constant Quality:";\r
this.ToolTip.SetToolTip(this.radio_cq, resources.GetString("radio_cq.ToolTip"));\r
this.radio_avgBitrate.Checked = true;\r
this.radio_avgBitrate.Location = new System.Drawing.Point(367, 108);\r
this.radio_avgBitrate.Name = "radio_avgBitrate";\r
- this.radio_avgBitrate.Size = new System.Drawing.Size(112, 17);\r
+ this.radio_avgBitrate.Size = new System.Drawing.Size(116, 17);\r
this.radio_avgBitrate.TabIndex = 4;\r
this.radio_avgBitrate.TabStop = true;\r
this.radio_avgBitrate.Text = "Avg Bitrate (kbps):";\r
this.check_2PassEncode.BackColor = System.Drawing.Color.Transparent;\r
this.check_2PassEncode.Location = new System.Drawing.Point(385, 134);\r
this.check_2PassEncode.Name = "check_2PassEncode";\r
- this.check_2PassEncode.Size = new System.Drawing.Size(106, 17);\r
+ this.check_2PassEncode.Size = new System.Drawing.Size(104, 17);\r
this.check_2PassEncode.TabIndex = 10;\r
this.check_2PassEncode.Text = "2-Pass Encoding";\r
this.ToolTip.SetToolTip(this.check_2PassEncode, resources.GetString("check_2PassEncode.ToolTip"));\r
this.radio_constantFramerate.Checked = true;\r
this.radio_constantFramerate.Location = new System.Drawing.Point(0, 0);\r
this.radio_constantFramerate.Name = "radio_constantFramerate";\r
- this.radio_constantFramerate.Size = new System.Drawing.Size(117, 17);\r
+ this.radio_constantFramerate.Size = new System.Drawing.Size(122, 17);\r
this.radio_constantFramerate.TabIndex = 17;\r
this.radio_constantFramerate.TabStop = true;\r
this.radio_constantFramerate.Text = "Constant Framerate";\r
this.radio_peakAndVariable.BackColor = System.Drawing.Color.Transparent;\r
this.radio_peakAndVariable.Location = new System.Drawing.Point(0, 23);\r
this.radio_peakAndVariable.Name = "radio_peakAndVariable";\r
- this.radio_peakAndVariable.Size = new System.Drawing.Size(113, 17);\r
+ this.radio_peakAndVariable.Size = new System.Drawing.Size(116, 17);\r
this.radio_peakAndVariable.TabIndex = 19;\r
this.radio_peakAndVariable.Text = "Variable Framerate";\r
this.radio_peakAndVariable.UseVisualStyleBackColor = false;\r
switch (drp_videoEncoder.Text)\r
{\r
case "MPEG-4 (FFmpeg)":\r
+ case "MPEG-2 (FFmpeg)":\r
if (slider_videoQuality.Value > 31)\r
slider_videoQuality.Value = 20; // Just reset to 70% QP 10 on encode change.\r
slider_videoQuality.Minimum = 1;\r
switch (drp_videoEncoder.Text)\r
{\r
case "MPEG-4 (FFmpeg)":\r
+ case "MPEG-2 (FFmpeg)":\r
lbl_SliderValue.Text = "QP:" + (32 - slider_videoQuality.Value);\r
break;\r
case "H.264 (x264)":\r
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">\r
<value>98</value>\r
</metadata>\r
+ <metadata name="File_Save.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+ <value>664, 15</value>\r
+ </metadata>\r
+ <metadata name="openPreset.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+ <value>310, 54</value>\r
+ </metadata>\r
+ <metadata name="File_ChapterImport.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+ <value>423, 54</value>\r
+ </metadata>\r
+ <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">\r
+ <value>98</value>\r
+ </metadata>\r
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
<value>\r
AAABAAYAMDAAAAEACACoDgAAZgAAACAgAAABAAgAqAgAAA4PAAAQEAAAAQAIAGgFAAC2FwAAMDAAAAEA\r
AAD6AQAA4AEAAMABAACAAQAAgAEAAMBBAADAYQAAjGEAAIRhAADc+wAA3/8AAA==\r
</value>\r
</data>\r
- <metadata name="File_Save.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
- <value>664, 15</value>\r
- </metadata>\r
- <metadata name="openPreset.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
- <value>310, 54</value>\r
- </metadata>\r
- <metadata name="File_ChapterImport.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
- <value>423, 54</value>\r
- </metadata>\r
</root>
\ No newline at end of file