This commit is contained in:
stax76
2017-07-12 20:11:15 +02:00
parent c525af0d28
commit db666f5bfa
17 changed files with 155 additions and 102 deletions
-1
View File
@@ -10,7 +10,6 @@ Public Class AOMEnc
Sub New()
Name = "AV1"
AutoCompCheckValue = 50
End Sub
<NonSerialized>
+1 -2
View File
@@ -13,7 +13,7 @@ Public MustInherit Class VideoEncoder
Overridable Property Passes As Integer
Overridable Property QualityMode As Boolean
Property AutoCompCheckValue As Integer = 70
Property AutoCompCheckValue As Integer = 50
Property Muxer As Muxer = New MkvMuxer
Public MustOverride Sub ShowConfigDialog()
@@ -252,7 +252,6 @@ Public MustInherit Class VideoEncoder
x264cli.OutputFileTypeValue = "h264"
x264cli.Name = "Command Line | x264"
x264cli.Muxer = New MkvMuxer()
x264cli.AutoCompCheckValue = 50
x264cli.CommandLines = """%app:x264%"" --pass 1 --bitrate %video_bitrate% --stats ""%target_temp_file%.stats"" --output NUL ""%script_file%"" || exit" + BR + """%app:x264%"" --pass 2 --bitrate %video_bitrate% --stats ""%target_temp_file%.stats"" --output ""%encoder_out_file%"" ""%script_file%"""
x264cli.CompCheckCommandLines = """%app:x264%"" --crf 18 --output ""%target_temp_file%_CompCheck.%encoder_ext%"" ""%target_temp_file%_CompCheck.%script_ext%"""
ret.Add(x264cli)
+14 -4
View File
@@ -9,7 +9,6 @@ Public Class x264Enc
Sub New()
Name = "x264"
AutoCompCheckValue = 50
Params.ApplyValues(True)
Params.ApplyValues(False)
End Sub
@@ -55,6 +54,7 @@ Public Class x264Enc
p.Script.Synchronize()
Using proc As New Proc
proc.Package = Package.x264
proc.Header = passName
proc.Priority = priority
proc.SkipStrings = {"kb/s, eta", "%]"}
@@ -129,7 +129,7 @@ Public Class x264Enc
newParams.Init(store)
newParams.ApplyValues(True)
Using f As New CommandLineForm(newParams)
Using form As New CommandLineForm(newParams)
Dim saveProfileAction = Sub()
Dim enc = ObjectHelp.GetCopy(Of x264Enc)(Me)
Dim params2 As New x264Params
@@ -140,9 +140,10 @@ Public Class x264Enc
SaveProfile(enc)
End Sub
ActionMenuItem.Add(f.cms.Items, "Save Profile...", saveProfileAction).SetImage(Symbol.Save)
ActionMenuItem.Add(form.cms.Items, "Save Profile...", saveProfileAction).SetImage(Symbol.Save)
If f.ShowDialog() = DialogResult.OK Then
If form.ShowDialog() = DialogResult.OK Then
AutoCompCheckValue = CInt(newParams.CompCheckAimedQuality.Value)
Params = newParams
ParamsStore = store
OnStateChange()
@@ -212,9 +213,17 @@ Public Class x264Params
Property CompCheck As New NumParam With {
.Name = "CompCheckQuant",
.Text = "Comp. Check",
.Help = "CRF value used as 100%",
.Value = 18,
.Config = {1, 50}}
Property CompCheckAimedQuality As New NumParam With {
.Name = "CompCheckAimedQuality",
.Text = "Aimed Quality",
.Value = 50,
.Help = "Percent value to adjusts the target file size or image size after the compressibility check accordingly.",
.Config = {1, 100}}
Property Custom As New StringParam With {
.Text = "Custom",
.AlwaysOn = True,
@@ -819,6 +828,7 @@ Public Class x264Params
DeblockA,
DeblockB,
CompCheck,
CompCheckAimedQuality,
SlowFirstpass,
New BoolParam With {.Switch = "--constrained-intra", .Text = "Constrained Intra Prediction"},
Cabac)
+11 -2
View File
@@ -10,7 +10,6 @@ Public Class x265Enc
Sub New()
Name = "x265"
AutoCompCheckValue = 50
Params.ApplyPresetDefaultValues()
Params.ApplyPresetValues()
End Sub
@@ -56,6 +55,7 @@ Public Class x265Enc
p.Script.Synchronize()
Using proc As New Proc
proc.Package = Package.x265
proc.Header = passName
proc.Encoding = Encoding.UTF8
proc.Priority = priority
@@ -146,6 +146,7 @@ Public Class x265Enc
ActionMenuItem.Add(f.cms.Items, "Save Profile...", saveProfileAction).SetImage(Symbol.Save)
If f.ShowDialog() = DialogResult.OK Then
AutoCompCheckValue = CInt(newParams.CompCheckAimedQuality.Value)
Params = newParams
ParamsStore = store
OnStateChange()
@@ -307,8 +308,16 @@ Public Class x265Params
.Name = "CompCheckQuant",
.Text = "Comp. Check",
.Value = 18,
.Help = "CRF value used as 100%",
.Config = {1, 50}}
Property CompCheckAimedQuality As New NumParam With {
.Name = "CompCheckAimedQuality",
.Text = "Aimed Quality",
.Value = 50,
.Help = "Percent value to adjusts the target file size or image size after the compressibility check accordingly.",
.Config = {1, 100}}
Property Weightp As New BoolParam With {
.Switch = "--weightp",
.NoSwitch = "--no-weightp",
@@ -849,7 +858,7 @@ Public Class x265Params
New StringParam With {.Switch = "--qpfile", .Text = "QP File", .Quotes = True, .BrowseFile = True},
New StringParam With {.Switch = "--recon", .Text = "Recon File", .Quotes = True, .BrowseFile = True},
New StringParam With {.Switch = "--scaling-list", .Text = "Scaling List", .Quotes = True},
Decoder, PsyRD, PsyRDOQ, CompCheck,
Decoder, PsyRD, PsyRDOQ, CompCheck, CompCheckAimedQuality,
New NumParam With {.Switch = "--recon-depth", .Text = "Recon Depth"},
RDpenalty)
Add("Other 2",