Necesito agarrar el error output de la CMD en este código, pero no sé como hacerlo, solo me agarra el output standard. ¿Me pueden indicar como se hace?
Muchas gracias!
PD: Ya sé que es una mala práctica usar comandos externos, pero no encuentro ninguna librería que sirva para buscar metadataos Y A LA VEZ convertir videos, eso es dificil, estoy aprendiendo!
Código
If metadata = True Then Dim ffmpeg_process As New Process() Dim ffmpeg_startinfo As New ProcessStartInfo() ffmpeg_startinfo.FileName = "cmd.exe " ffmpeg_startinfo.UseShellExecute = False ffmpeg_startinfo.CreateNoWindow = False ffmpeg_startinfo.Arguments = "/C ffmpeg.exe -y -i " & ControlChars.Quote & aFile.FullName.ToString() & ControlChars.Quote & " -f ffmetadata " & ControlChars.Quote & "%TEMP%\" & aFile.Name.ToString() & "_metadata.txt" & ControlChars.Quote & " >NUL 2>&1 && Type " & ControlChars.Quote & "%TEMP%\" & aFile.Name.ToString() & "_metadata.txt" & ControlChars.Quote & "| FINDSTR /I " & ControlChars.Quote & "^INAM ^title" & ControlChars.Quote ffmpeg_startinfo.RedirectStandardOutput = True ffmpeg_process.EnableRaisingEvents = True ffmpeg_process.StartInfo = ffmpeg_startinfo ffmpeg_process.Start() Dim readerStdOut As IO.StreamReader = ffmpeg_process.StandardOutput Do While readerStdOut.EndOfStream = False consolebox.AppendText(readerStdOut.ReadLine() + vbNewLine) consolebox.SelectionStart = consolebox.Text.Length consolebox.ScrollToCaret() Loop End If