micronax

Hi,
i need to convert a file into another format using another CLI Based APP "ffmpeg.exe". I defined the path to the executable and the WorkingDirectory and the arguments, but if the process.start-method is called the CLI-Window just pops up and closes at once again.

Here's my code:

Code Snippet



Dim p As New Process
With p
.StartInfo.FileName = appPath & "\ffmpeg.exe"
.StartInfo.WorkingDirectory = appPath & "\temp\"
'.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
.StartInfo.Arguments = "-i " & name & " -ac 6 -ab 128 " & name2 & ".mp3"
.Start()
End With




Re: Visual Basic Express Edition Problem with Process

nobugz

I'd guess it doesn't like the command line arguments you pass it. There's nothing you could do with the Process class to successfully start up a program and then cause it to immediately exit. Other than redirecting output but not input on some MSFT console mode apps like xcopy.exe.





Re: Visual Basic Express Edition Problem with Process

micronax

Okay.. Are there alternatives





Re: Visual Basic Express Edition Problem with Process

nobugz

Yes, pass the correct command line arguments. I'd guess you have a problem with your file names.