473,386 Members | 1,630 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

mencoder

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

*** Sent via Developersdex http://www.developersdex.com ***
Feb 12 '07 #1
5 3090
You need to find out what the correct command line switches and parameters
are, and then call it using the Process class.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Eugene Anthony" wrote:
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

*** Sent via Developersdex http://www.developersdex.com ***
Feb 12 '07 #2
On Feb 12, 2:55 pm, Eugene Anthony <solomon_13...@yahoo.comwrote:
How do I actually call "mencoder" from asp.net 2.0 with C#? I actually
What's this?

Feb 12 '07 #3
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_fram es 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:tur bo: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

*** Sent via Developersdex http://www.developersdex.com ***
Feb 12 '07 #4
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

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Eugene Anthony" wrote:
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_fram es 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:tur bo: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

*** Sent via Developersdex http://www.developersdex.com ***
Feb 12 '07 #5
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_fram es 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:tur bo:acodec=mp3:abitrate
=56 -srate 22050 -af lavcresample=22050"
I am getting an error.
Eugene Anthony

*** Sent via Developersdex http://www.developersdex.com ***
Feb 12 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Ivo Woltring | last post by:
Hi Pythoneers, I am trying to make my own gui for mencoder.exe (windows port of the terrific linux mencoder/mplayer) to convert divx to Pocket_PC size. My current app creates a batch script to...
1
by: PlayQ | last post by:
I am using the WMEncoder (seris 9) object inside a .net(c#) encoding app that encodes a wave file to a wma file. Everytime I create and use the WMEncoder object it leak system handles even after I...
12
by: Sandman | last post by:
There are some Mac tools to convert pretty much any given video source to a Flash video file (.flv) but I'm wondering if there is any way to do it using a Linux platform tying in to a PHP web...
4
by: Henrik Lied | last post by:
Hi there! I'm trying to create a video uploading service (just to learn). The system is mostly based on Django, but the question I'm looking an answer for is more related to Python. So, the...
8
by: Henrik Lied | last post by:
Hi there! I'm trying to convert a video in a background process. The scenario I'm after: 1. The user uploads a video 2. The video is saved in my media directory, and the database is populated...
2
by: alou131 | last post by:
Hello all! I have this server side video transcoding script that works on all video files uploaded and transcodes them to the .flv format. The problem is when a video file that is already in...
4
by: ubuntufox | last post by:
Hey, I'm fairly new to using python, but I started in my computer science course and I really enjoy using it. I was wondering if I could use python to run a program in bash where the python script...
0
by: John Deas | last post by:
Hi, I am coding a small script to batch-convert flv files. At the core of it, mencoder is called through processString='mencoder -oac lavc -ovc lavc -of lavf -lavcopts...
0
by: sridhard2406 | last post by:
Hi All, I need to convert the flv video file into mpg file using mencoder. I have installed mencoder as per below mentioned link. http://www.cmuch.com/article.asp?id=168 I am able...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.