This commit is contained in:
Frank Skare
2021-01-10 19:53:01 +01:00
5 changed files with 45 additions and 33 deletions
+2
View File
@@ -6,6 +6,8 @@
- Neo DFTTest is now also available for AviSynth. (stax76, [#426](/../../issues/426))
- Main dialog shows actual width and height. (stax76)
- Advanced Info feature of Code Editor has new VapourSynth ClipInfo option. (stax76)
- Fix items can't be removed from or rearranged in lists (Dendraspis, [#433](/../../issues/433))
- Fix randomly appearing IOException when using x265 with chunks (Dendraspis, [#431](/../../issues/431))
2.1.7.0 Stable (2021-01-07)
+27 -27
View File
@@ -53,6 +53,27 @@ Public Class x265Enc
AfterEncoding()
End Sub
Overloads Sub Encode(passName As String, commandLine As String, priority As ProcessPriorityClass, Optional isFirstChunk As Boolean = True)
p.Script.Synchronize(False, True, False, Nothing, isFirstChunk)
Using proc As New Proc
proc.Package = Package.x265
proc.Header = passName
proc.Encoding = Encoding.UTF8
proc.Priority = priority
proc.SkipString = "%] "
If commandLine.Contains("|") Then
proc.File = "cmd.exe"
proc.Arguments = "/S /C """ + commandLine + """"
Else
proc.CommandLine = commandLine
End If
proc.Start()
End Using
End Sub
Overrides Function GetFixedBitrate() As Integer
Return CInt(Params.Bitrate.Value)
End Function
@@ -85,50 +106,29 @@ Public Class x265Enc
If Params.Mode.Value = x265RateMode.TwoPass Then
ret.Add(Sub()
Encode("Video encoding pass 1" + name.Replace("_chunk", " chunk "),
GetArgs(1, startFrame, endFrame, name, p.Script), s.ProcessPriority)
GetArgs(1, startFrame, endFrame, name, p.Script), s.ProcessPriority, isFirst)
Encode("Video encoding pass 2" + name.Replace("_chunk", " chunk "),
GetArgs(2, startFrame, endFrame, name, p.Script), s.ProcessPriority)
GetArgs(2, startFrame, endFrame, name, p.Script), s.ProcessPriority, isFirst)
End Sub)
ElseIf Params.Mode.Value = x265RateMode.ThreePass Then
ret.Add(Sub()
'Specific order 1 > 3 > 2 is correct!
Encode("Video encoding first pass" + name.Replace("_chunk", " chunk "),
GetArgs(1, startFrame, endFrame, name, p.Script), s.ProcessPriority)
GetArgs(1, startFrame, endFrame, name, p.Script), s.ProcessPriority, isFirst)
Encode("Video encoding Nth pass" + name.Replace("_chunk", " chunk "),
GetArgs(3, startFrame, endFrame, name, p.Script), s.ProcessPriority)
GetArgs(3, startFrame, endFrame, name, p.Script), s.ProcessPriority, isFirst)
Encode("Video encoding last pass" + name.Replace("_chunk", " chunk "),
GetArgs(2, startFrame, endFrame, name, p.Script), s.ProcessPriority)
GetArgs(2, startFrame, endFrame, name, p.Script), s.ProcessPriority, isFirst)
End Sub)
Else
ret.Add(Sub() Encode("Video encoding" + name.Replace("_chunk", " chunk "),
GetArgs(1, startFrame, endFrame, name, p.Script), s.ProcessPriority))
GetArgs(1, startFrame, endFrame, name, p.Script), s.ProcessPriority, isFirst))
End If
Next
Return ret
End Function
Overloads Sub Encode(passName As String, commandLine As String, priority As ProcessPriorityClass)
p.Script.Synchronize()
Using proc As New Proc
proc.Package = Package.x265
proc.Header = passName
proc.Encoding = Encoding.UTF8
proc.Priority = priority
proc.SkipString = "%] "
If commandLine.Contains("|") Then
proc.File = "cmd.exe"
proc.Arguments = "/S /C """ + commandLine + """"
Else
proc.CommandLine = commandLine
End If
proc.Start()
End Using
End Sub
Overrides Sub RunCompCheck()
If Not g.VerifyRequirements OrElse Not g.IsValidSource Then
Exit Sub
+3 -1
View File
@@ -59,7 +59,7 @@ Public Class SourceFilesForm
'
'bnDown
'
Me.bnDown.Anchor = System.Windows.Forms.AnchorStyles.Top
Me.bnDown.Anchor = System.Windows.Forms.AnchorStyles.Bottom
Me.bnDown.Location = New System.Drawing.Point(749, 370)
Me.bnDown.Margin = New System.Windows.Forms.Padding(8)
Me.bnDown.Size = New System.Drawing.Size(250, 80)
@@ -67,6 +67,7 @@ Public Class SourceFilesForm
'
'bnRemove
'
Me.bnRemove.Anchor = System.Windows.Forms.AnchorStyles.Top
Me.bnRemove.Location = New System.Drawing.Point(749, 112)
Me.bnRemove.Margin = New System.Windows.Forms.Padding(8)
Me.bnRemove.Size = New System.Drawing.Size(250, 80)
@@ -82,6 +83,7 @@ Public Class SourceFilesForm
'
'bnAdd
'
Me.bnAdd.Anchor = System.Windows.Forms.AnchorStyles.Top
Me.bnAdd.Location = New System.Drawing.Point(749, 16)
Me.bnAdd.Margin = New System.Windows.Forms.Padding(8)
Me.bnAdd.Size = New System.Drawing.Size(250, 80)
+8 -5
View File
@@ -187,7 +187,8 @@ Public Class VideoScript
Optional convertToRGB As Boolean = False,
Optional comparePath As Boolean = True,
Optional flipVertical As Boolean = False,
Optional avsEncoding As Encoding = Nothing)
Optional avsEncoding As Encoding = Nothing,
Optional writeScript As Boolean = True)
If Path = "" Then
Exit Sub
@@ -298,10 +299,12 @@ clipname.set_output()
(comparePath AndAlso Path <> LastPath) OrElse changedAvsEncoding Then
If Path.Dir.DirExists Then
If Engine = ScriptEngine.VapourSynth Then
ModifyScript(code, Engine).WriteFileUTF8(Path)
Else
ModifyScript(code, Engine).WriteFile(Path, TextEncoding.EncodingOfProcess)
If writeScript Then
If Engine = ScriptEngine.VapourSynth Then
ModifyScript(code, Engine).WriteFileUTF8(Path)
Else
ModifyScript(code, Engine).WriteFile(Path, TextEncoding.EncodingOfProcess)
End If
End If
If Not Package.AviSynth.VerifyOK OrElse
+5
View File
@@ -1460,6 +1460,11 @@ Namespace UI
e.Graphics.DrawString(caption, Font, Brushes.Black, r2, sf)
End Sub
Protected Overrides Sub OnSelectedValueChanged(e As EventArgs)
MyBase.OnSelectedValueChanged(e)
UpdateControls()
End Sub
Sub UpdateSelection()
If SelectedIndex > -1 Then
BlockOnSelectedIndexChanged = True