nvenc command line import fixes

This commit is contained in:
Frank Skare
2019-09-29 01:44:23 +02:00
parent a1776d72c6
commit efd6cf6d43
9 changed files with 43 additions and 31 deletions
+8 -3
View File
@@ -427,7 +427,10 @@ Public MustInherit Class BasicVideoEncoder
For Each i In {"tune", "preset", "profile"}
Dim match = Regex.Match(commandLine, "(.*)(--" + i + "\s\w+)(.*)")
If match.Success Then commandLine = match.Groups(2).Value + " " + match.Groups(1).Value + " " + match.Groups(3).Value
If match.Success Then
commandLine = match.Groups(2).Value + " " + match.Groups(1).Value + " " + match.Groups(3).Value
End If
Next
Dim a = commandLine.SplitNoEmptyAndWhiteSpace(" ")
@@ -437,7 +440,7 @@ Public MustInherit Class BasicVideoEncoder
If Not param.ImportAction Is Nothing AndAlso
param.GetSwitches.Contains(a(x)) AndAlso a.Length - 1 > x Then
param.ImportAction.Invoke(a(x + 1))
param.ImportAction.Invoke(a(x), a(x + 1))
params.RaiseValueChanged(param)
Exit For
End If
@@ -477,7 +480,9 @@ Public MustInherit Class BasicVideoEncoder
Next
Else
For xOpt = 0 To optionParam.Options.Length - 1
If a(x + 1).Trim(""""c).ToLower = optionParam.Options(xOpt).ToLower.Replace(" ", "") Then
Dim values = If(optionParam.Values.NothingOrEmpty, optionParam.Options, optionParam.Values)
If a(x + 1).Trim(""""c).ToLower = values(xOpt).ToLower.Replace(" ", "") Then
optionParam.Value = xOpt
params.RaiseValueChanged(param)
exitFor = True