using (Process process = new Process())
{
process.StartInfo.FileName = "ffmpeg.exe";
process.StartInfo.Arguments = "-i video.mp4 -loop 1 -i a.jpg -c:v copy -c:a copy -shortest output_temp.mp4";
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.RedirectStandardError = true;
process.StartInfo.CreateNoWindow = true;
process.Start();
process.WaitForExit();
}
I have verified that the input files, video.mp4 and a.jpg, exist in the specified paths and are accessible. Additionally, I've tried removing the -shortest option to rule out an infinite loop, but the issue persists.
I've also redirected the standard output and error streams to log files, but there are no error messages reported.
I'm using the last version of ffmpeg on Windows.
What could be causing the ffmpeg process to get stuck and not terminate as expected? Are there any other potential reasons I should investigate? Any help or suggestions would be greatly appreciated. Thank you!
Edit: Also in the mean time ffmpeg command is not working.