我正在尝试使用以下代码在我的C#程序中使用FFMPEG将一个音频文件和一个视频文件合并:
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.CreateNoWindow = false;
startInfo.FileName = "ffmpeg.exe";
startInfo.Arguments = "ffmpeg -i video.mp4 -i mic.wav -c:v copy -map 0:v:0 -map 1:a:0 -c:a aac -b:a 192k output.mp4";
using (Process exeProcess = Process.Start(startInfo))
{
exeProcess.WaitForExit();
}
我的调试文件夹设置如下:
![enter image description here](https://istack.dev59.com/lacoD.webp)
output.mp4
文件。
"C:\Users\Ben\Documents\Visual Studio 2017\Projects\Szy\WorkTracker\WorkTracker\bin\Debug\WorkTracker.exe"
。 - TermSpar