Here is the code I am using:
private string ConvertVideoFiles(string strCommandLineSwitches)
{
Process prcExecuteFFMPEG = new Process();
prcExecuteFFMPEG.StartInfo.FileName = @"c:\windows\system32\cmd.exe ";
prcExecuteFFMPEG.StartInfo.Arguments = strCommandLineSwitches;
prcExecuteFFMPEG.StartInfo.UseShellExecute = false;
prcExecuteFFMPEG.StartInfo.RedirectStandardOutput = true;
prcExecuteFFMPEG.Start();
prcExecuteFFMPEG.WaitForExit();
string strOutput = prcExecuteFFMPEG.StandardOutput.ReadToEnd();
}
I am using
System.Diagnositic
at the top.
I send in the following command which I know works via the command prompts. (I got this from the text visualizer while running the program
/k "C:\Program Files\ffmpeg\bin\ffmpeg.exe" -b:10000k -r25 -an -i concat:"C:\Video conversion\Original\Cam06[21_48_59-22_29_19].avi|C:\Video conversion\Original\Cam06[22_29_19-23_36_00].avi" "C:\Video conversion\test.avi"
Any ideas why it is not working.
I changed the arguments to
/c dir *.*
and I got the output back and it worked as expected but my upper code is not working.
Thanks