tags:

views:

34

answers:

1

hi

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(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.

+2  A: 

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

scottm
Yeah i have access to that method. Thanks heaps. It is just what i was after.
Kieran