The code is
Dim s = Sub()Using p AsNew ProcessAddHandler p.ErrorDataReceived,Sub(sendingProcess AsObject, outLine As DataReceivedEventArgs)If outLine.Data <> ""Then BeginInvoke(Sub() Text = outLine.Data.Split("[")(1))EndSub p.StartInfo.FileName = "C:\Users\Metroidn1f\Desktop\Metroidn1f Encoder v4.2.38.3\Tools\x264\x264.exe" p.StartInfo.Arguments = "--preset medium --profile high --level 4.1 --crf 19 --fps 23.976 --output ""Test.mkv"" ""C:\Users\Metroidn1f\Desktop\hannah.montana.s04e01.sweet.home.hannah.montana.hdtv.xvid-pinball.avi""" p.StartInfo.UseShellExecute = False p.StartInfo.RedirectStandardError = True p.StartInfo.CreateNoWindow = True p.Start() p.BeginErrorReadLine() p.WaitForExit()EndUsingEndSub s.BeginInvoke(Nothing, Nothing)
The error was.
IndexOutOfRangeException was unhandled by user code.
Index was outside the bounds of the array.
I want to split each part into its own string. Before that string comes of, there is an index part that is there, but that goes away pretty fast.