Problem with System.Diagnostics.Process
- From: M1iS <M1iS@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 1 Apr 2009 09:40:03 -0700
I’m having a problem automating a command line application (FFmpeg). I’m
able to manually pull up a command window and type in my arguments and run
the application however when I try to automate it with
System.Diagnostics.Process it fails:
Here’s my code:
Process ffmpeg = new Process();
ffmpeg.StartInfo.WorkingDirectory = FFmpegDirectory;
ffmpeg.StartInfo.FileName = "ffmpeg.exe";
ffmpeg.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
ffmpeg.StartInfo.Arguments = arguments;
ffmpeg.Start();
ffmpeg.WaitForExit();
Here are my command line arguments:
ffmpeg -i D:\MediaTools\test\test.wmv -pass 2 -vcodec libx264 -s 512x288 -r
29.97 -vpre D:\MediaTools\test\libx264-normal.ffpreset -b 768kb -bt 256k
-acodec libfaac -ar 22050 -ab 96k -threads 0
D:\MediaTools\test\55a3e152-830c-4bfa-a62d-8c7f7b6be5db.mp4
It seems after I made some changes to my arguments FFmpeg is outputting some
other messages that weren’t there before. Could this be causing my process
object to trip up? Thanks,
Scott
.
- Prev by Date: RE: Enumerating a directory, FindFirst()/FindNext()?
- Next by Date: Re: Space allocated to an enumeration
- Previous by thread: RE: Enumerating a directory, FindFirst()/FindNext()?
- Next by thread: Re: Problem with System.Diagnostics.Process
- Index(es):