Har*_*aid 2 c# string command-line ffmpeg code-formatting
原版的
string strCommandLineArgs = (((("-i" + " ") + strVideoPath + " -vcodec mjpeg -vframes 1 -an -f rawvideo -s ") + intWidth.ToString() + "x") + intHeight.ToString() + " ") + strImagePath + " -ss 2";
Run Code Online (Sandbox Code Playgroud)
我做到了这一点
string strCommandLineArgs = string.Format("-i {0} -vcodec mjpeg -vframes 1 -an -f rawvideo -s {1}x{2} {3} -ss 2", strVideoPath, intWidth, intHeight, strImagePath);
Run Code Online (Sandbox Code Playgroud)
我无法找到使用(和)字符串的区别.