I know this is an old question but I landed here for the same reason. This is working for me. Note that I only wanted to capture the last line of ffmpeg output to a textbox. I'm using this to convert .ts files to .mp4. It's very quick because it copies to a new file while encoding. Very fast. Takes only a couple of minutes for a 6GB file...
Here's an example in action: https://www.youtube.com/watch?v=45iBOx8eFcs
Cheers everyone
Using process As New Process()
argConvert = "-i " &
"""D:\" & VODFileName & ".ts""" &
" -c:v copy -c:a copy " &
"""D:\" & VODFileName & ".mp4"""
process.StartInfo.FileName = "ffmpeg.exe"
process.StartInfo.Arguments = argConvert
process.StartInfo.UseShellExecute = False
process.StartInfo.RedirectStandardError = True
process.StartInfo.CreateNoWindow = True
process.Start()
Dim reader As StreamReader = process.StandardError
Dim output As String = ""
While Not process.StandardError.EndOfStream
output = process.StandardError.ReadLine()
Label1.Text = output
Application.DoEvents()
End While
Label1.Text = "Done"
Label1.Refresh()
End Using