From 51c471113d6f5a64acc00b542ad78a0f9783ce99 Mon Sep 17 00:00:00 2001 From: Jaex Date: Sat, 12 Aug 2023 19:20:23 +0300 Subject: [PATCH] Added NVENC tune option --- ShareX.ScreenCaptureLib/Enums.cs | 40 +- .../Forms/FFmpegOptionsForm.Designer.cs | 19 + .../Forms/FFmpegOptionsForm.cs | 18 +- .../Forms/FFmpegOptionsForm.resx | 1084 ++++++++--------- .../ScreenRecording/FFmpegOptions.cs | 3 +- .../ScreenRecording/ScreenRecordingOptions.cs | 1 + 6 files changed, 550 insertions(+), 615 deletions(-) diff --git a/ShareX.ScreenCaptureLib/Enums.cs b/ShareX.ScreenCaptureLib/Enums.cs index bf467a161..87fdf9018 100644 --- a/ShareX.ScreenCaptureLib/Enums.cs +++ b/ShareX.ScreenCaptureLib/Enums.cs @@ -167,30 +167,32 @@ public enum FFmpegTune public enum FFmpegNVENCPreset { - [Description("Default")] - @default, - [Description("High quality 2 passes")] - slow, - [Description("High quality 1 pass")] - medium, - [Description("High performance 1 pass")] - fast, - [Description("High performance")] - hp, + [Description("Fastest (Lowest quality)")] + p1, + [Description("Faster (Lower quality)")] + p2, + [Description("Fast (Low quality)")] + p3, + [Description("Medium (Medium quality)")] + p4, + [Description("Slow (Good quality)")] + p5, + [Description("Slower (Better quality)")] + p6, + [Description("Slowest (Best quality)")] + p7 + } + + public enum FFmpegNVENCTune + { [Description("High quality")] hq, - [Description("Bluray disk")] - bd, [Description("Low latency")] ll, - [Description("Low latency high quality")] - llhq, - [Description("Low latency high performance")] - llhp, + [Description("Ultra low latency")] + ull, [Description("Lossless")] - lossless, - [Description("Lossless high performance")] - losslesshp + lossless } public enum FFmpegAMFUsage diff --git a/ShareX.ScreenCaptureLib/Forms/FFmpegOptionsForm.Designer.cs b/ShareX.ScreenCaptureLib/Forms/FFmpegOptionsForm.Designer.cs index 20626b2b0..28913b793 100644 --- a/ShareX.ScreenCaptureLib/Forms/FFmpegOptionsForm.Designer.cs +++ b/ShareX.ScreenCaptureLib/Forms/FFmpegOptionsForm.Designer.cs @@ -106,6 +106,8 @@ private void InitializeComponent() this.cbUseCustomFFmpegPath = new System.Windows.Forms.CheckBox(); this.lblVideoEncoder = new System.Windows.Forms.Label(); this.lblAudioEncoder = new System.Windows.Forms.Label(); + this.lblNVENCTune = new System.Windows.Forms.Label(); + this.cbNVENCTune = new System.Windows.Forms.ComboBox(); ((System.ComponentModel.ISupportInitialize)(this.nudx264CRF)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nudXvidQscale)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.tbVorbis_qscale)).BeginInit(); @@ -455,6 +457,8 @@ private void InitializeComponent() // tpNVENC // this.tpNVENC.BackColor = System.Drawing.SystemColors.Window; + this.tpNVENC.Controls.Add(this.cbNVENCTune); + this.tpNVENC.Controls.Add(this.lblNVENCTune); this.tpNVENC.Controls.Add(this.lblNVENCBitrateK); this.tpNVENC.Controls.Add(this.cbNVENCPreset); this.tpNVENC.Controls.Add(this.lblNVENCPreset); @@ -796,6 +800,19 @@ private void InitializeComponent() resources.ApplyResources(this.lblAudioEncoder, "lblAudioEncoder"); this.lblAudioEncoder.Name = "lblAudioEncoder"; // + // lblNVENCTune + // + resources.ApplyResources(this.lblNVENCTune, "lblNVENCTune"); + this.lblNVENCTune.Name = "lblNVENCTune"; + // + // cbNVENCTune + // + this.cbNVENCTune.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbNVENCTune.FormattingEnabled = true; + resources.ApplyResources(this.cbNVENCTune, "cbNVENCTune"); + this.cbNVENCTune.Name = "cbNVENCTune"; + this.cbNVENCTune.SelectedIndexChanged += new System.EventHandler(this.cbNVENCTune_SelectedIndexChanged); + // // FFmpegOptionsForm // resources.ApplyResources(this, "$this"); @@ -948,5 +965,7 @@ private void InitializeComponent() private System.Windows.Forms.Label lblAMFBitrateK; private System.Windows.Forms.NumericUpDown nudAMFBitrate; private System.Windows.Forms.Label lblAMFBitrate; + private System.Windows.Forms.ComboBox cbNVENCTune; + private System.Windows.Forms.Label lblNVENCTune; } } \ No newline at end of file diff --git a/ShareX.ScreenCaptureLib/Forms/FFmpegOptionsForm.cs b/ShareX.ScreenCaptureLib/Forms/FFmpegOptionsForm.cs index e389c0cf2..59c5c9f1a 100644 --- a/ShareX.ScreenCaptureLib/Forms/FFmpegOptionsForm.cs +++ b/ShareX.ScreenCaptureLib/Forms/FFmpegOptionsForm.cs @@ -52,10 +52,11 @@ public FFmpegOptionsForm(ScreenRecordingOptions options) cbAudioCodec.Items.AddRange(Helpers.GetEnumDescriptions()); cbx264Preset.Items.AddRange(Helpers.GetEnumDescriptions()); cbGIFStatsMode.Items.AddRange(Helpers.GetEnumDescriptions()); - cbNVENCPreset.Items.AddRange(Helpers.GetEnums().Select(x => $"{x} ({x.GetDescription()})").ToArray()); + cbNVENCPreset.Items.AddRange(Helpers.GetEnums().Select(x => $"{x} - {x.GetDescription()}").ToArray()); + cbNVENCTune.Items.AddRange(Helpers.GetEnums().Select(x => $"{x} - {x.GetDescription()}").ToArray()); cbGIFDither.Items.AddRange(Helpers.GetEnumDescriptions()); - cbAMFUsage.Items.AddRange(Helpers.GetEnums().Select(x => $"{x} ({x.GetDescription()})").ToArray()); - cbAMFQuality.Items.AddRange(Helpers.GetEnums().Select(x => $"{x} ({x.GetDescription()})").ToArray()); + cbAMFUsage.Items.AddRange(Helpers.GetEnums().Select(x => $"{x} - {x.GetDescription()}").ToArray()); + cbAMFQuality.Items.AddRange(Helpers.GetEnums().Select(x => $"{x} - {x.GetDescription()}").ToArray()); cbQSVPreset.Items.AddRange(Helpers.GetEnumDescriptions()); } @@ -96,6 +97,7 @@ private async Task SettingsLoad() // NVENC nudNVENCBitrate.SetValue(Options.FFmpeg.NVENC_Bitrate); cbNVENCPreset.SelectedIndex = (int)Options.FFmpeg.NVENC_Preset; + cbNVENCTune.SelectedIndex = (int)Options.FFmpeg.NVENC_Tune; // GIF cbGIFStatsMode.SelectedIndex = (int)Options.FFmpeg.GIFStatsMode; @@ -415,15 +417,21 @@ private void nudQscale_ValueChanged(object sender, EventArgs e) UpdateUI(); } + private void nudNVENCBitrate_ValueChanged(object sender, EventArgs e) + { + Options.FFmpeg.NVENC_Bitrate = (int)nudNVENCBitrate.Value; + UpdateUI(); + } + private void cbNVENCPreset_SelectedIndexChanged(object sender, EventArgs e) { Options.FFmpeg.NVENC_Preset = (FFmpegNVENCPreset)cbNVENCPreset.SelectedIndex; UpdateUI(); } - private void nudNVENCBitrate_ValueChanged(object sender, EventArgs e) + private void cbNVENCTune_SelectedIndexChanged(object sender, EventArgs e) { - Options.FFmpeg.NVENC_Bitrate = (int)nudNVENCBitrate.Value; + Options.FFmpeg.NVENC_Tune = (FFmpegNVENCTune)cbNVENCTune.SelectedIndex; UpdateUI(); } diff --git a/ShareX.ScreenCaptureLib/Forms/FFmpegOptionsForm.resx b/ShareX.ScreenCaptureLib/Forms/FFmpegOptionsForm.resx index 9c7d448ec..b33dde999 100644 --- a/ShareX.ScreenCaptureLib/Forms/FFmpegOptionsForm.resx +++ b/ShareX.ScreenCaptureLib/Forms/FFmpegOptionsForm.resx @@ -658,111 +658,6 @@ Otherwise it can't keep up with recording and a lot of frame drops will happen.< 8 - - tpX264 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tcFFmpegVideoCodecs - - - 0 - - - tpVpx - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tcFFmpegVideoCodecs - - - 1 - - - tpXvid - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tcFFmpegVideoCodecs - - - 2 - - - tpNVENC - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tcFFmpegVideoCodecs - - - 3 - - - tpGIF - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tcFFmpegVideoCodecs - - - 4 - - - tpAMF - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tcFFmpegVideoCodecs - - - 5 - - - tpQSV - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tcFFmpegVideoCodecs - - - 6 - - - 16, 184 - - - 312, 80 - - - 14 - - - tcFFmpegVideoCodecs - - - ShareX.HelpersLib.TablessControl, ShareX.HelpersLib, Version=15.0.1.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 1 - lblx264BitrateK @@ -806,7 +701,7 @@ Otherwise it can't keep up with recording and a lot of frame drops will happen.< 3, 3, 3, 3 - 304, 36 + 304, 100 1 @@ -826,84 +721,6 @@ Otherwise it can't keep up with recording and a lot of frame drops will happen.< 0 - - True - - - 149, 8 - - - 34, 13 - - - 3 - - - kbit/s - - - lblx264BitrateK - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tpX264 - - - 0 - - - True - - - 200, 6 - - - 77, 17 - - - 4 - - - Use bitrate - - - cbx264UseBitrate - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tpX264 - - - 1 - - - 72, 4 - - - 72, 20 - - - 2 - - - Center - - - nudx264Bitrate - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tpX264 - - - 7 - lblVP8BitrateK @@ -944,7 +761,7 @@ Otherwise it can't keep up with recording and a lot of frame drops will happen.< 4, 40 - 304, 124 + 304, 36 2 @@ -964,92 +781,11 @@ Otherwise it can't keep up with recording and a lot of frame drops will happen.< 1 - - True - - - NoControl - - - 149, 8 - - - 34, 13 - - - 2 - - - kbit/s - - - lblVP8BitrateK - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tpVpx - - - 0 - - - 72, 4 - - - 72, 20 - - - 1 - - - Center - - - nudVP8Bitrate - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tpVpx - - - 1 - - - True - - - 0, 8 - - - 40, 13 - - - 0 - - - Bitrate: - - - lblVP8Bitrate - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tpVpx - - - 2 - 4, 40 - 304, 124 + 304, 36 3 @@ -1069,92 +805,53 @@ Otherwise it can't keep up with recording and a lot of frame drops will happen.< 2 - - lblNVENCBitrateK + + 72, 52 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 240, 21 - - tpNVENC + + 6 - - 0 + + cbNVENCTune - - cbNVENCPreset - - + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + tpNVENC - - 1 + + 0 - - lblNVENCPreset + + True - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 0, 56 - - tpNVENC + + 35, 13 - - 2 - - - nudNVENCBitrate - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tpNVENC - - - 3 - - - lblNVENCBitrate - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tpNVENC - - - 4 - - - 4, 40 - - - 3, 3, 3, 3 - - - 304, 124 - - + 5 - - NVENC + + Tune: - + + lblNVENCTune + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + tpNVENC - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tcFFmpegVideoCodecs - - - 3 + + 1 True @@ -1166,7 +863,7 @@ Otherwise it can't keep up with recording and a lot of frame drops will happen.< 34, 13 - 4 + 2 kbit/s @@ -1181,7 +878,7 @@ Otherwise it can't keep up with recording and a lot of frame drops will happen.< tpNVENC - 0 + 2 72, 28 @@ -1190,7 +887,7 @@ Otherwise it can't keep up with recording and a lot of frame drops will happen.< 240, 21 - 3 + 4 cbNVENCPreset @@ -1202,7 +899,7 @@ Otherwise it can't keep up with recording and a lot of frame drops will happen.< tpNVENC - 1 + 3 True @@ -1214,7 +911,7 @@ Otherwise it can't keep up with recording and a lot of frame drops will happen.< 40, 13 - 2 + 3 Preset: @@ -1229,7 +926,7 @@ Otherwise it can't keep up with recording and a lot of frame drops will happen.< tpNVENC - 2 + 4 72, 4 @@ -1253,7 +950,7 @@ Otherwise it can't keep up with recording and a lot of frame drops will happen.< tpNVENC - 3 + 5 True @@ -1280,7 +977,34 @@ Otherwise it can't keep up with recording and a lot of frame drops will happen.< tpNVENC - 4 + 6 + + + 4, 40 + + + 3, 3, 3, 3 + + + 304, 36 + + + 5 + + + NVENC + + + tpNVENC + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tcFFmpegVideoCodecs + + + 3 lblGIFDither @@ -1313,7 +1037,7 @@ Otherwise it can't keep up with recording and a lot of frame drops will happen.< 3, 3, 3, 3 - 304, 124 + 304, 36 4 @@ -1333,63 +1057,6 @@ Otherwise it can't keep up with recording and a lot of frame drops will happen.< 4 - - True - - - NoControl - - - 0, 32 - - - 81, 13 - - - 2 - - - Dithering mode: - - - lblGIFDither - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tpGIF - - - 2 - - - True - - - 0, 8 - - - 72, 13 - - - 0 - - - Palette mode: - - - lblGIFStatsMode - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tpGIF - - - 4 - lblAMFBitrateK @@ -1481,7 +1148,7 @@ Otherwise it can't keep up with recording and a lot of frame drops will happen.< 3, 3, 3, 3 - 304, 124 + 304, 36 6 @@ -1501,192 +1168,6 @@ Otherwise it can't keep up with recording and a lot of frame drops will happen.< 5 - - True - - - NoControl - - - 149, 8 - - - 34, 13 - - - 10 - - - kbit/s - - - lblAMFBitrateK - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tpAMF - - - 0 - - - 72, 4 - - - 72, 20 - - - 9 - - - Center - - - nudAMFBitrate - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tpAMF - - - 1 - - - True - - - NoControl - - - 0, 8 - - - 40, 13 - - - 8 - - - Bitrate: - - - lblAMFBitrate - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tpAMF - - - 2 - - - 72, 52 - - - 240, 21 - - - 7 - - - cbAMFQuality - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tpAMF - - - 3 - - - True - - - NoControl - - - 0, 56 - - - 42, 13 - - - 6 - - - Quality: - - - lblAMFQuality - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tpAMF - - - 4 - - - 72, 28 - - - 240, 21 - - - 5 - - - cbAMFUsage - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tpAMF - - - 5 - - - True - - - NoControl - - - 0, 32 - - - 41, 13 - - - 4 - - - Usage: - - - lblAMFUsage - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tpAMF - - - 6 - lblQSVBitrateK @@ -1754,7 +1235,7 @@ Otherwise it can't keep up with recording and a lot of frame drops will happen.< 3, 3, 3, 3 - 304, 124 + 304, 36 7 @@ -1774,6 +1255,429 @@ Otherwise it can't keep up with recording and a lot of frame drops will happen.< 6 + + 16, 184 + + + 312, 80 + + + 14 + + + tcFFmpegVideoCodecs + + + ShareX.HelpersLib.TablessControl, ShareX.HelpersLib, Version=15.0.1.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 1 + + + True + + + 149, 8 + + + 34, 13 + + + 3 + + + kbit/s + + + lblx264BitrateK + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpX264 + + + 0 + + + True + + + 200, 6 + + + 77, 17 + + + 4 + + + Use bitrate + + + cbx264UseBitrate + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpX264 + + + 1 + + + 72, 4 + + + 72, 20 + + + 2 + + + Center + + + nudx264Bitrate + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpX264 + + + 7 + + + True + + + NoControl + + + 149, 8 + + + 34, 13 + + + 2 + + + kbit/s + + + lblVP8BitrateK + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpVpx + + + 0 + + + 72, 4 + + + 72, 20 + + + 1 + + + Center + + + nudVP8Bitrate + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpVpx + + + 1 + + + True + + + 0, 8 + + + 40, 13 + + + 0 + + + Bitrate: + + + lblVP8Bitrate + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpVpx + + + 2 + + + True + + + NoControl + + + 0, 32 + + + 81, 13 + + + 2 + + + Dithering mode: + + + lblGIFDither + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpGIF + + + 2 + + + True + + + 0, 8 + + + 72, 13 + + + 0 + + + Palette mode: + + + lblGIFStatsMode + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpGIF + + + 4 + + + True + + + NoControl + + + 149, 8 + + + 34, 13 + + + 2 + + + kbit/s + + + lblAMFBitrateK + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpAMF + + + 0 + + + 72, 4 + + + 72, 20 + + + 1 + + + Center + + + nudAMFBitrate + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpAMF + + + 1 + + + True + + + NoControl + + + 0, 8 + + + 40, 13 + + + 0 + + + Bitrate: + + + lblAMFBitrate + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpAMF + + + 2 + + + 72, 52 + + + 240, 21 + + + 6 + + + cbAMFQuality + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpAMF + + + 3 + + + True + + + NoControl + + + 0, 56 + + + 42, 13 + + + 5 + + + Quality: + + + lblAMFQuality + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpAMF + + + 4 + + + 72, 28 + + + 240, 21 + + + 4 + + + cbAMFUsage + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpAMF + + + 5 + + + True + + + NoControl + + + 0, 32 + + + 41, 13 + + + 3 + + + Usage: + + + lblAMFUsage + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpAMF + + + 6 + True diff --git a/ShareX.ScreenCaptureLib/ScreenRecording/FFmpegOptions.cs b/ShareX.ScreenCaptureLib/ScreenRecording/FFmpegOptions.cs index 80ebd14ba..57a74784d 100644 --- a/ShareX.ScreenCaptureLib/ScreenRecording/FFmpegOptions.cs +++ b/ShareX.ScreenCaptureLib/ScreenRecording/FFmpegOptions.cs @@ -47,7 +47,8 @@ public class FFmpegOptions public int x264_Bitrate { get; set; } = 3000; // kbit/s public int VPx_Bitrate { get; set; } = 3000; // kbit/s public int XviD_QScale { get; set; } = 10; - public FFmpegNVENCPreset NVENC_Preset { get; set; } = FFmpegNVENCPreset.llhp; + public FFmpegNVENCPreset NVENC_Preset { get; set; } = FFmpegNVENCPreset.p4; + public FFmpegNVENCTune NVENC_Tune { get; set; } = FFmpegNVENCTune.ll; public int NVENC_Bitrate { get; set; } = 3000; // kbit/s public FFmpegPaletteGenStatsMode GIFStatsMode { get; set; } = FFmpegPaletteGenStatsMode.full; public FFmpegPaletteUseDither GIFDither { get; set; } = FFmpegPaletteUseDither.sierra2_4a; diff --git a/ShareX.ScreenCaptureLib/ScreenRecording/ScreenRecordingOptions.cs b/ShareX.ScreenCaptureLib/ScreenRecording/ScreenRecordingOptions.cs index 9c79549a2..d73bf5385 100644 --- a/ShareX.ScreenCaptureLib/ScreenRecording/ScreenRecordingOptions.cs +++ b/ShareX.ScreenCaptureLib/ScreenRecording/ScreenRecordingOptions.cs @@ -267,6 +267,7 @@ public string GetFFmpegArgs(bool isCustom = false) case FFmpegVideoCodec.h264_nvenc: // https://trac.ffmpeg.org/wiki/HWAccelIntro#NVENC case FFmpegVideoCodec.hevc_nvenc: args.Append($"-preset {FFmpeg.NVENC_Preset} "); + args.Append($"-tune {FFmpeg.NVENC_Tune} "); args.Append($"-b:v {FFmpeg.NVENC_Bitrate}k "); args.Append("-movflags +faststart "); // This will move some information to the beginning of your file and allow the video to begin playing before it is completely downloaded by the viewer break;