mirror of
https://github.com/ShareX/ShareX.git
synced 2024-07-04 22:21:23 +12:00
Merge branch 'master' of https://github.com/ShareX/ShareX
Conflicts: ScreenCaptureLib/Screencast/FFmpegOptionsForm.Designer.cs
This commit is contained in:
commit
c123d56861
|
@ -78,10 +78,10 @@ public FFmpegOptions()
|
|||
// XviD
|
||||
XviD_qscale = 3;
|
||||
|
||||
// Vorbis
|
||||
// Audio
|
||||
Vorbis_qscale = 3;
|
||||
MP3_qscale = 4;
|
||||
AAC_bitrate = 64;
|
||||
AAC_bitrate = 128;
|
||||
}
|
||||
|
||||
public bool IsAudioSourceSelected()
|
||||
|
|
|
@ -176,8 +176,6 @@ public void UpdateExtensions()
|
|||
|
||||
cbExtension.Items.Add("avi");
|
||||
cbExtension.SelectedIndex = 0;
|
||||
|
||||
tcFFmpegVideoCodecs.SelectedIndex = (int)Options.FFmpeg.VideoCodec;
|
||||
}
|
||||
|
||||
private void UpdateUI()
|
||||
|
|
|
@ -121,8 +121,8 @@
|
|||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<data name="nudx264CRF.ToolTip" xml:space="preserve">
|
||||
<value>Constant Rate Factor (CRF): The range of the quantizer scale is 0-51: where 0 is lossless, 23 is default, and 51 is worst possible.
|
||||
A lower value is a higher quality and a subjectively sane range is 18-28.
|
||||
<value>Constant Rate Factor (CRF): The range of the quantizer scale is 0-51: where 0 is lossless, 23 is default, and 51 is worst possible.
|
||||
A lower value is a higher quality and a subjectively sane range is 18-28.
|
||||
Consider 18 to be visually lossless or nearly so: it should look the same or nearly the same as the input but it isn't technically lossless.</value>
|
||||
</data>
|
||||
</root>
|
|
@ -124,10 +124,17 @@ public string GetFFmpegArgs()
|
|||
|
||||
if (FFmpeg.IsAudioSourceSelected())
|
||||
{
|
||||
string audioString = GetAudioString();
|
||||
if (!string.IsNullOrEmpty(audioString))
|
||||
switch (FFmpeg.AudioCodec)
|
||||
{
|
||||
args.Append(audioString);
|
||||
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("-ac 2 -c:a libvo_aacenc -b:a {0}k ", FFmpeg.AAC_bitrate); // -ac 2 required otherwise failing with 7.1
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -143,25 +150,5 @@ public string GetFFmpegArgs()
|
|||
|
||||
return args.ToString();
|
||||
}
|
||||
|
||||
private string GetAudioString()
|
||||
{
|
||||
StringBuilder sbAudioString = new StringBuilder();
|
||||
|
||||
switch (FFmpeg.AudioCodec)
|
||||
{
|
||||
case FFmpegAudioCodec.libvorbis:
|
||||
sbAudioString.AppendFormat("-c:a {0} -qscale:a {1} ", FFmpegAudioCodec.libvorbis.ToString(), FFmpeg.Vorbis_qscale);
|
||||
break;
|
||||
case FFmpegAudioCodec.libmp3lame:
|
||||
sbAudioString.AppendFormat("-c:a {0} -qscale:a {1} ", FFmpegAudioCodec.libmp3lame.ToString(), FFmpeg.MP3_qscale);
|
||||
break;
|
||||
case FFmpegAudioCodec.libvoaacenc:
|
||||
sbAudioString.AppendFormat("-ac 2 -c:a {0} -b:a {1}k ", "libvo_aacenc", FFmpeg.AAC_bitrate);
|
||||
break;
|
||||
}
|
||||
|
||||
return sbAudioString.ToString();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue