[Solved] Problem with MediaEncoder Process Window

Dec 4, 2009 at 4:46 AM
Edited Dec 8, 2009 at 4:44 AM
Hi all, I encountered a serious problem when I'm trying to upload an *.avi video file in local PC, the following error occurred. Does anyone have any idea? Thanks.

SQLEXPRESS 2008
VSTS 2008
IIS7
WINDOWS VISTA BUSINESS X86 SP2
MS EXPRESSION 3 (WITH ENCODER 3)

// -- Create process start info                
            ProcessStartInfo psi = new ProcessStartInfo(exeEncode         psi.Arguments = "/JobFile \"" + tmpjobFile + "\"" + " /Log On";
            psi.WorkingDirectory = ConfigurationSettings.AppSettings["MediaEncoderPath"];
            //Hide MediaEncoder process window
            psi.WindowStyle = ProcessWindowStyle.Hidden;
            Process p = Process.Start(psi);
            p.WaitForExit();
// -- Create process start info                
            ProcessStartInfo psi = new ProcessStartInfo(exeEncoder);
            psi.Arguments = "/JobFile \"" + tmpjobFile + "\"" + " /Log On";
            psi.WorkingDirectory = ConfigurationSettings.AppSettings["MediaEncoderPath"];

            //Hide MediaEncoder process window
            psi.WindowStyle = ProcessWindowStyle.Hidden;

            Process p = Process.Start(psi); // -- ERROR HERE
            p.WaitForExit();

// -- ERROR MESSAGE

System.ComponentModel.Win32Exception was unhandled
  Message="The system cannot find the file specified"
  Source="System"
  ErrorCode=-2147467259
  NativeErrorCode=2
  StackTrace:
       at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
       at System.Diagnostics.Process.Start()
       at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
       at VideoShow.Bll.Media.Encoding.ExpressionEncoder.Encode(Video video) in C:\Users\Lee Zhi Chien\Desktop\Video.Show\Video.Show\BLL\Media\Encoding\ExpressionEncoder.cs:line 64
       at VideoShow.Bll.Media.Processing.BasicVideoProcessor.Process(Video video) in C:\Users\Lee Zhi Chien\Desktop\Video.Show\Video.Show\BLL\Media\Processing\BasicVideoProcessor.cs:line 30
       at VideoShow.Bll.Media.Processing.AsyncVideoProcessor.<>c__DisplayClass1.<Process>b__0() in C:\Users\Lee Zhi Chien\Desktop\Video.Show\Video.Show\BLL\Media\Processing\AsyncVideoProcessor.cs:line 24
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: 

processerror

Dec 8, 2009 at 5:44 AM

I have found the solution. It happened that Encoder 3 does not contain Encoder.exe that is needed. Thus I installed a version of Encoder 2 which contain the required Encoder.exe. Now the program is working. Thanks for your attention.

Dec 24, 2009 at 2:21 PM

How is that a solution? Encoder 2 can't be found anywhere on Microsoft's site?

This application is completely broken by the change in Encoder 3, as far as I can tell.

 

Dec 24, 2009 at 3:27 PM

Hi, you are correct. You can only find Encoder 3 from the website. Luckily my school has a copy of Encoder 2. Hopefully the video.show team will soon support Encoder 3.