mencoder

  • Thread starter Thread starter Eugene Anthony
  • Start date Start date
E

Eugene Anthony

How do I actually call "mencoder" from asp.net 2.0 with C#? I actually
intend to convert any movie files to a flash fine.

Eugene Anthony
 
You need to find out what the correct command line switches and parameters
are, and then call it using the Process class.
Peter
 
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}


Eugene Anthony
 
Well, first off I'm not sure if it's a very good idea to keep an executable
on the Desktop folder since you could end up with a lot of visible GLOP as a
byproduct. But otherwise, it looks to me like the program probably wants an
absolute path to the target file, and you have only probided the file name,
no?
Peter
 
When invoked this way it works:

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\\My Documents\\Visual Studio
2005\\WebSites\\WebSite13\\mencoder.exe";
pProcess.Start();
}


but when included with the parameter bellow:

-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"


I am getting an error.


Eugene Anthony
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Dual core question 3
string manipulation 4
Random selection of records 1
integer validation 7
string 1
file size 1
how to merge wmv files (can Windows Media Stream Editor do that?) 0
insert code - security 2

Back
Top