开发者

run command and make sure it ends before continuing

开发者 https://www.devze.com 2022-12-19 00:08 出处:网络
i am running a command line program from inside my c# code behind page. the command looks like so. String runMe = baseDir + @\"Bin\\ffmpeg.exe\";

i am running a command line program from inside my c# code behind page. the command looks like so.

String runMe = baseDir + @"Bin\ffmpeg.exe"; 
String convertVideo = " -i \"" + fullFileName + "\"  -ab 64 -ar 44100 -b 200 -y -f flv  \"" + fullFileNameWOextension + ".flv\" ";
String makeImages = " -i \"" + fullFileName + "\" -r 1 -ss 00:00:01 -t 00:00:15 -f image2 -s 120x96 \"" + imagesPath + "" + filename.Substring(0, filename.IndexOf(".")) + "_images%05d.jpeg\"";
EdgeCastHelper.ExecuteCommandSync(开发者_Go百科runMe, convertVideo);
EdgeCastHelper.ExecuteCommandSync(runMe, makeImages);

There are some bits missing which are passed in as parameters. Once i have converted the video i upload it to separate file server.

What i would like to know: Is there a way to stop the upload process happening until the exe has run its course, ie fully converted the video.


I'm not sure if you have access to change the EdgeCastHelper.ExecuteCommandSync method, but there is a Process.WaitForExit method.

0

精彩评论

暂无评论...
验证码 换一张
取 消