mirror of
https://github.com/ShareX/ShareX.git
synced 2024-07-04 22:21:23 +12:00
About form update, FFmpeg default setting changes
This commit is contained in:
parent
7aa28d610d
commit
80eca25509
|
@ -67,8 +67,8 @@ public FFmpegOptions()
|
|||
ShowError = true;
|
||||
|
||||
// x264
|
||||
x264_CRF = 23;
|
||||
Preset = FFmpegPreset.medium;
|
||||
x264_CRF = 30;
|
||||
Preset = FFmpegPreset.fast;
|
||||
|
||||
// VPx
|
||||
VPx_CRF = 12;
|
||||
|
@ -77,9 +77,9 @@ public FFmpegOptions()
|
|||
XviD_qscale = 3;
|
||||
|
||||
// Audio
|
||||
AAC_bitrate = 128;
|
||||
Vorbis_qscale = 3;
|
||||
MP3_qscale = 4;
|
||||
AAC_bitrate = 128;
|
||||
}
|
||||
|
||||
public bool IsAudioSourceSelected()
|
||||
|
|
|
@ -311,7 +311,7 @@ private void InitializeComponent()
|
|||
this.gbFFmpegExe.Controls.Add(this.btnDownload);
|
||||
this.gbFFmpegExe.Controls.Add(this.btnFFmpegBrowse);
|
||||
this.gbFFmpegExe.Controls.Add(this.txtFFmpegPath);
|
||||
this.gbFFmpegExe.Location = new System.Drawing.Point(8, 216);
|
||||
this.gbFFmpegExe.Location = new System.Drawing.Point(8, 184);
|
||||
this.gbFFmpegExe.Name = "gbFFmpegExe";
|
||||
this.gbFFmpegExe.Size = new System.Drawing.Size(648, 56);
|
||||
this.gbFFmpegExe.TabIndex = 6;
|
||||
|
@ -349,7 +349,7 @@ private void InitializeComponent()
|
|||
// gbCommandLinePreview
|
||||
//
|
||||
this.gbCommandLinePreview.Controls.Add(this.txtCommandLinePreview);
|
||||
this.gbCommandLinePreview.Location = new System.Drawing.Point(8, 349);
|
||||
this.gbCommandLinePreview.Location = new System.Drawing.Point(8, 317);
|
||||
this.gbCommandLinePreview.Name = "gbCommandLinePreview";
|
||||
this.gbCommandLinePreview.Padding = new System.Windows.Forms.Padding(8);
|
||||
this.gbCommandLinePreview.Size = new System.Drawing.Size(648, 96);
|
||||
|
@ -372,7 +372,7 @@ private void InitializeComponent()
|
|||
//
|
||||
this.gbCommandLineArgs.Controls.Add(this.btnFFmpegHelp);
|
||||
this.gbCommandLineArgs.Controls.Add(this.tbUserArgs);
|
||||
this.gbCommandLineArgs.Location = new System.Drawing.Point(8, 280);
|
||||
this.gbCommandLineArgs.Location = new System.Drawing.Point(8, 248);
|
||||
this.gbCommandLineArgs.Name = "gbCommandLineArgs";
|
||||
this.gbCommandLineArgs.Size = new System.Drawing.Size(648, 56);
|
||||
this.gbCommandLineArgs.TabIndex = 7;
|
||||
|
@ -460,7 +460,7 @@ private void InitializeComponent()
|
|||
//
|
||||
// btnTest
|
||||
//
|
||||
this.btnTest.Location = new System.Drawing.Point(136, 344);
|
||||
this.btnTest.Location = new System.Drawing.Point(136, 312);
|
||||
this.btnTest.Name = "btnTest";
|
||||
this.btnTest.Size = new System.Drawing.Size(88, 23);
|
||||
this.btnTest.TabIndex = 8;
|
||||
|
@ -470,7 +470,7 @@ private void InitializeComponent()
|
|||
//
|
||||
// btnCopyPreview
|
||||
//
|
||||
this.btnCopyPreview.Location = new System.Drawing.Point(227, 344);
|
||||
this.btnCopyPreview.Location = new System.Drawing.Point(227, 312);
|
||||
this.btnCopyPreview.Name = "btnCopyPreview";
|
||||
this.btnCopyPreview.Size = new System.Drawing.Size(53, 23);
|
||||
this.btnCopyPreview.TabIndex = 9;
|
||||
|
@ -659,7 +659,7 @@ private void InitializeComponent()
|
|||
// cbShowError
|
||||
//
|
||||
this.cbShowError.AutoSize = true;
|
||||
this.cbShowError.Location = new System.Drawing.Point(10, 184);
|
||||
this.cbShowError.Location = new System.Drawing.Point(9, 424);
|
||||
this.cbShowError.Name = "cbShowError";
|
||||
this.cbShowError.Size = new System.Drawing.Size(295, 17);
|
||||
this.cbShowError.TabIndex = 11;
|
||||
|
|
|
@ -112,12 +112,12 @@
|
|||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="tpFFmpeg.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<metadata name="tpFFmpeg.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<data name="nudx264CRF.ToolTip" xml:space="preserve">
|
||||
|
|
|
@ -105,6 +105,9 @@ public string GetFFmpegArgs()
|
|||
case FFmpegVideoCodec.libx264: // https://trac.ffmpeg.org/wiki/x264EncodingGuide
|
||||
args.AppendFormat("-crf {0} ", FFmpeg.x264_CRF);
|
||||
args.AppendFormat("-preset {0} ", FFmpeg.Preset.ToString());
|
||||
args.AppendFormat("-tune {0} ", "zerolatency");
|
||||
// -pix_fmt yuv420p required otherwise can't stream in Chrome
|
||||
args.Append("-pix_fmt yuv420p ");
|
||||
break;
|
||||
case FFmpegVideoCodec.libvpx: // https://trac.ffmpeg.org/wiki/vpxEncodingGuide
|
||||
args.AppendFormat("-crf {0} ", FFmpeg.VPx_CRF);
|
||||
|
@ -114,25 +117,19 @@ public string GetFFmpegArgs()
|
|||
break;
|
||||
}
|
||||
|
||||
// -pix_fmt yuv420p required for libx264 otherwise can't stream in Chrome
|
||||
if (FFmpeg.VideoCodec == FFmpegVideoCodec.libx264)
|
||||
{
|
||||
args.Append("-pix_fmt yuv420p -tune zerolatency ");
|
||||
}
|
||||
|
||||
if (FFmpeg.IsAudioSourceSelected())
|
||||
{
|
||||
switch (FFmpeg.AudioCodec)
|
||||
{
|
||||
case FFmpegAudioCodec.libvoaacenc: // http://trac.ffmpeg.org/wiki/AACEncodingGuide
|
||||
args.AppendFormat("-c:a libvo_aacenc -ac 2 -b:a {0}k ", FFmpeg.AAC_bitrate); // -ac 2 required otherwise failing with 7.1
|
||||
break;
|
||||
case FFmpegAudioCodec.libvorbis: // http://trac.ffmpeg.org/wiki/TheoraVorbisEncodingGuide
|
||||
args.AppendFormat("-c:a {0} -qscale:a {1} ", FFmpegAudioCodec.libvorbis.ToString(), FFmpeg.Vorbis_qscale);
|
||||
break;
|
||||
case FFmpegAudioCodec.libmp3lame: // http://trac.ffmpeg.org/wiki/Encoding%20VBR%20(Variable%20Bit%20Rate)%20mp3%20audio
|
||||
args.AppendFormat("-c:a {0} -qscale:a {1} ", FFmpegAudioCodec.libmp3lame.ToString(), FFmpeg.MP3_qscale);
|
||||
break;
|
||||
case FFmpegAudioCodec.libvoaacenc: // http://trac.ffmpeg.org/wiki/AACEncodingGuide
|
||||
args.AppendFormat("-c:a libvo_aacenc -ac 2 -b:a {0}k ", FFmpeg.AAC_bitrate); // -ac 2 required otherwise failing with 7.1
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -112,10 +112,10 @@
|
|||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="rtbCredits.Text" xml:space="preserve">
|
||||
<value>Contributors:
|
||||
|
@ -127,18 +127,18 @@ Amazon S3 and DreamObjects support: Alan Edwardes - http://alanedwardes.com
|
|||
|
||||
External libraries:
|
||||
|
||||
Greenshot Image Editor: http://sourceforge.net/projects/greenshot
|
||||
FTP Library: http://biko.codeplex.com
|
||||
Json.NET: http://json.codeplex.com
|
||||
SSH.NET: http://sshnet.codeplex.com
|
||||
Greenshot Image Editor: https://bitbucket.org/greenshot/greenshot
|
||||
Json.NET: https://json.codeplex.com
|
||||
SSH.NET: https://sshnet.codeplex.com
|
||||
Icons: http://p.yusukekamiyamane.com
|
||||
ImageListView: http://code.google.com/p/imagelistview
|
||||
ImageListView: https://code.google.com/p/imagelistview
|
||||
AviWriter: https://code.google.com/p/aforge
|
||||
FFmpeg Windows builds: http://ffmpeg.zeranoe.com/builds
|
||||
7-Zip: http://www.7-zip.org
|
||||
SevenZipSharp: http://sevenzipsharp.codeplex.com
|
||||
SevenZipSharp: https://sevenzipsharp.codeplex.com
|
||||
DirectShow video and audio device: https://github.com/rdp/screen-capture-recorder-to-video-windows-free
|
||||
QrCode.Net: https://qrcodenet.codeplex.com
|
||||
System.Net.FtpClient: https://netftp.codeplex.com
|
||||
|
||||
Copyright © 2007 - 2014 ShareX Developers</value>
|
||||
</data>
|
||||
|
|
Loading…
Reference in a new issue