Click to See Complete Forum and Search --> : invoking exe file


solomon_13000
02-12-2007, 12:01 PM
I tried the code bellow and I am getting an error:


protected void Button1_Click(object sender, EventArgs e)
{
System.Diagnostics.Process pProcess = new
System.Diagnostics.Process();
pProcess.StartInfo.FileName = "C:\\Documents and
Settings\\Eugene Anthony\\Desktop\\mplayer\\mencoder.exe -lavfopts
i_certify_that_my_video_stream_does_not_use_b_frames MAX.mpg -o
vuurwerk1.flv -of lavf -ovc lavc -oac lavc -lavcopts
vcodec=flv:vbitrate=500:autoaspect:mbd=2:mv0:trell:v4mv:cbp:last_pred=3:
predia=2:dia=2:precmp=2:cmp=2:subcmp=2:preme=2:turbo:acodec=mp3:abitrate
=56 -srate 22050 -af lavcresample=22050";
pProcess.Start();
}


The error is:
+ $exception {"The system cannot find the file
specified"} System.Exception {System.ComponentModel.Win32Exception}


How do I solve the problem?

Regards

lmf232s
02-12-2007, 12:09 PM
Put memcoder.exe on the server.

This code will not execute on your local machine. The code is executing on the server and is looking for that path on the server and not your local machine.

solomon_13000
02-12-2007, 05:31 PM
when you are mentioning server, is it my IIS6?.

lmf232s
02-13-2007, 08:59 AM
Since your running the web site on your local machine, your local machine is basically the server. This means that as you test your web app on your local machine you can find a path such as C:\\Documents and
Settings\\Eugene Anthony\\Desktop\\mplayer\\mencoder.exe.

But once you publish this to a web server you will no longer be able to access this local .exe that is running on your machine and because of that you would have to place the mencode.exe on the server.

solomon_13000
02-17-2007, 05:40 AM
I tried this, no errors were displayed. However the the vuurwerk1.flv file was not created. I did install mencoder inside IIS6 folder.

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Diagnostics;

public partial class _Default : System.Web.UI.Page
{

protected void Page_Load(object sender, EventArgs e)
{

Process pProcess = new System.Diagnostics.Process();
pProcess.StartInfo.FileName = "C:\\Inetpub\\wwwroot\\mencoder.exe";
pProcess.StartInfo.Arguments = "-lavfopts i_certify_that_my_video_stream_does_not_use_b_frames MAX.mpg -o vuurwerk1.flv -of lavf -ovc lavc -oac lavc -lavcopts vcodec=flv:vbitrate=500:autoaspect:mbd=2:mv0:trell:v4mv:cbp:last_pred=3:predia=2:dia=2:precmp=2:cmp= 2:subcmp=2:preme=2:turbo:acodec=mp3:abitrate=56 -srate 22050 -af lavcresample=22050";
pProcess.Start();
}
}

lmf232s
02-20-2007, 07:57 PM
solomon, are you sure you should be doubling up the \\ on the filename. Try it with a single \.

Have you walked through the code while in debug mode?