Question

I am trying the below code in the worker role, but the issue i feel in

http://www.infragistics.com/community/blogs/anton_staykov/archive/2010/10/08/convert-video-files-in-windows-azure-using-ffmpeg.aspx

exeProcess.WaitForExit(); line, it pops up windows which wont close on its won, when i close it manually then it will move to the next line. when the FFMPEG operation is done it should close on its won and move to next line

Was it helpful?

Solution

I wonder why at all you see the pops up window. You probably miss any of these settings:

psi.CreateNoWindow = false;
psi.ErrorDialog = false;
psi.UseShellExecute = false;
psi.WindowStyle = ProcessWindowStyle.Hidden;

They are all required to suppress poping out of any and all windows and are all required. If you use the code as provided with all the setting there should not be a command window. The code is really old and, the blog post you refer has small issue. When we want to take everything by code should also explicitly state that we are not redirecting StandardInput. The code from refereed blog post:

psi.RedirectStandardOutput = true;
psi.RedirectStandardError = true;   

is changed into:

    psi.RedirectStandardOutput = true;
    psi.RedirectStandardInput = false;
    psi.RedirectStandardError = true;

in the Upgrade branch of the source code: https://azurevideoconv.codeplex.com/SourceControl/latest#CloudFFMpeg-upgrade/VideoProcessor/VideoConverter.cs

In any case, I haven't updated this since years, as there is Windows Azure Media services now. If you take the way to using ffmpeg, make sure you use the 32bit compiled executable! I always had issues running the 64bit one.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top