Mac上启动进程
本文关键字:进程 启动 Mac | 更新日期: 2023-09-27 18:09:51
我想在Mac中编写相当于"ffmpeg -i input "的命令。avi格式输出。在Windows中。我的代码是:
Process proc = new Process
{
StartInfo = new ProcessStartInfo
{
FileName = "ffmpeg.exe",
Arguments = "-i /Users/John/Desktop/input.avi /Users/John/Desktop/hhh.avi",
UseShellExecute = false,
RedirectStandardOutput = true,
CreateNoWindow = true
}
};
proc.Start();
在Mac终端中写入"mono previousCode.exe"后,我得到"filename unknown"错误。我错在哪里?
MacOS中的可执行文件通常不会以。exe后缀结尾,所以只要去掉"。exe",看看是否有效。如果没有,则需要提供ffmpeg