好的,所以我尝试使用以下参数启动该过程
当我尝试启动它时,虽然我得到一个 System.nullreferenceexception: Object reference not set to an instance of an object
我究竟做错了什么?
Dim exepath As String = Application.StartupPath + "\bin\ffmpeg.exe"
Dim sr As StreamReader
Dim cmd As String = " -i """ + input + """ -ar 22050 -y """ + output + """"
Dim ffmpegOutput As String
proc.StartInfo.FileName = exepath
proc.StartInfo.Arguments = cmd
proc.StartInfo.UseShellExecute = False
proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
proc.StartInfo.RedirectStandardError = True 'redirect ffmpegs output
'to our application
proc.StartInfo.RedirectStandardOutput = True 'we don’t really need this
proc.StartInfo.CreateNoWindow = True
proc.Start()